Community Client Credential Clients
- Last UpdatedJan 20, 2023
- 3 minute read
APIs for getting, adding, or removing client credential clients from communities
List Client Credential Clients for a Community
Gets clients associated with a specific tenant and community
Request
GET /api/v1-preview/Communities/{communityId}/Tenants/{tenantId}/ClientCredentialClients
?query={query}&skip={skip}&count={count}
Parameters
string communityId
Community identifierstring tenantId
Tenant identifier
[optional] string query
(not supported) Search string identifier[optional] integer skip
Parameter representing the zero-based offset of the first object to retrieve. If unspecified, a default value of 0 is used.[optional] integer count
Parameter representing the maximum number of objects to retrieve. If unspecified, a default value of 100 is used.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | ClientCredentialClient[] | Set of clients ( ClientCredentialClient) associated with the tenant ( tenantId) and community ( communityId) |
| 400 | ErrorResponse | Bad request |
| 401 | ErrorResponse | Unauthorized |
| 403 | ErrorResponse | Forbidden |
| 404 | ErrorResponse | Tenant not found |
| 500 | ErrorResponse | Internal server error |
Example response body
200 Response (ClientCredentialClient[])
[
{
"Id": "string",
"Name": "string",
"Enabled": true,
"AccessTokenLifetime": 0,
"Tags": [
"string"
],
"RoleIds": [
"string"
]
}
]
Get Count of Clients for a Community
Gets a count of client credential clients for a community
Request
HEAD /api/v1-preview/Communities/{communityId}/Tenants/{tenantId}/ClientCredentialClients
Parameters
string communityId
Community identifierstring tenantId
Tenant identifier
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | None | Success |
| 400 | ErrorResponse | Bad request |
| 401 | ErrorResponse | Unauthorized |
| 403 | ErrorResponse | Forbidden |
| 404 | ErrorResponse | Tenant not found |
| 500 | ErrorResponse | Internal server error |
Add Client Credential Client to a Community
Adds a client credential client to a community, providing a list of community roles to be assigned to the client
Request
PUT /api/v1-preview/Communities/{communityId}/Tenants/{tenantId}/ClientCredentialClients/{clientId}
Parameters
string communityId
Community identifierstring tenantId
Tenant identifierstring clientId
Client credential client identifier
Request Body
Community role identifiers to be assigned to the client
[
"string"
]
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | ClientCredentialClient | Ok |
| 201 | ClientCredentialClient | Created |
| 400 | ErrorResponse | Bad request |
| 401 | ErrorResponse | Unauthorized |
| 403 | ErrorResponse | Forbidden |
| 404 | ErrorResponse | Tenant not found |
| 500 | ErrorResponse | Internal server error |
Example response body
200 Response (ClientCredentialClient)
{
"Id": "string",
"Name": "string",
"Enabled": true,
"AccessTokenLifetime": 0,
"Tags": [
"string"
],
"RoleIds": [
"string"
]
}
Remove Client Credential Client from a Community
Removes a client credential client from a community
Request
DELETE /api/v1-preview/Communities/{communityId}/Tenants/{tenantId}/ClientCredentialClients/{clientId}
Parameters
string communityId
Community identifierstring tenantId
Tenant identifierstring clientId
Client credential client identifier
Response
| Status Code | Body Type | Description |
|---|---|---|
| 204 | None | Removed |
| 400 | ErrorResponse | Bad request |
| 401 | ErrorResponse | Unauthorized |
| 403 | ErrorResponse | Forbidden |
| 404 | ErrorResponse | Tenant not found |
| 500 | ErrorResponse | Internal server error |
Definitions
ErrorResponse
Object returned whenever there is an error
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| OperationId | string | true | false | Operation identifier of action that caused the error |
| Error | string | true | false | Error description |
| Reason | string | true | false | Reason for the error |
| Resolution | string | true | false | Resolution to resolve the error |
| DynamicProperties | object | false | true | Additional properties |
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"DynamicProperties": {
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}
ClientCredentialClient
Object to return or update a ClientCredentialClient
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Id | string | false | true | Client identifier for this client. This identifier should be a GUID. |
| Name | string | false | true | Name of client |
| Enabled | boolean | false | true | Whether client is enabled. Client can be used for authentication if set to true. Client cannot be used for authentication if set to false. |
| AccessTokenLifetime | int32 | false | true | Lifetime of access token issued for this client after authentication. Minimum 60 seconds. Maximum 3600 seconds. Defaults to 3600 seconds. |
| Tags | string[] | false | true | Tags for AVEVA internal use only |
| RoleIds | string[] | false | true | List of roles to be assigned to this client. Member role is always required. For security reasons, we advise against assigning administrator role to a client. |
{
"Id": "string",
"Name": "string",
"Enabled": true,
"AccessTokenLifetime": 0,
"Tags": [
"string"
],
"RoleIds": [
"string"
]
}