API Clients
Get API Client Details¶
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the API Client. Type: integer (path) |
Responses
| Code | Description |
|---|---|
| 200 |
API Client data. Media type: application/json Example Value: { "basicAuthViaSecrets": true, "name": "string", "apiClientAuthType": "NONE", "headerParams": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }, "authParams": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }, "serverURL": "string", "payload": "string", "httpMethod": "string", "failureRegexBody": "string", "username": "string", "password": "string", "tokenEndpointForOAuth2": "string", "oauth2Scopes": "string", "id": 0, "projects": [ { "id": 0, "name": "string" } ] } |
| 404 |
Resource was not found. |
Update an API Client¶
Role: Admin, or the user who created the API Client.
serverURL and httpMethod are required. payload, httpMethod and failureRegexBody are limited to 1024 characters; an unknown HTTP method returns 400. apiClientAuthType is NONE, BASIC or OAUTH2_CC (OAuth 2.0 client credentials, with tokenEndpointForOAuth2 and oauth2Scopes). With basicAuthViaSecrets set to true, the credentials come from the secrets stored for your environment (Credentials from Secrets in the Web UI), and username and password are ignored.
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the API Client. Type: integer (path) |
Request body *
{
"basicAuthViaSecrets": true,
"name": "string",
"apiClientAuthType": "NONE",
"headerParams": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"authParams": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"serverURL": "string",
"payload": "string",
"httpMethod": "string",
"failureRegexBody": "string",
"username": "string",
"password": "string",
"tokenEndpointForOAuth2": "string",
"oauth2Scopes": "string",
"id": 0
}
Responses
| Code | Description |
|---|---|
| 200 | API Client was updated successfully. |
| 404 | Resource was not found. |
Delete an API Client¶
Parameters
| Name | Description |
|---|---|
| id * | Numeric ID of the API Client. Type: integer (path) |
Responses
| Code | Description |
|---|---|
| 200 | API Client was deleted successfully. |
| 404 | Resource was not found. |
| 409 | Resource cannot be deleted. |
List API Clients¶
Parameters
| Name | Description |
|---|---|
| page | Zero-based page number. Type: integer (query) Default value: 0 |
| size | Page size. Type: integer (query) Default value: 20 |
| sort | The sort type for listing entries. Type: string (query) |
| prj | Only return items assigned to these projects: comma-separated project IDs. Type: string (query) |
Responses
| Code | Description |
|---|---|
| 200 |
OK Media type: application/json Example Value: { "totalElements": 0, "totalPages": 0, "number": 0, "sort": { "sorted": true, "unsorted": true, "empty": true }, "size": 0, "content": [ { "id": 0, "name": "string", "projects": [ { "id": 0, "name": "string" } ] } ], "first": true, "last": true, "pageable": { "sort": { "sorted": true, "unsorted": true, "empty": true }, "offset": 0, "paged": true, "unpaged": true, "pageNumber": 0, "pageSize": 0 }, "numberOfElements": 0, "empty": true } |
Create an API Client¶
Role: Standard and above.
serverURL and httpMethod are required. payload, httpMethod and failureRegexBody are limited to 1024 characters; an unknown HTTP method returns 400. apiClientAuthType is NONE, BASIC or OAUTH2_CC (OAuth 2.0 client credentials, with tokenEndpointForOAuth2 and oauth2Scopes). With basicAuthViaSecrets set to true, the credentials come from the secrets stored for your environment (Credentials from Secrets in the Web UI), and username and password are ignored.
Parameters
No parameters
Request body *
{ "basicAuthViaSecrets": true, "name": "string", "apiClientAuthType": "NONE", "headerParams": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }, "authParams": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }, "serverURL": "string", "payload": "string", "httpMethod": "string", "failureRegexBody": "string", "username": "string", "password": "string", "tokenEndpointForOAuth2": "string", "oauth2Scopes": "string" }
Responses
| Code | Description |
|---|---|
| 201 |
ID of the API Client. Media type: application/json Example Value: { "id": 0 } |
| 409 |
Name needs to be unique. |