Scripts
Retrieves a paginated list of scripts. Can be filtered by name and versions.id.
API key passed in the Authorization header. Format: <api-key>
Filter results by name.
Filter results by versions.id.
Comma-separated list of relationships to include. Available: versions, versions.content, latestVersion, latestVersion.content
Sort field. Prefix with - for descending. Available: name
Comma-separated list of versions fields to return. Available: id, script_id, version, name, deployed_at, deployment_failed_at, deploying, deployment_failure_reason
Page number for pagination.
1Number of results per page.
Successful response
Unauthenticated
Unauthorized
GET /api/v1/scripts HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
"data": [
{
"id": "string",
"script_template_id": null,
"name": "string",
"description": "string",
"language": "string",
"ai_created": false
}
],
"links": {
"first": "string",
"last": "string",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 15,
"to": 1,
"total": 1
}
}Creates a new script.
API key passed in the Authorization header. Format: <api-key>
Successful response
Unauthenticated
Unauthorized
Validation Error
POST /api/v1/scripts HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"name": "string",
"description": "string",
"language": "string",
"ai_created": false
}{
"data": {
"id": "string",
"script_template_id": null,
"name": "string",
"description": "string",
"language": "string",
"ai_created": false
}
}Retrieves the details of a specific script.
API key passed in the Authorization header. Format: <api-key>
The script identifier.
Filter results by name.
Filter results by versions.id.
Comma-separated list of relationships to include. Available: versions, versions.content, latestVersion, latestVersion.content
Sort field. Prefix with - for descending. Available: name
Comma-separated list of versions fields to return. Available: id, script_id, version, name, deployed_at, deployment_failed_at, deploying, deployment_failure_reason
Page number for pagination.
1Number of results per page.
Successful response
Unauthenticated
Unauthorized
GET /api/v1/scripts/{script} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
"data": {
"id": "string",
"script_template_id": null,
"name": "string",
"description": "string",
"language": "string",
"ai_created": false
}
}Updates an existing script.
API key passed in the Authorization header. Format: <api-key>
The script identifier.
Successful response
Unauthenticated
Unauthorized
Validation Error
PUT /api/v1/scripts/{script} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 77
{
"name": "string",
"description": "string",
"language": "string",
"value": "string"
}{
"data": {
"id": "string",
"script_template_id": null,
"name": "string",
"description": "string",
"language": "string",
"ai_created": false
}
}Permanently deletes a specific script.
API key passed in the Authorization header. Format: <api-key>
The script identifier.
Successful response
Unauthenticated
Unauthorized
DELETE /api/v1/scripts/{script} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
"message": "Action completed successfully."
}Last updated
Was this helpful?