You can use the Reference 360 REST APIs to import or export code values and value mappings in bulk.
REST APIs for import and export
You can use a set of REST APIs to import or export data, retrieve the status of an import job, or retrieve a failed import job report.
The following table describes the REST APIs for importing and exporting data:
REST API
Description
Import code values
Import code values into a code list.
Import value mappings
Import value mappings into a crosswalk.
Get import job status
Retrieve the status of an import job.
Get failed import job report
Retrieve an error report for a failed import job.
Export code values
Export the code values in a code list.
Export value mappings
Export the value mappings in a crosswalk.
Filter criteria
You can filter the reference data that you want to export. For example, you can export a filtered set of code values in a code list.
When you filter code values, you can only filter values in the Code attribute or values in attributes that are configured as display attributes. For example, you might want a filter to include values with 001 in the Code attribute.
Field types
The filter operators available depends on the field type of the attribute.
The following table describes the filter operators supported for each field type:
Field Type
Supported Filter Operators
Filter Values
Boolean
_equals
_notEquals
_isEmpty
Boolean
Decimal or Integer
_equals
_notEquals
_isEmpty
_greaterThan
_greaterThanEquals
_lessThan
_lessThanEquals
Number
String
_equals
_notEquals
_isEmpty
_startsWith
_endsWith
_contains
_notContains
Text
Date
_equals
_notEquals
_isEmpty
_from, _to, _range
ISO 8601 date or date and time
For example, 2019-12-24 or 1969-12-15T14:17:04Z.
Reference Data
_equals
_notEquals
_isEmpty
_in
Values in the Code attribute or values in the display attributes for the reference data.
Filter examples
To filter assets with text fields that are empty, you might use the following filter operator:
{ "textField":{ "_isEmpty":true } }
To filter assets with boolean fields that are equal to true, you might use the following filter operator:
{ "booleanField":{ "_equals":true } }
To filter assets with number fields that are greater than 1 and less than 2, you might use the following filter operators:
When you use a comma to separate operators inside a field, the comma acts like an _and operator. For example, the following examples filters for a name that starts with "Ger" and ends with "many", or equals "Japan":
You can import code values into a code list. After you start an import job, you can check the status of the import job. If the import job fails, you can retrieve an error report.
Before you begin, you must get a session ID and identify the asset ID. The session ID authenticates your requests. The asset ID is the ID of the code list to which you want to import code values. For more information, see Session IDs and Asset IDs.
1To import code values into a code list, use the Import code values REST API.
For more information about the Import code values REST API, see Import code values.
For example, the following request imports code values:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v1/import HTTP/1.1 Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX
2To check the status of an import job, use the Get import job status REST API.
For more information about the Get import job status REST API, see Get import job status.
For example, the following request retrieves the status of an import job:
GET https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v1/import/job/dd1b2018cb47cef99f8d0f42 HTTP/1.1 IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX
For example, the Get import job status REST API returns the following status of the import job:
For example, the following request retrieves the error report for a failed import job:
GET https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v1/import/job/dd1b2018cb47cef99f8d0f42/errorDetails HTTP/1.1 IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX
For example, the Get failed import job report REST API returns the following details of the failed import job:
HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 Content-Length: 354
{ "jobId":"dd1b2018cb47cef99f8d0f42", "entityType":"Relationship", "fileName":"import.csv", "entityName":"rdm.crosswalk.rel.21ffd6b5f92d10c744acc27c.fc66c441288cf898c6fe5023", "errorDetails":[ { "lineNumber":1, "entitySourcePkey":"AF_AFG", "reasons":[ "The requested resource with ID 'AFG' does not exist." ] } ] }
Importing value mappings
You can import value mappings into a crosswalk. After you start an import job, you can check the status of the import job. If the import job fails, you can retrieve an error report.
Before you begin, you must get a session ID and identify the asset ID. The session ID authenticates your requests. The asset ID is the ID of the crosswalk to which you want to import value mappings. For more information, see Session IDs and Asset IDs.
1To import value mappings into a crosswalk, use the Import value mappings REST API.
For more information about the Import value mappings REST API, see Import value mappings.
For example, the following request imports value mappings:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v1/import HTTP/1.1 Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX
Note: You use the job ID to check the status of an import job.
2To check the status of an import job, use the Get import job status REST API.
For more information about the Get import job status REST API, see Get import job status.
For example, the following request retrieves the status of an import job:
GET https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v1/import/job/dd1b2018cb47cef99f8d0f43 HTTP/1.1 IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX
For example, the Get import job status REST API returns the following status of the import job:
For example, the following request retrieves the error report for a failed import job:
GET https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v1/import/job/dd1b2018cb47cef99f8d0f43/errorDetails HTTP/1.1 IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX
For example, the Get error report for failed import job REST API returns the following error report:
HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 Content-Length: 354
{ "jobId":"dd1b2018cb47cef99f8d0f43", "entityType":"Relationship", "fileName":"import.csv", "entityName":"rdm.crosswalk.rel.21ffd6b5f92d10c744acc27c.fc66c441288cf898c6fe5023", "errorDetails":[ { "lineNumber":1, "entitySourcePkey":"AF_AFG", "reasons":[ "The requested resource with ID 'AFG' does not exist." ] } ] }
Exporting code values
Export code values in a code list.
Before you begin, you must get a session ID and identify the asset ID. The session ID authenticates your requests. The asset ID is the ID of the code list that contains the code values that you want to export. For more information, see Session IDs and Asset IDs.
To export code values in a code list, use the Export code values REST API.
Export filtered code values based on filter criteria. You can filter code values based on values in attributes or reference data attributes.
Before you begin, you must get a session ID and identify the asset ID. The session ID authenticates your requests. The asset ID is the ID of the code list that contains the code values that you want to export. For more information, see Session IDs and Asset IDs.
1To export code values that contain a status, use the Export code values API with a filter operator for the status field.
For more information about the Export code values REST API, see Exporting code values.
For example, the following request exports code values with any status:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v1/export HTTP/1.1 Content-Type: application/json Accept: application/octet-stream IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX
Note: The containerId attribute is the ID of the code list that contains the code values that you want to export.
For example, the Export code values REST API exports the following CSV file with the data:
HTTP/1.1 200 OK Content-Disposition: attachment;filename=testdata.csv Content-Type: application/octet-stream Content-Length: 124
status.key;effectiveDate;Name;Code;Description status.status.key;effectiveDate;Name;Code;Description Active;;US;001;United States of America Active;;CAN;002;Canada
2To export filtered code values based on a display attribute for a reference data attribute and an attribute, use the Export code values API with multiple filter operators.
For more information about the Export code values REST API, see Exporting code values.
For example, the following request exports filtered code values that contain Dollar in the Name display attribute for the Currency reference data attribute and 00 in the Code attribute:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v1/export HTTP/1.1 Content-Type: application/json Accept: application/octet-stream IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX
Note: The containerId attribute is the ID of the code list that contains the code values that you want to export.
For example, the Export code values REST API exports the following CSV file with the data:
HTTP/1.1 200 OK Content-Disposition: attachment;filename=testdata.csv Content-Type: application/octet-stream Content-Length: 124
status.key;effectiveDate;Name;Code;Description;Currency.Code status.status.key;effectiveDate;Name;Code;Currency.Currency.Code Active;;US;001;United States of America;USD Active;;CAN;002;Canada;CAD
Note: When you filter on a specific display attribute for a reference data attribute, the filtered code values appear in the CSV file, but the code value is represented by the Code attribute.
3To export filtered code values based on a reference data attribute and an attribute, use the Export code values API with multiple filter operators.
For more information about the Export code values REST API, see Exporting code values.
For example, the following request exports filtered code values with EUR in the Currency reference data attribute and an in the Name attribute:
POST https://use4-mdm.dm-us.informaticacloud.com/rdm-service/external/v1/export HTTP/1.1 Content-Type: application/json Accept: application/octet-stream IDS-SESSION-ID: XXXXXXXXXXXXXXXXXXXXXX
Note: When you filter on values in a reference data attribute without specifying a display attribute to filter on, the filter applies on values in the Code attribute.
Exporting value mappings
Export value mappings in a crosswalk.
Before you begin, you must get a session ID and identify the asset ID. The session ID authenticates your requests. The asset ID is the ID of the crosswalk that contains the value mappings that you want to export. For more information, see Session IDs and Asset IDs.
To export value mappings in a crosswalk, use the Export value mappings REST API.