...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
The request action is specified by appending the following paths to the endpoint URL:
Note |
---|
All requests must use one of the three supported authorization methods. In the example requests below, we use the API key + API secret authorization method. |
...
This returns the current status of the query and some other basic information.
Parameters
...
Parameter
...
Type
...
Description
...
jobId *required
...
String (path)
...
The job ID of the query. This appears in the url parameter.
...
Content-Type *required
...
String (header)
...
This must always be application/json.
...
x-logtrust-apikey *required
...
String (header)
...
The API key of the Devo domain. You can find this in the Access Keys tab of the Administration → Credentials window.
...
x-logtrust-sign *required
...
String (header)
...
HMAC SHA-256 using the API secret to sign the concatenation of the API key, body message and timestamp.
...
x-logtrust-timestamp *required
...
String (header)
...
Timestamp in milliseconds.
Example
Code Block |
---|
import requests
url = "https://apiv2-us.devo.com/search/job/3f6002a9-69cb-4495-9745-d47216fc58bf"
headers = {
'Content-Type': "application/json",
'x-logtrust-apikey': "my api key",
'x-logtrust-timestamp': "1530010004072",
'x-logtrust-sign': "e5841c4ee56a58d2918cc052136799b42c8a95aa2b947b06a91d3827f4178136",
'Cache-Control': "no-cache",
}
response = requests.request("GET", url, headers=headers)
print(response.text) |
Response
The response may contain the following fields.
...
Field name
...
Type
...
Description
...
success
...
Boolean
...
Indicates if the request was successful or not. Possible values are true
(OK) or false
(error)
...
msg
...
String
...
In the case of error, this describes what type of error occurred.
...
status
...
Integer
...
Numeric value that specifies the error code.
0
- OK1
- Invalid request
...
cid
...
String
...
This is the ID that uniquely identifies the request.
...
timestamp
...
String
...
Indicates the moment when a certain event occurred.
...
object
...
Object
...
Job_Status object containing the current status of the job, the job id, events processed, and information about any errors generated.
Example
Code Block |
---|
{
"status": 0,
"cid": "Yh7lwm6VWq",
"timestamp": 1530010004752,
"object": {
"status": "COMPLETED",
"id": "3f6002a9-69cb-4495-9745-d47216fc58bf",
"eventGenerated": 13572,
"eventsSent": 13572,
"lastDatetime": 1528278403836,
"error": []
}
} |
...
This returns the status of all the queries that the account has launched and which are currently running.
Parameters
...
Parameter
...
Type
...
Description
...
x-logtrust-apikey *required
...
String (header)
...
The API key of the Devo domain. You can find this in Access Keys tab of the Administration → Credentials window.
...
Content-Type *required
...
String (header)
...
This must always be application/json.
...
x-logtrust-sign *required
...
String (header)
...
HMAC SHA-256 using the API secret to sign the concatenation of the API key, body message and timestamp.
...
x-logtrust-timestamp *required
...
String (header)
...
Timestamp in milliseconds.
...
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
Overview
All query requests that forward their results to data storage systems like HDFS, Kafka, or S3 are assigned job IDs so that they can be monitored and managed. The job ID for a query is contained in the notification message returned to the query sender when the request is launched. This ID is used to monitor the status of the query or to manage it.
The request action is specified by appending the following paths to the endpoint URL:
Endpoints and methods | Description | ||||||
---|---|---|---|---|---|---|---|
/job/{jobId} see below | Returns the current status of the query and some other basic information. | ||||||
/jobs see below | Returns the status of all the queries launched in the domain that are currently running. | ||||||
/job/stop/{jobId} see below | Stops a currently running query. | ||||||
/job/start/{jobId} see below | Starts a query that was previously stopped. | ||||||
/job/remove/{jobId} see below | Removes a query. |
Endpoints and methods
Anchor | ||||
---|---|---|---|---|
|
/job/{jobId}
Returns the current status of the query and some other basic information.
Rw ui expands macro | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Path parametersAdd the following path parameters as part of the endpoint:
This is a request example:
The response may include the following parameters:
And this is a response example:
|
Anchor | ||||
---|---|---|---|---|
|
/jobs
This returns the status of all the queries that the account has launched and which are currently running.
Rw ui expands macro | ||||||
---|---|---|---|---|---|---|
This is a request example:
|
...
The response may include the following parameters:
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
Example
...
Code Block | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{
"status": 0,
"cid": "mrMlHGDbQC",
"timestamp": 1530009833209,
"object": [
And this is a response example:
|
...
This stops a currently running query. Once stopped, a lastDatetime
value is saved so that when the job is started again, it will pick up where it left off. The lastDatetime
parameter is contained in the object returned in the response.
Parameters
...
Parameter
...
Type
...
Description
...
jobId *required
...
String (path)
...
The job ID of the query. This appears in the url parameter
...
Content-Type *required
...
String (header)
...
This must always be application/json
...
x-logtrust-apikey *required
...
String (header)
...
The API key of the Devo domain. You can find this in Access Keys tab of the Administration → Credentials window.
...
x-logtrust-sign *required
...
String (header)
...
HMAC SHA-256 using the API secret to sign the concatenation of the API key, body message and timestamp.
...
x-logtrust-timestamp *required
...
String (header)
...
Timestamp in milliseconds.
|
Anchor | ||||
---|---|---|---|---|
|
/job/stop/{jobId}
This stops a currently running query. Once stopped, a lastDatetime
value is saved so that when the job is started again, it will pick up where it left off. The lastDatetime
parameter is contained in the object returned in the response.
Rw ui expands macro | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Path parametersAdd the following path parameters as part of the endpoint:
This is a request example:
The response may include the following parameters:
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
And this is a response example:
|
...
This starts a query that was previously stopped. The query will continue from the time saved as the lastDatetime
.
Parameters
...
Parameter
...
Type
...
Description
...
jobId *required
...
String (path)
...
The job ID of the query. This appears in the url parameter.
...
Content-Type *required
...
String (header)
...
This must always be application/json.
...
x-logtrust-apikey *required
...
String (header)
...
The API key of the Devo domain. You can find this in Access Keys tab of the Administration → Credentials window.
...
x-logtrust-sign *required
...
String (header)
...
HMAC SHA-256 using the API secret to sign the concatenation of the API key, body message and timestamp.
...
x-logtrust-timestamp *required
...
String (header)
...
Timestamp in milliseconds.
|
Anchor | ||||
---|---|---|---|---|
|
/job/start/{jobId}
This starts a query that was previously stopped. The query will continue from the time saved as the lastDatetime
.
Rw ui expands macro | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Path parametersAdd the following path parameters as part of the endpoint:
This is a request example:
The response may include the following parameters:
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
Example
...
And this is a response example:
|
...
Removes a query.
Parameters
...
Parameter
...
Type
...
Description
...
jobId *required
...
String (path)
...
The job ID of the query. This appears in the url parameter.
...
Content-Type *required
...
String (header)
...
This must always be application/json
...
x-logtrust-apikey *required
...
String (header)
...
The API key of the Devo domain. You can find this in Access Keys tab of the Administration → Credentials window.
...
x-logtrust-sign *required
...
String (header)
...
HMAC SHA-256 using the API secret to sign the concatenation of the API key, body message and timestamp.
...
x-logtrust-timestamp *required
...
String (header)
...
Timestamp in milliseconds.
|
Anchor | ||||
---|---|---|---|---|
|
/job/remove/{jobId}
Removes a query.
Rw ui expands macro | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Path parametersAdd the following path parameters as part of the endpoint:
This is a request example:
The response may include the following parameters:
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
And this is a response example:
|