reusable_requests mAPI reference
Complete reference documentation for the reusable_requests resource.
Validate a reusable request
#Validates a reusable request payload without persisting it.
Validation uses the environment in the request. Accounts that allow writes in every environment can validate in that environment. When writes are limited to development, this endpoint accepts the development environment.
Endpoint
Path parameters
The key of the reusable request to validate.
Query parameters
The environment slug. When omitted, the account's default environment is used.
The slug of a branch to use. When environment is omitted, the branch is resolved from Development after the account default is injected. When environment is supplied, it must be "development".
Request body
A reusable request object with attributes to update or create a reusable request.
An internal note about the reusable request.
A name for the reusable request.
The HTTP request a reusable request runs.
The body of the request. Only used for POST or PUT requests.
A JSON schema for inputs the request accepts.
A JSON string of input values for the request.
The headers of the request. Can be a template string or a list of key-value pairs.
The HTTP method of the request.
The query params of the request. Can be a template string or a list of key-value pairs.
A JSON path into the response that is merged into the workflow data.
The signing key used to sign the request.
The URL of the request.
The reusable request type. Only http_fetch is supported.
Returns
Wraps the ReusableRequest response under the reusable_request key.
A reusable HTTP request that workflows can link to.
The timestamp of when the reusable request was created.
An internal note about the reusable request.
The slug of the environment in which the reusable request exists.
The unique key for the reusable request. Must be 3 to 255 characters and match ^[a-z0-9_-]+$.
A name for the reusable request.
The HTTP request a reusable request runs.
The body of the request. Only used for POST or PUT requests.
A JSON schema for inputs the request accepts.
A JSON string of input values for the request.
The headers of the request. Can be a template string or a list of key-value pairs.
The HTTP method of the request.
The query params of the request. Can be a template string or a list of key-value pairs.
A JSON path into the response that is merged into the workflow data.
The signing key used to sign the request.
The URL of the request.
The SHA hash of the reusable request.
The reusable request type. Only http_fetch is supported.
The timestamp of when the reusable request was last updated.
List reusable requests
#Returns a paginated list of reusable requests for an environment.
Endpoint
Query parameters
The environment slug. When omitted, the account's default environment is used.
The slug of a branch to use. When environment is omitted, the branch is resolved from Development after the account default is injected. When environment is supplied, it must be "development".
Whether to annotate the resource. Only used in the Knock CLI.
Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.
The cursor to fetch entries after.
The cursor to fetch entries before.
The number of entries to fetch per-page.
Returns
A paginated list of ReusableRequest. Contains a list of entries and page information.
A list of entries.
The timestamp of when the reusable request was created.
An internal note about the reusable request.
The slug of the environment in which the reusable request exists.
The unique key for the reusable request. Must be 3 to 255 characters and match ^[a-z0-9_-]+$.
A name for the reusable request.
The HTTP request a reusable request runs.
The body of the request. Only used for POST or PUT requests.
A JSON schema for inputs the request accepts.
A JSON string of input values for the request.
The headers of the request. Can be a template string or a list of key-value pairs.
The HTTP method of the request.
The query params of the request. Can be a template string or a list of key-value pairs.
A JSON path into the response that is merged into the workflow data.
The signing key used to sign the request.
The URL of the request.
The SHA hash of the reusable request.
The reusable request type. Only http_fetch is supported.
The timestamp of when the reusable request was last updated.
The information about a paginated result.
The cursor to fetch entries after. Will only be present if there are more entries to fetch.
The cursor to fetch entries before. Will only be present if there are more entries to fetch before the current page.
The number of entries to fetch per-page.
Archive a reusable request
#Archives a reusable request by key across all environments.
Endpoint
Path parameters
The key of the reusable request to archive.
Query parameters
The environment slug. When omitted, the account's default environment is used.
Returns
The response from archiving a reusable request.
The result of the archive operation.
Get a reusable request
#Retrieves a reusable request by its key.
Endpoint
Path parameters
The key of the reusable request to retrieve.
Query parameters
The environment slug. When omitted, the account's default environment is used.
The slug of a branch to use. When environment is omitted, the branch is resolved from Development after the account default is injected. When environment is supplied, it must be "development".
Whether to annotate the resource. Only used in the Knock CLI.
Whether to hide uncommitted changes. When true, only committed changes will be returned. When false, both committed and uncommitted changes will be returned.
Returns
A reusable HTTP request that workflows can link to.
The timestamp of when the reusable request was created.
An internal note about the reusable request.
The slug of the environment in which the reusable request exists.
The unique key for the reusable request. Must be 3 to 255 characters and match ^[a-z0-9_-]+$.
A name for the reusable request.
The HTTP request a reusable request runs.
The body of the request. Only used for POST or PUT requests.
A JSON schema for inputs the request accepts.
A JSON string of input values for the request.
The headers of the request. Can be a template string or a list of key-value pairs.
The HTTP method of the request.
The query params of the request. Can be a template string or a list of key-value pairs.
A JSON path into the response that is merged into the workflow data.
The signing key used to sign the request.
The URL of the request.
The SHA hash of the reusable request.
The reusable request type. Only http_fetch is supported.
The timestamp of when the reusable request was last updated.
Upsert a reusable request
#Updates a reusable request of a given key, or creates a new one if it does not yet exist.
The write targets the environment in the request. Accounts that allow writes in every environment can create and update in that environment. Pass force to write outside the request's origin environment. When writes are limited to development, this endpoint accepts the development environment unless force is set.
Endpoint
Path parameters
The key of the reusable request to upsert.
Query parameters
The environment slug. When omitted, the account's default environment is used.
The slug of a branch to use. When environment is omitted, the branch is resolved from Development after the account default is injected. When environment is supplied, it must be "development".
Whether to annotate the resource. Only used in the Knock CLI.
When set to true, forces the upsert to override existing content regardless of environment restrictions. This bypasses the development-only environment check and origin environment checks.
Whether to commit the resource at the same time as modifying it.
The message to commit the resource with, only used if commit is true.
When used with commit, creates a new version with identical content and commits it if there are no unpublished changes.
Request body
A reusable request object with attributes to update or create a reusable request.
An internal note about the reusable request.
A name for the reusable request.
The HTTP request a reusable request runs.
The body of the request. Only used for POST or PUT requests.
A JSON schema for inputs the request accepts.
A JSON string of input values for the request.
The headers of the request. Can be a template string or a list of key-value pairs.
The HTTP method of the request.
The query params of the request. Can be a template string or a list of key-value pairs.
A JSON path into the response that is merged into the workflow data.
The signing key used to sign the request.
The URL of the request.
The reusable request type. Only http_fetch is supported.
Returns
Wraps the ReusableRequest response under the reusable_request key.
A reusable HTTP request that workflows can link to.
The timestamp of when the reusable request was created.
An internal note about the reusable request.
The slug of the environment in which the reusable request exists.
The unique key for the reusable request. Must be 3 to 255 characters and match ^[a-z0-9_-]+$.
A name for the reusable request.
The HTTP request a reusable request runs.
The body of the request. Only used for POST or PUT requests.
A JSON schema for inputs the request accepts.
A JSON string of input values for the request.
The headers of the request. Can be a template string or a list of key-value pairs.
The HTTP method of the request.
The query params of the request. Can be a template string or a list of key-value pairs.
A JSON path into the response that is merged into the workflow data.
The signing key used to sign the request.
The URL of the request.
The SHA hash of the reusable request.
The reusable request type. Only http_fetch is supported.
The timestamp of when the reusable request was last updated.
Unarchive a reusable request
#Unarchives a reusable request by key, with every copy archived alongside it in other environments.
Returns a 404 when the key isn't archived, including when an earlier or concurrent request
already restored it. Returns a 422 with the code key_in_use when a live reusable request
uses the key.
Endpoint
Path parameters
The key of the reusable request to unarchive.
Query parameters
The environment slug. When omitted, the account's default environment is used.
Returns
Wraps the ReusableRequest response under the reusable_request key.
A reusable HTTP request that workflows can link to.
The timestamp of when the reusable request was created.
An internal note about the reusable request.
The slug of the environment in which the reusable request exists.
The unique key for the reusable request. Must be 3 to 255 characters and match ^[a-z0-9_-]+$.
A name for the reusable request.
The HTTP request a reusable request runs.
The body of the request. Only used for POST or PUT requests.
A JSON schema for inputs the request accepts.
A JSON string of input values for the request.
The headers of the request. Can be a template string or a list of key-value pairs.
The HTTP method of the request.
The query params of the request. Can be a template string or a list of key-value pairs.
A JSON path into the response that is merged into the workflow data.
The signing key used to sign the request.
The URL of the request.
The SHA hash of the reusable request.
The reusable request type. Only http_fetch is supported.
The timestamp of when the reusable request was last updated.
ReusableRequest
#A reusable HTTP request that workflows can link to.
Attributes
The timestamp of when the reusable request was created.
An internal note about the reusable request.
The slug of the environment in which the reusable request exists.
The unique key for the reusable request. Must be 3 to 255 characters and match ^[a-z0-9_-]+$.
A name for the reusable request.
The HTTP request a reusable request runs.
The body of the request. Only used for POST or PUT requests.
A JSON schema for inputs the request accepts.
A JSON string of input values for the request.
The headers of the request. Can be a template string or a list of key-value pairs.
The HTTP method of the request.
The query params of the request. Can be a template string or a list of key-value pairs.
A JSON path into the response that is merged into the workflow data.
The signing key used to sign the request.
The URL of the request.
The SHA hash of the reusable request.
The reusable request type. Only http_fetch is supported.
The timestamp of when the reusable request was last updated.
ReusableRequestRequest
#A reusable request object with attributes to update or create a reusable request.
Attributes
An internal note about the reusable request.
A name for the reusable request.
The HTTP request a reusable request runs.
The body of the request. Only used for POST or PUT requests.
A JSON schema for inputs the request accepts.
A JSON string of input values for the request.
The headers of the request. Can be a template string or a list of key-value pairs.
The HTTP method of the request.
The query params of the request. Can be a template string or a list of key-value pairs.
A JSON path into the response that is merged into the workflow data.
The signing key used to sign the request.
The URL of the request.
The reusable request type. Only http_fetch is supported.
ReusableRequestSettings
#The HTTP request a reusable request runs.
Attributes
The body of the request. Only used for POST or PUT requests.
A JSON schema for inputs the request accepts.
A JSON string of input values for the request.
The headers of the request. Can be a template string or a list of key-value pairs.
The HTTP method of the request.
The query params of the request. Can be a template string or a list of key-value pairs.
A JSON path into the response that is merged into the workflow data.
The signing key used to sign the request.
The URL of the request.