Loading...

Importing Data to Data Cube Sources (POST API)

This operation updates the data and the properties of a data source in Data Cube.

Request

Syntax

POST <webservice>/dcube/post/{format}/{datasourceId} HTTP/1.1
Accept: {application/json | application/xml}
Content-type: {application/json | text/plain}
Authtoken: <authentication token>

<request body>

where <webservice> is the root path used to route the API requests to the Web Server.

For more information, see Available Web Services for REST API.

Request Parameters

Name

Description

format

The format of the request body.

Valid values are as follows:

  • json
  • csv

datasourceId

The ID number of the data source that you want to use.

If the data source ID is unknown, then use the GET API to retrieve it. For more information, see View Data Sources and Properties in Data Cube (REST API: GET).

Request Headers

Name

Description

Accept

The format of the response data. Valid values are application/xml or application/json.

Authtoken

The authentication token that is received after successfully logging on. For more information about receiving an authentication token, see Authentication.

Content-type

The media type contained in the request body.

Valid values are as follows:

  • For a request body in JSON format: application/json
  • For a request body in XML format: text/plain

Request Body

The request body contains the JSON or CSV data that you want to add to the data source. The format of the request body must match the parameter in the request.

Response

Response Parameters

Parameter

Description

Element

errorCode

The possible error codes.

Valid values are as follows:

  • 0: A successful completion
  • 2: A failure
  • A specific error code

response

Example

This example is for a file system data source.

Note: You can view example requests and responses for individual data sources on the REST API page for the data source in Data Cube. For more information, see Viewing REST APIs for Data Sources.

Example Request

POST <webservice>/dcube/post/csv/4841 HTTP/1.1 HTTP/1.1
Host: client.mydomain.com
Accept: application/xml
Content-type: text/plain
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc6
0f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f
8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f
40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef7
68fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f323
3d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8

AccessTime,ClientId,CreatedTime,DenyAccessSID,DenyAccessUserName,DocumentType,FileContentHash,FileExtension,FileName,FileNameModifiedTimeHash
v_00,v_01,v_02,v_03,v_04,v_05,v_06,v_07,v_08,v_09
v_10,v_11,v_12,v_13,v_14,v_15,v_16,v_17,v_18,v_19
v_20,v_21,v_22,v_23,v_24,v_25,v_26,v_27,v_28,v_29
v_30,v_31,v_32,v_33,v_34,v_35,v_36,v_37,v_38,v_39
v_40,v_41,v_42,v_43,v_44,v_45,v_46,v_47,v_48,v_49

Example Response

<DM2ContentIndexing_Error errorCode="0" />

Last modified: 9/5/2019 3:31:03 PM