Table of Contents

Search

  1. Preface
  2. Introducing Reference 360
  3. Getting started with Reference 360
  4. Manage system reference data
  5. Manage reference data sets
  6. Manage code lists
  7. Manage code values
  8. Manage crosswalks
  9. Import data
  10. Manage hierarchies
  11. Manage attributes
  12. Manage workflows
  13. Manage jobs
  14. Reference 360 REST API
  15. Glossary

Reference 360

Reference 360

Create a code value (v2)

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:
  • The attribute names are case-sensitive.
  • Use camel case for name and code attributes and lowercase for other fields, such as dependency.
  • Use string data type for a decimal attribute.
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 }

Back to Top

0 COMMENTS

We’d like to hear from you!