V11 SP8
Loading...

Importing Data to Data Cube Sources (REST API: POST)

The POST data sources API allows you to update the data and properties of the data source in Data Cube.

Request

Syntax

POST <webservice>/api/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 json or csv.
dataSourceId The id number of the data source that you want to use. If the data source ID is unkown, use View Data Sources and Properties in Data Cube (REST API: GET) to retrieve it.

Request Headers

Name Description
Accept The format of the response data. Valid values are: application/json or application/xml.
Authtoken The authentication token received after successfully logging on to the Web Console.
Content-type The media type contained in the request body. Valid values are:
  • application/json, for request body sent in JSON format
  • text/plain, for request body sent in XML format

Request Body

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

Response

Response Parameters

Parameter Description Element
errorCode The possible error codes.

Valid values are:

  • 0, successful completion.
  • 2, a failure.
  • a specific error code.
response

Examples

The following examples are for a file system data source:

Sample Request

GET <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

Sample Response

<DM2ContentIndexing_Error errorCode="0" />

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