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

Importing code values

Importing code values

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.
  1. To 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 --6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm Content-Disposition: form-data; name=file; filename=import-code-values.csv --6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm Content-Disposition: form-data; name=importSettings Content-Type: application/json;charset=UTF-8 { "delimiter":"COMMA", "textQualifier":"DOUBLE_QUOTE", "codepage":"UTF8", "dateFormat":"ISO", "containerType":"CODELIST", "containerId":"9ab3201990a54dcdc86f54cf", "startingRow":null } --6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
    The CSV file might contain the following header rows and data rows:
    Name,Code Name,Code Afghanistan,AFG Aland Islands,ALA Albania,ALB Algeria,DZA American Samoa,ASM
    The
    containerId
    attribute is the ID of the code list to which you want to import code values.
    For example, the Import code values REST API returns the following job ID and details about the import job:
    { "jobId":"dd1b2018cb47cef99f8d0f42", "state":"INPROGRESS", "startTime":1561367377428, "numOfRecordsProcessed":100, "numOfRecordsFailed":25, "numOfRecordsSucceeded":75 }
  2. To 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:
    HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 Content-Length: 193 { "jobId":"dd1b2018cb47cef99f8d0f42", "state":"INPROGRESS", "startTime":1561367376330, "numOfRecordsProcessed":100, "numOfRecordsFailed":25, "numOfRecordsSucceeded":75 }
  3. To retrieve an error report for a failed import job, use the Get failed import job report REST API.
    For more information about the Get failed import job report REST API, see Get failed import job report.
    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." ] } ] }

0 COMMENTS

We’d like to hear from you!