Below are the various requests that can be performed against the
Resource Job resource, as well as the expected
parameters and the potential responses.
Cancel Execution
Marks a specific resource job execution for cancellation
Method And Url
POST https://api.losant.com/applications/APPLICATION_ID/resource-jobs/RESOURCE_JOB_ID/cancelExecution
Authentication
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Organization, all.User, resourceJob.*, or resourceJob.cancelExecution.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID associated with the application
575ec8687ae143cd83dc4a97
RESOURCEJOBID
ID associated with the resource job
575ec8687ae143cd83dc4a97
Request Query Parameters
Name
Required
Description
Default
Example
executionId
Y
The ID of the execution to cancel
executionId=632e18632f59592e773a4153
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X POST \
https://api.losant.com/applications/APPLICATION_ID/resource-jobs/RESOURCE_JOB_ID/cancelExecution?executionId=632e18632f59592e773a4153
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Organization, all.User, resourceJob.*, or resourceJob.delete.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID associated with the application
575ec8687ae143cd83dc4a97
RESOURCEJOBID
ID associated with the resource job
575ec8687ae143cd83dc4a97
Request Query Parameters
Name
Required
Description
Default
Example
includeWorkflows
N
If the workflows that trigger from this resource job should also be deleted.
includeWorkflows=true
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
POST https://api.losant.com/applications/APPLICATION_ID/resource-jobs/RESOURCE_JOB_ID/execute
Authentication
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Organization, all.User, resourceJob.*, or resourceJob.execute.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID associated with the application
575ec8687ae143cd83dc4a97
RESOURCEJOBID
ID associated with the resource job
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Request Body
The body of the request should be serialized JSON that validates against
the Resource Job Execution Options schema. For example, the following would be a
valid body for this request:
GET https://api.losant.com/applications/APPLICATION_ID/resource-jobs/RESOURCE_JOB_ID
Authentication
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, resourceJob.*, or resourceJob.get.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID associated with the application
575ec8687ae143cd83dc4a97
RESOURCEJOBID
ID associated with the resource job
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID/resource-jobs/RESOURCE_JOB_ID
GET https://api.losant.com/applications/APPLICATION_ID/resource-jobs/RESOURCE_JOB_ID/logs
Authentication
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, resourceJob.*, or resourceJob.logs.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID associated with the application
575ec8687ae143cd83dc4a97
RESOURCEJOBID
ID associated with the resource job
575ec8687ae143cd83dc4a97
Request Query Parameters
Name
Required
Description
Default
Example
limit
N
Max log entries to return (ordered by time descending)
1
limit=10
since
N
Look for log entries since this time (ms since epoch)
since=1465790400000
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Curl Example
curl-H'Content-Type: application/json'\-H'Accept: application/json'\-H'Authorization: Bearer YOUR_API_ACCESS_TOKEN'\-X GET \
https://api.losant.com/applications/APPLICATION_ID/resource-jobs/RESOURCE_JOB_ID/logs
A valid api access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Application, all.Organization, all.User, resourceJob.*, or resourceJob.patch.
Request Path Components
Path Component
Description
Example
APPLICATION_ID
ID associated with the application
575ec8687ae143cd83dc4a97
RESOURCEJOBID
ID associated with the resource job
575ec8687ae143cd83dc4a97
Request Headers
Name
Required
Description
Default
Authorization
Y
The token for authenticating the request, prepended with Bearer
Request Body
The body of the request should be serialized JSON that validates against
the Resource Job Patch schema. For example, the following would be a
valid body for this request: