All URIs are relative to https://api.artik.cloud/v1.1
Method | HTTP request | Description |
---|---|---|
exportRequest | POST /messages/export | Create Export Request |
getExportHistory | GET /messages/export/history | Get Export History |
getExportResult | GET /messages/export/{exportId}/result | Get Export Result |
getExportStatus | GET /messages/export/{exportId}/status | Check Export Status |
ExportRequestResponse exportRequest(exportRequestInfo)
Create Export Request
Export normalized messages. The following input combinations are supported:<br/><table><tr><th>Combination</th><th>Parameters</th><th>Description</th></tr><tr><td>Get by users</td><td>uids</td><td>Search by a list of User IDs. For each user in the list, the current authenticated user must have read access over the specified user.</td></tr><tr><td>Get by devices</td><td>sdids</td><td>Search by Source Device IDs.</td></tr><tr><td>Get by device types</td><td>uids,sdtids</td><td>Search by list of Source Device Type IDs for the given list of users.</td></tr><tr><td>Get by trial</td><td>trialId</td><td>Search by Trial ID.</td></tr><tr><td>Get by combination of parameters</td><td>uids,sdids,sdtids</td><td>Search by list of Source Device IDs. Each Device ID must belong to a Source Device Type ID and a User ID.</td></tr><tr><td>Common</td><td>startDate,endDate,order,format,url,csvHeaders</td><td>Parameters that can be used with the above combinations.</td></tr></table>
var ArtikCloud = require('artikcloud-js');
var defaultClient = ArtikCloud.ApiClient.default;
// Configure OAuth2 access token for authorization: artikcloud_oauth
var artikcloud_oauth = defaultClient.authentications['artikcloud_oauth'];
artikcloud_oauth.accessToken = "YOUR ACCESS TOKEN"
var apiInstance = new ArtikCloud.ExportApi()
var exportRequestInfo = new ArtikCloud.ExportRequestInfo(); // {ExportRequestInfo} ExportRequest object that is passed in the body
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.exportRequest(exportRequestInfo, callback);
Name | Type | Description | Notes |
---|---|---|---|
exportRequestInfo | ExportRequestInfo | ExportRequest object that is passed in the body |
- Content-Type: Not defined
- Accept: application/json
ExportHistoryResponse getExportHistory(opts)
Get Export History
Get the history of export requests.
var ArtikCloud = require('artikcloud-js');
var defaultClient = ArtikCloud.ApiClient.default;
// Configure OAuth2 access token for authorization: artikcloud_oauth
var artikcloud_oauth = defaultClient.authentications['artikcloud_oauth'];
artikcloud_oauth.accessToken = "YOUR ACCESS TOKEN"
var apiInstance = new ArtikCloud.ExportApi()
var opts = {
'trialId': "trialId_example", // {String} Filter by trialId.
'count': 56, // {Number} Pagination count.
'offset': 56 // {Number} Pagination offset.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getExportHistory(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
trialId | String | Filter by trialId. | [optional] |
count | Number | Pagination count. | [optional] |
offset | Number | Pagination offset. | [optional] |
- Content-Type: Not defined
- Accept: application/json
'String' getExportResult(exportId)
Get Export Result
Retrieve result of the export query in tgz format. The tar file may contain one or more files with the results.
var ArtikCloud = require('artikcloud-js');
var defaultClient = ArtikCloud.ApiClient.default;
// Configure OAuth2 access token for authorization: artikcloud_oauth
var artikcloud_oauth = defaultClient.authentications['artikcloud_oauth'];
artikcloud_oauth.accessToken = "YOUR ACCESS TOKEN"
var apiInstance = new ArtikCloud.ExportApi()
var exportId = "exportId_example"; // {String} Export ID of the export query.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getExportResult(exportId, callback);
Name | Type | Description | Notes |
---|---|---|---|
exportId | String | Export ID of the export query. |
'String'
- Content-Type: Not defined
- Accept: application/json
ExportStatusResponse getExportStatus(exportId)
Check Export Status
Check status of the export query.
var ArtikCloud = require('artikcloud-js');
var defaultClient = ArtikCloud.ApiClient.default;
// Configure OAuth2 access token for authorization: artikcloud_oauth
var artikcloud_oauth = defaultClient.authentications['artikcloud_oauth'];
artikcloud_oauth.accessToken = "YOUR ACCESS TOKEN"
var apiInstance = new ArtikCloud.ExportApi()
var exportId = "exportId_example"; // {String} Export ID of the export query.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getExportStatus(exportId, callback);
Name | Type | Description | Notes |
---|---|---|---|
exportId | String | Export ID of the export query. |
- Content-Type: Not defined
- Accept: application/json