This operation returns the data for a data source handler in Data Cube.
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.
Request
Syntax
GET <webservice>/dcube/handler/{dataSourceId}/{handlerName}?wt={wt}&q={q}&sort={SortField SortStyle}&start={start}&rows={rows}&fq={fq}&fl={CommaSeparatedFields} HTTP/1.1
Accept: {application/xml, application/json, text/plain}
Authtoken: <authentication token>
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 | Required |
---|---|---|
dataSourceId | The data source ID for the data source. If the data source ID is unknown, use the View Data Sources and Properties (REST API: GET) API to retrieve it. | Yes |
handlerName | The name of the data source handler that you want to use. If the handler name is unknown, use View Data Sources and Properties in Data Cube (REST API: GET) to retrieve it. | Yes |
wt | The format of the response. Valid values are as follows:
| No |
q | The query used to return the data. To return all of the data, use Only items that match the query are returned in the response. | No |
sort | The field to sort by and the sort order. For example, Valid values are:
| No |
start | The number of the item to appear first in the response. For example, to skip the first 10 items in response, use the start="10" parameter. | No |
rows | The maximum number of items to return in the response. | No |
fq | The filter query that limits items in the response. You can use this parameter to refine the response, and to return only items that have a certain key-value pair that matches the filter query parameter. | No |
fl | A comma separated list of fields to return in the response. For example, Only the values of the defined fields are included in the response. Sample values:
| No |
Request Headers
Name | Description |
---|---|
Accept | The format of the response data. Valid values are:
|
Authtoken | The authentication token received after successfully logging on. For details about receiving an authentication token, see Request an Authentication Token. |
Response
Response Parameters
Parameter | Description | Element |
---|---|---|
doc | The element that represents a document in the response. | result |
FileName | The name of the file. | doc |
ClientId | The client id where the file is located. | doc |
DocumentType | The document type for the object. 1 is file and 4 is folder. | doc |
AccessTime | The time stamp for the last time the file was accessed. | doc |
CreatedTime | The time stamp for when the file was created. | doc |
FileNameModifiedTimeHash | A unique hash to determine if a file has been modified since the previous crawl of the data source. | doc |
Examples
The following examples are for a file system data source.
Example Request
GET <webservice>/dcube/handler/2558/default?wt=xml&q=*:*&rows=1&fl=AccessTime,ClientId,CreatedTime,DenyAccessSID,DenyAccessUserName,DocumentType,FileContentHash,FileExtension,FileName,FileNameModifiedTimeHash HTTP/1.1
Host: client.mydomain.com
Accept: application/xml
Content-type: text/plain
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc6
0f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f
8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f
40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef7
68fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f323
3d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8
Example Response
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
<lst name="params">
<str name="q">*:*</str>
<str name="fl">AccessTime,ClientId,CreatedTime,DenyAccessSID,DenyAccessUserName,DocumentType,FileContentHash,FileExtension,FileName,FileNameModifiedTimeHash</str>
<str name="csrf">-88wisozack7</str>
<str name="rows">1</str>
<str name="wt">xml</str>
</lst>
</lst>
<result name="response" numFound="458" start="0">
<doc>
<str name="FileName">Document 1</str>
<int name="ClientId">0</int>
<int name="DocumentType">4</int>
<date name="AccessTime">2017-01-22T08:04:38Z</date>
<date name="CreatedTime">2017-01-22T08:04:37Z</date>
<str name="FileNameModifiedTimeHash">8669d2a52f507bf5c8daae3ed586a8f3</str>
</doc>
</result>
</response>