Reference 360 > Reference 360 REST API > codelists version 2
  

codelists version 2

Use this resource to retrieve the details of a code list, a code value, and the crosswalks associated to a code list based on its internal ID or alias. You can also unlock code lists locked by other users.
Note: Effective in the April 2025 release, the ability to specify a unique internal ID and alias for a reference data asset is available for preview.
Preview functionality is supported for evaluation purposes but is unwarranted and is not supported in production environments or any environment that you plan to push to production. Informatica intends to include the preview functionality in an upcoming release for production use, but might choose not to in accordance with changing market or technical circumstances. For more information, contact Informatica Global Customer Support.
Note: To identify a code list based on its name, use the codelists version 1 REST APIs.

Unlock a code list (v2)

Unlocks a code list that's locked by another user.
Note: To use the API, you require the Informatica Intelligent Cloud Services Reference 360 Administrator role.

PUT request

To unlock a code list, submit a PUT request with the following URI:
/rdm-service/external/v2/codelists/<code list ID>/unlock
Note: You can find the ID of assets in Reference 360 or use REST APIs to retrieve the IDs. For more information, see Asset IDs.

PUT response

A 202 accepted response is returned.

PUT example

To unlock a code list, you might use the following request:
PUT https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/codelists/653a20e37659bf7eceecafa5/unlock HTTP/1.1
Accept: application/json
IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX
The following sample response shows the accepted response:
HTTP/1.1 202 Accepted

Create a code value (v2)

Creates a code value in a code list that has an internal ID or alias configured. You can directly create code values without creating draft changes or sending your changes for approval.

PATCH request

To create a code value in a code list, submit a PATCH request with the following URI:
/rdm-service/external/v2/codelists/{codeListKey}/codevalues
The following table describes the parameter in the request:
Parameter
Type
Description
codeListKey
String
Internal ID or alias of the code list to which you want to add code values.
The following table describes the attributes in the request body:
Attributes
Type
Description
action
String
Action to perform on code values. Set to CREATE.
records
Array
Details of the code value to create.
Name
String
Name for the code value.
Code
String
Code attribute value for the code value.
Description
String
Optional. Short description for the code value.
status
String
Optional. Status of the code value in the life cycle.
parentCode
String
Optional. Code value of the parent node to which you want to add the new code value a child node.
When you add a node to a parent code value in a hierarchical code list, use the parentCode attribute.
When you don't specify the parentCode attribute, Reference 360 adds the specified code values to the parent node of the hierarchy.
When you specify attributes in the request body, consider the following guidelines:
When you create a code value with data quality rule associations assigned to a Code attribute and set the value of the code attribute within a code list, the rule statement overrides the value.

PATCH response

The response generates a report of code values that were created.
The following table describes the attributes in the response body:
Attributes
Type
Description
successfulRecords
Array
An array that lists the successfully created code values and their details.
Code
String
Code attribute value for the created code value.
label
String
Display attribute value for the created code value.
failedRecords
Array
An array that lists the code values that weren't created and describes the reasons.
label
String
Display attribute value for the code value that wasn't created.
Code
String
Code attribute value for the code value that wasn't created.
errorCauses
-
Error details for the code values that weren't created.
errorCode
String
Error code for the error type.
errorSummary
String
A short summary that explains why the code values weren't created.
localizedErrorSummary
String
A short summary that explains the error in the user locale.
errorParameter
String
Parameter that provides details of an error.
successfulRecordsCount
String
Number of code values that were created successfully.
failedRecordsCount
String
Number of code values that weren't created.

PATCH example

To create a code value in a code list based on its internal ID country, you might use the following request:

PATCH https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/codelists/country/codevalues HTTP/1.1
Content-Type: application/json
Accept: application/json
IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX

{
"action": "CREATE",
"records": [
{
"Name": "NAME-A",
"Code": "CODE-A",
"Description": "DESCRIPTION-A",
"status": "ActiveKey",
"parentCode": "STEM"
}
]
}
The following sample response shows the report for a successful code value creation:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 39

{
"successfulRecords": [
{
"Code": "CODE-A",
"label": "NAME-A"
}
],
"failedRecords": [],
"successfulRecordsCount": 1,
"failedRecordsCount": 0
}

Update a code value (v2)

Updates a code value in a code list based on the internal ID or alias of the code list. You can directly update code values without creating draft changes or sending your changes for approval.
You can't update code values that are defined as a parent code value in a hierarchical code list. To move a code value to another node within the same hierarchical code list, see Move a code value.
When you update a code value in a hierarchical code list, you don't need to use the parentCode attribute.

PATCH request

