Skip to main content

Create access

This endpoint allows you to create a new access for a specific user.

Endpoint

POST /user/v1/users/{user_id}/access

Parameters

NameLocationRequiredTypeDefault valueDescription
user_idURLYesIntegerThe user identifier
typeBodyYesStringThe access type.
Allowed values : ui_connection, sso_connection, api_connection, profile
customer_idBodyNoIntegerThe associated user's customer_idThe customer identifier to which the access belongs.
rolesBodyNoList 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

NameLocationRequiredTypeDefault valueDescription
two_fa_enabledBodyNoBooleanfalseDoes this access require two-factor authentication?

sso_connection access

For more information, please visit the following link : SSO Connection

NameLocationRequiredTypeDefault valueDescription
sso_idBodyYesStringThe access identifier on your Single Sign On authentication system

api_connection access

For more information, please visit the following link : API Connection

NameLocationRequiredTypeDefault valueDescription
nameBodyYesStringThe name of this API access. It can be used to differentiate between several accesses.
languageBodyNoStringThe associated user's languageYou 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

NameLocationRequiredTypeDefault valueDescription
nameBodyYesStringThe 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"
}
}
}