Bulk import domain entries

post/domainEntries
Internal-Use Only

The input is CSV with a header row that specifies the order of these columns: lookup_nm description folder_path name value or

On each row in the lookup_nm column, the name of a reference data domain is specified. The description column is the description of the domain. In the folder_path column, the containing folder of the domain is specified. A valid folder value: begins with the / character has no consecutive / characters does not end in the / character

The name column holds a key of the domain entry. The value column holds a value of the domain entry. Only the description column can be blank. Labels cannot be applied to the key and value from this operation. The updateReferenceDataDomainContent operation can be used instead to add the labels. The disabled column is used by the value list. It is a boolean value, which indicates whether the entry is disabled. The entity_sq_no is used only by the value list. It points out the order of the entry within the entries of the value list. The type_nm is the type name of the object. It could be "lookup" or "valueList". The bulk import creates the domain or value list in the supplied folder if an identically named domain or value list does not already exist. If the domain or value list already exists, then the entries in the latest domain or value list content are deleted and the entries from the input CSV are added. If the latest domain or value list content has the "production" status, the "delete" and "add" operations cannot be done. Each domain or value list in a folder has a unique name. However, the same domain or value list name can be used in another folder.

The input CSV is processed in the order it is received. All contiguous rows with the same domain name and folder path are considered one section. Those rows are processed according to the description above. It is possible to have the same domain name and folder path appearing in non-consecutive sections. In that case, the subsequent section is considered a replacement of the domain entries from the previous section. The service tries to process as many rows as possible.

The output is a multipart/mixed response body. The boundary string of each part is identified in the Content-Type response header. There are three parts in this response. The first part is for the accepted CSV (header Content-ID: Accepted-CSV). Each row that was successfully imported is included here. As soon as a domain is processed, the successful rows are streamed back. The second part is for the rejected CSV (header Content-ID:Rejected-CSV). Each CSV row that failed processing is identified here. It is in CSV format with the following column order: record number in the entire CSV input, lookup_nm, description, folder_path, name, value, and error message. The third part is for global issues (header Content-ID: Global-Issue). It is in CSV format with the following column order: lookup_nm and error message. The message conveys the error at the domain level that prevents any CSV importing. An example would be the lack of permissions to create the containing folder. If this error applies to the entire input, the lookup_nm column has an asterisk. If this error applies to only a domain, then the domain is identified in the lookup_nm column.

Request Samples

1

Response Samples

1
2 --_001_002_003_004_005_006_007_008_009_010_011_012_ Content-Type: text/csv; charset="utf-8" Content-ID: Accepted-CSV
3
4--_001_002_003_004_005_006_007_008_009_010_011_012_ Content-Type: text/csv; charset="utf-8" Content-ID: Rejected-CSV
51,Cars_Lookup_8185538845,Terminology lookup,/Public,Cylinders,There are 4 columns in this record, but there should be 5 or 7 columns. 2,Cars_Lookup_8185538845,Terminology lookup,/Public,DriveTrain,There are 4 columns in this record, but there should be 5 or 7 columns.
6--_001_002_003_004_005_006_007_008_009_010_011_012_ Content-Type: text/csv; charset="utf-8" Content-ID: Global-Issue --_001_002_003_004_005_006_007_008_009_010_011_012_--

Header Parameters

NameTypeRequiredDescription
If-Unmodified-Since
string
false

Checks to see whether the existing domains identified in the CSV have not been modified since the time specified in the value. If this is not true, the update is not performed.

Accept
string
true

In addition to multipart/mixed, also include application/json in the Accept header to prevent the true operation error from being masked by the HTTP status 406 error. The media types are separated by a comma.

Allowed value:
multipart/mixed, application/json

Request Body

The CSV that contains a header row.

Responses

StatusMeaningDescription
200OKThe request succeeded. One or more entries were created or updated. Check the response for any error.HeadersSchema
400Bad RequestThe request was invalid. No entry was imported.Schema
404Not FoundNo resource exists at the requested path. The URI was not found.Schema
406Not AcceptableThe media type is incompatible. Occurs when there is an error but the error response media type is not compatible with the multipart/mixed media type. The REST client or browser returns this status error instead.Schema
412Precondition FailedThe `If-Unmodified-Since` request header did not match the resource's last modified timestamp. The resources have changed.Schema