To update a code value in a code list, submit a PATCH request with the following URI:
/rdm-service/external/v2/codelists/{codeListKey}/codevalues
The following table describes the parameter in the request:
Parameter
Type
Description
codeListKey
String
Internal ID or alias of the code list to which you want to update the code values.
The following table describes the attributes in the request body:
Field
Type
Description
action
String
Action to perform on code values. Set to UPDATE.
records
Array
Details of the code value to update.
Name
String
Name for the code value.
Code
String
Code attribute value for the code value.
Description
String
Short description for the code value.
status
String
Optional. Status of the code value in the life cycle.
When you specify attributes in the request body, consider the following guidelines:
To update a code value, ensure that you use the Code attribute value. If you don't use the Code attribute value, the following error appears:
The specified code value does not exist

PATCH response

The response generates a report of code values that were updated.
The following table describes the attributes in the response:
Field
Type
Description
successfulRecords
Array
An array that lists the successfully updated code values and their details.
Code
String
Code attribute value for the updated code value.
label
String
Display attribute value for the updated code value.
failedRecords
Array
An array that lists the code values that weren't updated and describes the reasons.
label
String
Display attribute value for the code value that wasn't updated.
Code
String
Code attribute value for the code value that wasn't updated.
errorCauses
-
Error details for the code values that weren't updated.
errorCode
String
Error code for the error type.
errorSummary
String
A short summary that explains why the code values weren't updated.
localizedErrorSummary
String
A short summary that explains the error in the user locale.
errorParameter
String
Parameter that provides details of an error.
successfulRecordsCount
String
Number of code values that were updated successfully.
failedRecordsCount
String
Number of code values that weren't updated.

PATCH example

To update a code value in a code list based on its internal ID country, you might use the following request:

PATCH https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/codelists/country/codevalues HTTP/1.1
Content-Type: application/json
Accept: application/json
IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX

{
"action": "UPDATE",
"records": [
{
"Name": "NAME-A",
"Code": "CODE-A",
"Description": "DESCRIPTION-A",
"status": "ActiveKey"
}
]
}
The following sample response shows the report for a successful code value update:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 39
{
"successfulRecords": [
{
"Code": "CODE-A",
"label": "NAME-A"
}
],
"failedRecords": [],
"successfulRecordsCount": 1,
"failedRecordsCount": 0

Move a code value (v2)

Moves a code value to another node within a hierarchical code list without locking the code list. You can directly move code values without creating draft changes or sending your changes for approval..

PATCH request

To move a code value to another node within the same hierarchical code list, submit a PATCH request with the following URI:
/rdm-service/external/v2/codelists/{codeListKey}/codevalues
The following table describes the parameter in the request:
Parameter
Type
Description
codeListKey
String
Internal ID or alias of a hierarchical code list that you want to update.
The following table describes the attributes in the request body:
Field
Type
Description
action
String
Action to perform on code values. Set to MOVE.
records
Array
Details of the code value to move.
Code
String
Code attribute value for the code value.
parentCode
String
Optional. Code value of the parent node to which you want to move the code value.
By default, Reference 360 adds the specified code values to the parent node of the hierarchy.

PATCH response

The response generates a report of code values that were moved.
The following table describes the attributes in the response body:
Field
Type
Description
successfulRecords
Array
An array that lists the successfully moved code values and their details.
Code
String
Code attribute value for the moved code value.
label
String
Display attribute value for the moved code value.
failedRecords
Array
An array that lists the code values that weren't moved and describes the reasons.
Code
String
Code attribute value for the code value.
label
String
Display attribute value for the code value.
errorCauses
-
Error details for the code values that weren't moved.
errorCode
String
Error code for the error type.
errorSummary
String
A short summary that explains why the code value wasn't moved.
localizedErrorSummary
String
A short summary that explains the error in the user locale.
errorParameter
String
Parameter the provides details of an error.
successfulRecordsCount
String
Number of code values that were moved successfully.
failedRecordsCount
String
Number of code values that weren't moved.

PATCH example

To move a code value to another node within a hierarchical code list based on its internal ID country, you might use the following request:

PATCH https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/codelists/country/codevalues HTTP/1.1
Content-Type: application/json
Accept: application/json
IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX

{
"action": "MOVE",
"records": [
{
"Code": "CODE-A",
"parentCode": "CODE-B"
}
]
}
}
The following sample response shows the report for moved code values:

HTTP/1.1 200 OK
Location: /subset/71253be5deb0e7d4974935e0/cursor
Content-Type: application/json
Content-Length: 39

{
"successfulRecords": [
{
"Code": "CODE-A"
}
],
"failedRecords": [],
"successfulRecordsCount": 1,
"failedRecordsCount": 0
}

Delete code values (v2)

Deletes code values of a code list that you no longer need based on the internal ID or alias of the code list. You can directly delete code values without creating draft changes or sending your changes for approval.
You cannot delete the following types of code values:

