Skip to main content

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 ComponentDescriptionExample
INSTANCE_IDID associated with the instance575ec7417ae143cd83dc4a96
INSTANCE_CUSTOM_NODE_IDID associated with the Custom Node575ec7417ae143cd83dc4a95

Request Headers

NameRequiredDescriptionDefault
AuthorizationYThe 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

CodeTypeDescription
200SuccessIf Custom Node was successfully deleted

Error Responses

CodeTypeDescription
400ErrorError if malformed request
404ErrorError 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 ComponentDescriptionExample
INSTANCE_IDID associated with the instance575ec7417ae143cd83dc4a96
INSTANCE_CUSTOM_NODE_IDID associated with the Custom Node575ec7417ae143cd83dc4a95

Request Query Parameters

NameRequiredDescriptionDefaultExample
durationNDuration of time range in milliseconds86400000duration=86400000
endNEnd of time range in milliseconds since epoch0end=0
limitNMaximum number of errors to return25limit=25
sortDirectionNDirection to sort the results by. Accepted values are: asc, descdescsortDirection=desc

Request Headers

NameRequiredDescriptionDefault
AuthorizationYThe 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

CodeTypeDescription
200Workflow ErrorsCustom Node error information

Error Responses

CodeTypeDescription
400ErrorError if malformed request
404ErrorError 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 ComponentDescriptionExample
INSTANCE_IDID associated with the instance575ec7417ae143cd83dc4a96
INSTANCE_CUSTOM_NODE_IDID associated with the Custom Node575ec7417ae143cd83dc4a95

Request Headers

NameRequiredDescriptionDefault
AuthorizationYThe 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

CodeTypeDescription
200Instance Custom NodeCustom Node information

Error Responses

CodeTypeDescription
400ErrorError if malformed request
404ErrorError 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 ComponentDescriptionExample
INSTANCE_IDID associated with the instance575ec7417ae143cd83dc4a96
INSTANCE_CUSTOM_NODE_IDID associated with the Custom Node575ec7417ae143cd83dc4a95

Request Headers

NameRequiredDescriptionDefault
AuthorizationYThe 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

CodeTypeDescription
200Instance Custom NodeUpdated Custom Node information

Error Responses

CodeTypeDescription
400ErrorError if malformed request
404ErrorError 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 ComponentDescriptionExample
INSTANCE_IDID associated with the instance575ec7417ae143cd83dc4a96
INSTANCE_CUSTOM_NODE_IDID associated with the Custom Node575ec7417ae143cd83dc4a95

Request Query Parameters

NameRequiredDescriptionDefaultExample
durationNDuration of time range in milliseconds86400000duration=86400000
endNEnd of time range in milliseconds since epoch0end=0
resolutionNResolution in milliseconds3600000resolution=3600000

Request Headers

NameRequiredDescriptionDefault
AuthorizationYThe 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

CodeTypeDescription
200Workflow StatisticsStatistics for Custom Node runs

Error Responses

CodeTypeDescription
400ErrorError if malformed request
404ErrorError 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.