Create access
This endpoint allows you to create a new access for a specific user.
Endpoint
POST /user/v1/users/{user_id}/access
Parameters
| Name | Location | Required | Type | Default value | Description |
|---|---|---|---|---|---|
| user_id | URL | Yes | Integer | The user identifier | |
| type | Body | Yes | String | The access type. Allowed values : ui_connection, sso_connection, api_connection, profile | |
| customer_id | Body | No | Integer | The associated user's customer_id | The customer identifier to which the access belongs. |
| roles | Body | No | List of String | [] | The roles associated to the access |
Each type of access requires additional information.
ui_connection access
For more information, please visit the following link : UI Connection
| Name | Location | Required | Type | Default value | Description |
|---|---|---|---|---|---|
| two_fa_enabled | Body | No | Boolean | false | Does this access require two-factor authentication? |
sso_connection access
For more information, please visit the following link : SSO Connection
| Name | Location | Required | Type | Default value | Description |
|---|---|---|---|---|---|
| sso_id | Body | Yes | String | The access identifier on your Single Sign On authentication system |
api_connection access
For more information, please visit the following link : API Connection
| Name | Location | Required | Type | Default value | Description |
|---|---|---|---|---|---|
| name | Body | Yes | String | The name of this API access. It can be used to differentiate between several accesses. | |
| language | Body | No | String | The associated user's language | You can specify a specific language for an API acces. This will ensure that messages returned by the API are not impacted by a change in the language of the associated user |
profile access
For more information, please visit the following link : Profile
| Name | Location | Required | Type | Default value | Description |
|---|---|---|---|---|---|
| name | Body | Yes | String | The name of this profile. It can be used to differentiate between several accesses. |
Response
A Access object.
Example Request
POST /user/v1/users/c0b48140-34cb-4187-acd7-aaa830dc97f9/access
Body
{
"type": "api_connection",
"name": "New application API access",
"roles": [
"CLIENTNMS_WEBSERVICE_EVENT_R",
"CLIENTNMS_WEBSERVICE_DNS_RW"
],
"customer_id": 1234,
"language": "en"
}
Example Response
{
"message": "OK",
"data": {
"id": 433514,
"user": "c0b48140-34cb-4187-acd7-aaa830dc97f9",
"type": "api_connection",
"customer_id": 1234,
"roles": [
"CLIENTNMS_WEBSERVICE_EVENT_R",
"CLIENTNMS_WEBSERVICE_DNS_RW"
],
"last_login_at": null,
"language": "en",
"name": "New application API access",
"created_at": "2023-01-01T00:00:00+00:00",
"created_by": {
"id": "7a1506b9-9ce4-43f9-a6f0-e94ef4252277",
"firstname": "Company",
"lastname": "Administrator"
}
}
}