PATCH request

To delete a code value, submit a PATCH request with the following URI:
/rdm-service/external/v2/codelists/{codeListKey}/codevalues
The following table describes the parameter in the request:
Parameter
Type
Description
codeListKey
String
Internal ID or alias of the code list that contains the code values to delete.
The following table describes the attributes in the request body:
Field
Type
Description
action
String
Action to perform on code values. Set to DELETE.
records
Array
List of code values to delete.
Note: You can delete 50 code values at a time.
Code
String
The code field for the code value.

PATCH response

The response generates a report of code values that were deleted.
The following table describes the attributes in the response body:
Field
Type
Description
successfulRecords
Array
An array that lists the code values that were deleted successfully.
Code
String
Code attribute value for deleted code value.
label
String
Display attribute value for deleted code value.
failedRecords
Array
An array that lists the code values that weren't deleted and describes the reasons.
Code
String
Code attribute value for the code value.
label
String
Display attribute value for the code value.
errorCauses
-
Error details for the code values that weren't deleted.
errorCode
String
Error code for the error type.
errorSummary
String
Explains why the code value wasn't deleted.
localizedErrorSummary
String
A short summary that explains the error in the user locale.
errorParameter
String
Parameter that provides details of an error.
successfulRecordsCount
String
Number of code values that were deleted successfully.
failedRecordsCount
String
Number of code values that weren't deleted.

PATCH example

To delete code values in a code list based on its internal ID country, you might use the following request body:
PATCH https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/codelists/country/codevalues HTTP/1.1
Content-Type: application/json
Content-Length: 30
IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX
{
"action": "DELETE",
"records": [
{
"Code": "CODE-A"
}
]
}
}
The following sample response shows the deletion report:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 34

{
"successfulRecords": [
{
"Code": "CODE-A"
}
],
"failedRecords": [],
"successfulRecordsCount": 1,
"failedRecordsCount": 0
}

Get code value details (v2)

Retrieves the details of a code value in a code list based on the internal ID or alias of the code list.

GET request

To retrieve the details of a code value, submit a GET request with the following URI and specify the code:
/rdm-service/external/v2/codelists/{codeListKey}/codevalues?Code={code}
The following table describes the parameter in the request body:
Parameter
Type
Description
codeListKey
String
Internal ID or alias of the code list that contains the code value.
Code
String
The code field for the code value.

GET response

The response contains the details of the code value.
The following table describes the attributes in the response body:
Field
Type
Description
codelistId
String
ID of the code list that contains the code value.
internalId
String
Internal ID of the code list that contains the code value.
alias
String
Alias of the code list that contains the code value.
businessId
Business ID of the code value.
codeValueFields
Array
Lists the attribute field values for the code value.
Code
String
The code field for the code value.
Name
String
The name field for the code value.

GET example

To retrieve the first page of code values in a code list based on its internal ID country, you might use the following request:
GET https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/codelists/country/codevalues?Code=CODE-A HTTP/1.1
Accept: application/json
IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX
The following sample response shows the details of a code value:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 237

[
{
"codelistId": "67e2590c022698651e1964c8",
"internalId": "code1",
"alias": "alias1",
"businessId": "RDM0000123",
"codeValueFields": {
"Code": "CODE-A",
"Name": "NAME-A"
}
}
]

Get latest modified code values by time range (v2)

Retrieves the latest modified code values in a code list that were created or updated during the specified period based on the internal ID or alias.
By default, the request returns the first 100 code values. To retrieve more code values or to view the next page of code values, use the query parameters. You can retrieve a maximum of 10,000 code values in a request.

GET request

To retrieve the code values in a code list that were created or updated during the specified period based on the internal ID or alias, submit a GET request with the following URI:
/rdm-service/external/v2/codelists/{codeListKey}/modifications?from=<from>&to=<to>[&pageSize=<page size>&page=<page number>]
The following table describes the parameter in the URI:
Parameter
Type
Description
codeListKey
String
Internal ID or alias of the code list from which you are retrieving the code values.
from
String
Start date and time of the time range, which is inclusive. Time range must be in the following ISO-8601 format: yyyy-MM-dd'T'HH:mm:ss'Z'. For example, you might use 2019-12-12T14:04:04Z.
to
String
End date and time of the time range, which is exclusive. Time range must be in the following ISO-8601 format: yyyy-MM-dd’T’HH:mm:ss’Z'. For example, you might use 2019-12-15T14:04:04Z.
page
Integer
Optional. Page number to display. Default is 0.
pageSize
Integer
Optional. Number of records to display per page. Default value is 100. Maximum value is 10000.

GET response

