Skip to content

Latest commit

 

History

History
220 lines (152 loc) · 7.34 KB

File metadata and controls

220 lines (152 loc) · 7.34 KB

artikcloud.ExportApi

All URIs are relative to https://api.artik.cloud/v1.1

Method HTTP request Description
export_request POST /messages/export Create Export Request
get_export_history GET /messages/export/history Get Export History
get_export_result GET /messages/export/{exportId}/result Get Export Result
get_export_status GET /messages/export/{exportId}/status Check Export Status

export_request

ExportRequestResponse export_request(export_request_info)

Create Export Request

Export normalized messages. The following input combinations are supported:

CombinationParametersDescription
Get by usersuidsSearch by a list of User IDs. For each user in the list, the current authenticated user must have read access over the specified user.
Get by devicessdidsSearch by Source Device IDs.
Get by device typesuids,sdtidsSearch by list of Source Device Type IDs for the given list of users.
Get by trialtrialIdSearch by Trial ID.
Get by combination of parametersuids,sdids,sdtidsSearch by list of Source Device IDs. Each Device ID must belong to a Source Device Type ID and a User ID.
CommonstartDate,endDate,order,format,url,csvHeadersParameters that can be used with the above combinations.

Example

from __future__ import print_statement
import time
import artikcloud
from artikcloud.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: artikcloud_oauth
artikcloud.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = artikcloud.ExportApi()
export_request_info = artikcloud.ExportRequestInfo() # ExportRequestInfo | ExportRequest object that is passed in the body

try: 
    # Create Export Request
    api_response = api_instance.export_request(export_request_info)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExportApi->export_request: %s\n" % e)

Parameters

Name Type Description Notes
export_request_info ExportRequestInfo ExportRequest object that is passed in the body

Return type

ExportRequestResponse

Authorization

artikcloud_oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_export_history

ExportHistoryResponse get_export_history(trial_id=trial_id, count=count, offset=offset)

Get Export History

Get the history of export requests.

Example

from __future__ import print_statement
import time
import artikcloud
from artikcloud.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: artikcloud_oauth
artikcloud.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = artikcloud.ExportApi()
trial_id = 'trial_id_example' # str | Filter by trialId. (optional)
count = 56 # int | Pagination count. (optional)
offset = 56 # int | Pagination offset. (optional)

try: 
    # Get Export History
    api_response = api_instance.get_export_history(trial_id=trial_id, count=count, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExportApi->get_export_history: %s\n" % e)

Parameters

Name Type Description Notes
trial_id str Filter by trialId. [optional]
count int Pagination count. [optional]
offset int Pagination offset. [optional]

Return type

ExportHistoryResponse

Authorization

artikcloud_oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_export_result

str get_export_result(export_id)

Get Export Result

Retrieve result of the export query in tgz format. The tar file may contain one or more files with the results.

Example

from __future__ import print_statement
import time
import artikcloud
from artikcloud.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: artikcloud_oauth
artikcloud.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = artikcloud.ExportApi()
export_id = 'export_id_example' # str | Export ID of the export query.

try: 
    # Get Export Result
    api_response = api_instance.get_export_result(export_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExportApi->get_export_result: %s\n" % e)

Parameters

Name Type Description Notes
export_id str Export ID of the export query.

Return type

str

Authorization

artikcloud_oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_export_status

ExportStatusResponse get_export_status(export_id)

Check Export Status

Check status of the export query.

Example

from __future__ import print_statement
import time
import artikcloud
from artikcloud.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: artikcloud_oauth
artikcloud.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = artikcloud.ExportApi()
export_id = 'export_id_example' # str | Export ID of the export query.

try: 
    # Check Export Status
    api_response = api_instance.get_export_status(export_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExportApi->get_export_status: %s\n" % e)

Parameters

Name Type Description Notes
export_id str Export ID of the export query.

Return type

ExportStatusResponse

Authorization

artikcloud_oauth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]