POST/directory/levels/external-keys

Updates a list of level external keys.

Authorization

oauth2

OAuth 2.0 authentication.
For more information, see Authentication and Authorization.

Scope

directory

HTTP Request

POSThttps://www.worksapis.com/v1.0/directory/levels/external-keys

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 
Content-Type string 

application/json


required
example : application/json 

Request Body

PropertyTypeDescription
levels array (DomainUniqueExternalKeyRequest) 

List of external keys


required
minItems : 1
maxItems : 50 

DomainUniqueExternalKeyRequest

PropertyTypeDescription
domainId integer 

Domain ID


required
format : int32 
id string 

ID.

It is the ID automatically assigned to a resource.
To add, update or delete external keys, the following types are available:

  • Resource ID
  • External key in "externalKey:{externalKey}" format

required 
externalKey string 

Customer's external key

Updating external keys works as follows:

  • If no existing external key is found, a new one is added.
  • If an existing external key is found, a new one replaces it.
  • An external key whose value is NULL is deleted.
  • An external key can be up to 100 characters in length and cannot contain some special characters, %, #, /, and ?.

maxLength : 100 

Request Example

example

1{2  "levels": [3    {4      "domainId": 10000001,5      "id": "levelaa7-b824-4937-66af-042f1f43cefa",6      "externalKey": "LEVEL_EXT_01"7    },8    {9      "domainId": 10000001,10      "id": "leveld4d-1b15-450f-b674-e6a3338fe25b",11      "externalKey": "LEVEL_EXT_02"12    }13  ]14}

Response

HTTP 204

No Content

HTTP 400

Bad Request

HTTP 404

Not Found

HTTP 409

Conflict