The response contains data about the created or updated code lists.
The following table describes the attributes in the response body:
Field
Type
Description
page
Number
Page number displayed.
pageSize
Number
Number of records displayed per page.
totalNumberOfElements
Number
Total number of records found.
numberOfElements
Number
Number of records returned in the current page.
lastPage
Boolean
Indicates whether the current page is the last page in the total result.
firstPage
Boolean
Indicates whether the current page is the first page in the total result.
content
Array
Includes the list of code values.
status
String
Status of the code list.
dependency
String
ID of the code value specified as the dependency.
lastUpdateDate
String
Date when the code value was last updated.
changeType
String
Type of change made to the code list. Values are MODIFIED and DELETED.
effectiveDate
String
Date when the code list became effective.
codeValueFields
Object
Includes the attribute definition for code values.

GET example

To retrieve the first page of code values in a code list that were created or updated during a specific time period based on its internal ID country , you might use the following request:
GET https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/codelists/country/codevalues/modifications?from=2019-12-11T13:29:55Z&to=2019-12-12T13:29:55Z&page=0&pageSize=100 HTTP/1.1
Accept: application/json
The following sample response shows the first page of modified code lists:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 282
{
"pageSize": 1,
"page": 0,
"totalNumberOfElements": 1000,
"numberOfElements": 1,
"lastPage": false,
"firstPage": true,
"content": [
{
"status": "Draft",
"dependency": "870d2e1b6cd2249aa48dc5db",
"lastUpdateDate": "2019-12-11T13:29:55Z",
"changeType": "MODIFIED",
"effectiveDate": "2017-04-01",
"codeValueFields": {
"Name": "NAME-A"
}
}
]
}

Get modified code value relationships in hierarchy by time range (v2)

Retrieves code value relationships in a hierarchy that were created or updated during the specified period based on the internal ID or alias. Use the API to retrieve changes to code value relationships, such as code values that moved in the hierarchy and code values added under a parent code value for code lists with internal IDs or aliases.
By default, the request returns the first 100 code values. To retrieve more code values or to view the next page of code values, use the query parameters.

GET request

To retrieve the modified code values in a hierarchical code list for a time range, submit a GET request with the following URI:
/rdm-service/external/v2/codelists/{codeListKey}/codevalues/hierarchy/modifications?from=<from>&to=<to>[&pageSize=<page size>&page=<page number>
]
The following table lists the query parameters in the URI:
Parameter
Type
Description
codeListKey
String
Internal ID or alias of the code list from which you are retrieving the code values.
from
String
Start date and time of the time range, which is inclusive. Time range must be in the following ISO-8601 format: yyyy-MM-dd'T'HH:mm:ss'Z'. For example, you might use 2019-12-12T14:04:04Z.
to
String
End date and time of the time range, which is exclusive. Time range must be in the following ISO-8601 format: yyyy-MM-dd’T’HH:mm:ss’Z'. For example, you might use 2019-12-15T14:04:04Z.
page
Integer
Optional. Page number to display. Default is 0.
pageSize
Integer
Optional. Number of records to display per page. Default value is 100. Maximum value is 10000.

GET response

The response contains data about the created or updated code value relationships for the specified time range.
The following table describes the attributes in the response body:
Field
Type
Description
page
Number
Page number displayed.
pageSize
Number
Number of records displayed per page.
totalNumberOfElements
Number
Total number of records found.
numberOfElements
Number
Number of records returned in the current page.
lastPage
Boolean
Indicates whether the current page is the last page in the total result.
firstPage
Boolean
Indicates whether the current page is the first page in the total result.
content
Array
Includes the list of code values.
lastUpdateDate
String
Included in the content object.
Update date of the last modification.
parentCode
String
Included in the content object.
Code value of the parent node.
childCode
String
Included in the content object.
Code value of the child node.

GET example

To retrieve the first page of code values relationships that were created or updated during a specific time period based on its internal ID country, you might use the following request:
GET https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v2/codelists/country/codevalues/hierarchy/modifications?from=2019-12-11T13:29:55Z&to=2019-12-12T13:29:55Z&page=0&pageSize=100 HTTP/1.1
Accept: application/json
Host: localhost:8080
The following sample response shows the first page of code value relationships that were created or updated during a specific time period:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 261

{
"pageSize":1,
"page":0,
"totalNumberOfElements":1000,
"numberOfElements":1,
"lastPage":false,
"firstPage":true,
"content":[
{
"lastUpdateDate":"2019-12-11T13:29:55Z",
"parentCode":"USA",
"childCode":"NY"
}
]
}
Note: If the code list is in draft state, some code value relationships might appear in the API response even though the code value relationships have not changed in the specified time range. For example, if you move a code value in a draft code list, the last update date of the code value updates to the date on which the code value was moved in the draft code list. The moved code value in draft code list might now meet the specified time range criteria.