Instance Custom Node Actions
https://api.losant.com/instances/INSTANCE_ID
/nodes/INSTANCE_CUSTOM_NODE_ID
Below are the various requests that can be performed against the Instance Custom Node resource, as well as the expected parameters and the potential responses.
Delete
Deletes a Custom Node
Method And Url
DELETE https://api.losant.com/instances/INSTANCE_ID
/nodes/INSTANCE_CUSTOM_NODE_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.Instance
, all.User
, instanceCustomNode.*
, or instanceCustomNode.delete
.
Request Path Components
Path Component | Description | Example |
---|---|---|
INSTANCE_ID | ID associated with the instance | 575ec7417ae143cd83dc4a96 |
INSTANCE_CUSTOM_NODE_ID | ID associated with the Custom Node | 575ec7417ae143cd83dc4a95 |
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 DELETE \
https://api.losant.com/instances/INSTANCE_ID/nodes/INSTANCE_CUSTOM_NODE_ID
Successful Responses
Code | Type | Description |
---|---|---|
200 | Success | If Custom Node was successfully deleted |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if Custom Node was not found |
Errors
Get information about errors that occurred during runs of this Custom Node
Method And Url
GET https://api.losant.com/instances/INSTANCE_ID
/nodes/INSTANCE_CUSTOM_NODE_ID
/errors
Authentication
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Instance
, all.Instance.read
, all.User
, all.User.read
, instanceCustomNode.*
, or instanceCustomNode.errors
.
Request Path Components
Path Component | Description | Example |
---|---|---|
INSTANCE_ID | ID associated with the instance | 575ec7417ae143cd83dc4a96 |
INSTANCE_CUSTOM_NODE_ID | ID associated with the Custom Node | 575ec7417ae143cd83dc4a95 |
Request Query Parameters
Name | Required | Description | Default | Example |
---|---|---|---|---|
duration | N | Duration of time range in milliseconds | 86400000 | duration=86400000 |
end | N | End of time range in milliseconds since epoch | 0 | end=0 |
limit | N | Maximum number of errors to return | 25 | limit=25 |
sortDirection | N | Direction to sort the results by. Accepted values are: asc, desc | desc | sortDirection=desc |
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/instances/INSTANCE_ID/nodes/INSTANCE_CUSTOM_NODE_ID/errors
Successful Responses
Code | Type | Description |
---|---|---|
200 | Workflow Errors | Custom Node error information |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if Custom Node was not found |
Get
Retrieves information on a Custom Node
Method And Url
GET https://api.losant.com/instances/INSTANCE_ID
/nodes/INSTANCE_CUSTOM_NODE_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.Instance
, all.Instance.read
, all.User
, all.User.read
, instanceCustomNode.*
, or instanceCustomNode.get
.
Request Path Components
Path Component | Description | Example |
---|---|---|
INSTANCE_ID | ID associated with the instance | 575ec7417ae143cd83dc4a96 |
INSTANCE_CUSTOM_NODE_ID | ID associated with the Custom Node | 575ec7417ae143cd83dc4a95 |
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/instances/INSTANCE_ID/nodes/INSTANCE_CUSTOM_NODE_ID
Successful Responses
Code | Type | Description |
---|---|---|
200 | Instance Custom Node | Custom Node information |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if Custom Node was not found |
Patch
Updates information about a Custom Node
Method And Url
PATCH https://api.losant.com/instances/INSTANCE_ID
/nodes/INSTANCE_CUSTOM_NODE_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.Instance
, all.User
, instanceCustomNode.*
, or instanceCustomNode.patch
.
Request Path Components
Path Component | Description | Example |
---|---|---|
INSTANCE_ID | ID associated with the instance | 575ec7417ae143cd83dc4a96 |
INSTANCE_CUSTOM_NODE_ID | ID associated with the Custom Node | 575ec7417ae143cd83dc4a95 |
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 Instance Custom Node Patch schema. For example, the following would be a valid body for this request:
{
"name": "My Updated Instance Custom Node",
"category": "logic"
}
Curl Example
curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X PATCH \
-d '{"name":"My Updated Instance Custom Node","category":"logic"}' \
https://api.losant.com/instances/INSTANCE_ID/nodes/INSTANCE_CUSTOM_NODE_ID
Successful Responses
Code | Type | Description |
---|---|---|
200 | Instance Custom Node | Updated Custom Node information |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if Custom Node was not found |
Stats
Get statistics about runs for this Custom Node
Method And Url
GET https://api.losant.com/instances/INSTANCE_ID
/nodes/INSTANCE_CUSTOM_NODE_ID
/stats
Authentication
A valid API access token is required to access this endpoint. The token must
include at least one of the following scopes:
all.Instance
, all.Instance.read
, all.User
, all.User.read
, instanceCustomNode.*
, or instanceCustomNode.stats
.
Request Path Components
Path Component | Description | Example |
---|---|---|
INSTANCE_ID | ID associated with the instance | 575ec7417ae143cd83dc4a96 |
INSTANCE_CUSTOM_NODE_ID | ID associated with the Custom Node | 575ec7417ae143cd83dc4a95 |
Request Query Parameters
Name | Required | Description | Default | Example |
---|---|---|---|---|
duration | N | Duration of time range in milliseconds | 86400000 | duration=86400000 |
end | N | End of time range in milliseconds since epoch | 0 | end=0 |
resolution | N | Resolution in milliseconds | 3600000 | resolution=3600000 |
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/instances/INSTANCE_ID/nodes/INSTANCE_CUSTOM_NODE_ID/stats
Successful Responses
Code | Type | Description |
---|---|---|
200 | Workflow Statistics | Statistics for Custom Node runs |
Error Responses
Code | Type | Description |
---|---|---|
400 | Error | Error if malformed request |
404 | Error | Error if Custom Node was not found |
Schemas
Error
Schema for errors returned by the API
Error Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 2 keys
- ▶{} 1 key
- ▶{} 1 key
Error Example
- ▶{} 2 keys
- "NotFound"
- "Application was not found"
Workflow Errors
Workflow run error information
Workflow Errors Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 8 keys
- ▶{} 3 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 1 key
- ▶{} 2 keys
- ▶{} 2 keys
Workflow Errors Example
- ▶{} 5 keys
- "2016-06-03T00:00:00.000Z"
- "2016-06-04T00:00:00.000Z"
- 25
- "desc"
- ▶[] 1 item
Workflow Statistics
Statistics about the runs for a given workflow
Workflow Statistics Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 7 keys
- ▶{} 3 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 1 key
- ▶{} 2 keys
Workflow Statistics Example
- ▶{} 4 keys
- "2016-06-03T00:00:00.000Z"
- "2016-06-04T00:00:00.000Z"
- 86400000
- ▶[] 1 item
Instance Custom Node
Schema for a single Instance Custom Node
Instance Custom Node Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 25 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 3 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 3 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 3 keys
- ▶{} 2 keys
- ▶{} 4 keys
- ▶{} 3 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 3 keys
- ▶{} 3 keys
- ▶{} 4 keys
Instance Custom Node Example
- ▶{} 11 keys
- "575ed18f7ae143cd83dc4aa6"
- "575ed18f7ae143cd83dc4aa6"
- "575ec8687ae143cd83dc4a97"
- "2016-06-13T04:00:00.000Z"
- "2016-06-13T04:00:00.000Z"
- "My Instance Custom Node"
- "Description of my instance custom node"
- ▶[] 1 item
- ▶[] 1 item
- ▶{} 1 key
- ▶{} 2 keys
Instance Custom Node Patch
Schema for the body of a Instance Custom Node modification request
Instance Custom Node Patch Schema
- ▶{} 5 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 11 keys
- ▶{} 3 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 1 key
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 2 keys
- ▶{} 4 keys
- ▶{} 3 keys
- ▶{} 1 key
- 25
Instance Custom Node Patch Example
- ▶{} 2 keys
- "My Updated Instance Custom Node"
- "logic"
Success
Schema for reporting a successful operation
Success Schema
- ▶{} 3 keys
- "http://json-schema.org/draft-07/schema#"
- "object"
- ▶{} 1 key
- ▶{} 2 keys
Success Example
- ▶{} 1 key
- true
Was this page helpful?
Still looking for help? You can also search the Losant Forums or submit your question there.