chore: add api endpoints to get idp field values (#16063)

Supports coder/internal#210
This commit is contained in:
Jaayden Halko
2025-01-08 16:07:02 -05:00
committed by GitHub
parent 303c4a9edb
commit 6ca1e5973e
7 changed files with 359 additions and 0 deletions
+80
View File
@@ -1830,6 +1830,46 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/setting
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Get the organization idp sync claim field values
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/settings/idpsync/field-values?claimField=string \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /organizations/{organization}/settings/idpsync/field-values`
### Parameters
| Name | In | Type | Required | Description |
|----------------|-------|----------------|----------|-----------------|
| `organization` | path | string(uuid) | true | Organization ID |
| `claimField` | query | string(string) | true | Claim Field |
### Example responses
> 200 Response
```json
[
"string"
]
```
### Responses
| Status | Meaning | Description | Schema |
|--------|---------------------------------------------------------|-------------|-----------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of string |
<h3 id="get-the-organization-idp-sync-claim-field-values-responseschema">Response Schema</h3>
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Get group IdP Sync settings by organization
### Code samples
@@ -2536,6 +2576,46 @@ curl -X GET http://coder-server:8080/api/v2/settings/idpsync/available-fields \
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Get the idp sync claim field values
### Code samples
```shell
# Example request using curl
curl -X GET http://coder-server:8080/api/v2/settings/idpsync/field-values?claimField=string \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
```
`GET /settings/idpsync/field-values`
### Parameters
| Name | In | Type | Required | Description |
|----------------|-------|----------------|----------|-----------------|
| `organization` | path | string(uuid) | true | Organization ID |
| `claimField` | query | string(string) | true | Claim Field |
### Example responses
> 200 Response
```json
[
"string"
]
```
### Responses
| Status | Meaning | Description | Schema |
|--------|---------------------------------------------------------|-------------|-----------------|
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | array of string |
<h3 id="get-the-idp-sync-claim-field-values-responseschema">Response Schema</h3>
To perform this operation, you must be authenticated. [Learn more](authentication.md).
## Get organization IdP Sync settings
### Code samples