Script Versions
Retrieves the details of a specific script version.
API key passed in the Authorization header. Format: <api-key>
The script version identifier.
Successful response
Unauthenticated
Unauthorized
Not Found. The record does not exist.
Too Many Requests. The rate limit for this user has been reached.
GET /api/v1/script-versions/{script_version} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
"data": {
"id": "string",
"script_id": "string",
"name": "string",
"version": 0,
"status": "string",
"deployment_failure_reason": null,
"last_invoked_on": null,
"created_at": "2025-01-15T10:30:00.000000Z",
"deployed_at": "2025-01-15T10:30:00.000000Z",
"deployment_failed_at": null,
"deploying": false
}
}Permanently deletes a specific script version.
API key passed in the Authorization header. Format: <api-key>
The script version identifier.
Successful response
Unauthenticated
Unauthorized
Not Found. The record does not exist.
Too Many Requests. The rate limit for this user has been reached.
DELETE /api/v1/script-versions/{script_version} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
"message": "Action completed successfully."
}Uploads a given script version to your private marketplace.
This operation requires administrator permissions. If you are authorising requests with an API key, this request won't work (company-level API keys are associated with manager-level permissions). If you are an administrator, you can use OAuth 2 credentials to complete this operation. For more information please see our Authentication section.
API key passed in the Authorization header. Format: <api-key>
The script version identifier.
Successful response
Unauthenticated
Unauthorized
Not Found. The record does not exist.
Validation Error
Too Many Requests. The rate limit for this user has been reached.
POST /api/v1/script-versions/{script_version}/upload HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"private": "example_private"
}{
"message": "string"
}Deploys a specific script version.
API key passed in the Authorization header. Format: <api-key>
The script version identifier.
Successful response
Unauthenticated
Unauthorized
Not Found. The record does not exist.
Validation Error
Too Many Requests. The rate limit for this user has been reached.
POST /api/v1/script-versions/{script_version}/deploy HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{}Invokes a specific script version.
API key passed in the Authorization header. Format: <api-key>
The script version identifier.
Successful response
Unauthenticated
Unauthorized
Not Found. The record does not exist.
Validation Error
Too Many Requests. The rate limit for this user has been reached.
POST /api/v1/script-versions/{script_version}/invoke HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 83
{
"variables": "example_variables",
"payload": "example_payload",
"flow": "example_flow"
}{}Retrieves a list of logs for a specific script version.
API key passed in the Authorization header. Format: <api-key>
The script version identifier.
Successful response
Unauthenticated
Unauthorized
Not Found. The record does not exist.
Too Many Requests. The rate limit for this user has been reached.
GET /api/v1/script-versions/{script_version}/logs HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
"data": [
{
"id": 1,
"created_at": "2025-01-15T10:30:00.000000Z",
"updated_at": "2025-01-15T10:30:00.000000Z",
"script_id": 1,
"name": "My Example",
"version": 1,
"status": "Draft",
"deployment_failure_reason": "example_deployment_failure_reason",
"last_invoked_on": "example_last_invoked_on",
"deployed_at": "2025-01-15T10:30:00.000000Z",
"deployment_failed_at": "2025-01-15T10:30:00.000000Z",
"deploying": "example_deploying",
"content": {},
"script": {}
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://app.wearepatchworks.com/core-main/api/v1/script-versions/{script_version}/logs",
"per_page": 25,
"to": 1,
"total": 1
},
"links": {
"first": "https://app.wearepatchworks.com/core-main/api/v1/script-versions/{script_version}/logs?page=1",
"last": "https://app.wearepatchworks.com/core-main/api/v1/script-versions/{script_version}/logs?page=1",
"prev": null,
"next": null
}
}Retrieves a paginated list of versions for a specific script. Can be filtered by is_deployed and deployed_at.
API key passed in the Authorization header. Format: <api-key>
The script identifier.
Filter results by is_deployed.
Filter results by deployed_at.
Page number for pagination.
1Number of results per page.
Successful response
Unauthenticated
Unauthorized
Not Found. The record does not exist.
Too Many Requests. The rate limit for this user has been reached.
GET /api/v1/scripts/{script}/script-versions HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
"data": [
{
"id": "string",
"script_id": "string",
"name": "string",
"version": 0,
"status": "string",
"deployment_failure_reason": null,
"last_invoked_on": null,
"created_at": "2025-01-15T10:30:00.000000Z",
"deployed_at": "2025-01-15T10:30:00.000000Z",
"deployment_failed_at": null,
"deploying": false
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 15,
"to": 1,
"total": 1
},
"links": {
"first": "string",
"last": "string",
"prev": null,
"next": null
}
}Creates a new version for a specific script.
API key passed in the Authorization header. Format: <api-key>
The script identifier.
Successful response
Unauthenticated
Unauthorized
Not Found. The record does not exist.
Validation Error
Too Many Requests. The rate limit for this user has been reached.
POST /api/v1/scripts/{script}/script-versions HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"content": "example_content"
}{
"data": {
"id": "string",
"script_id": "string",
"name": "string",
"version": 0,
"status": "string",
"deployment_failure_reason": null,
"last_invoked_on": null,
"created_at": "2025-01-15T10:30:00.000000Z",
"deployed_at": "2025-01-15T10:30:00.000000Z",
"deployment_failed_at": null,
"deploying": false
}
}Last updated
Was this helpful?