Variables
Retrieves a paginated list of global variables for a specific connector. Can be filtered by label, key, and value. Note: In the Patchworks dashboard, a system is known as a connector.
API key passed in the Authorization header. Format: <api-key>
Filter results by label.
Filter results by key.
Filter results by value.
Sort field. Prefix with - for descending. Available: label, key, value
Page number for pagination.
1Number of results per page.
Successful response
Unauthenticated
Unauthorized
GET /api/v1/variables HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
"data": [
{
"id": 1,
"label": "My Label",
"key": "example_key",
"value": "example_value",
"secret": "example_secret",
"locked": "example_locked",
"configurable": "example_configurable",
"created_at": "2025-01-15T10:30:00.000000Z",
"updated_at": "2025-01-15T10:30:00.000000Z",
"modified": "example_modified",
"pivot": "example_pivot",
"required": true,
"advanced": true,
"alias": "example_alias"
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://api.example.com/api/v1/variables",
"per_page": 25,
"to": 1,
"total": 1
},
"links": {
"first": "https://api.example.com/api/v1/variables?page=1",
"last": "https://api.example.com/api/v1/variables?page=1",
"prev": null,
"next": null
}
}Creates a new global variable for a connector. Note: In the Patchworks dashboard, a system is known as a connector.
Validation Rules
These are the basic validation rules for the request. More detailed validation may apply depending on the data being sent. Please see the response for any extra requirements
label
string
☑
key
string
☑
value
string
secret
locked
API key passed in the Authorization header. Format: <api-key>
Successful response
Unauthenticated
Unauthorized
Validation Error
POST /api/v1/variables HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 116
{
"label": "My Label",
"key": "example_key",
"value": "example_value",
"secret": "example_secret",
"locked": "example_locked"
}{
"data": {
"id": 1,
"label": "My Label",
"key": "example_key",
"value": "example_value",
"secret": "example_secret",
"locked": "example_locked",
"configurable": "example_configurable",
"created_at": "2025-01-15T10:30:00.000000Z",
"updated_at": "2025-01-15T10:30:00.000000Z",
"modified": "example_modified",
"pivot": "example_pivot",
"required": true,
"advanced": true,
"alias": "example_alias"
}
}Retrieves the details of a specific global variable.
Available Filters
These are the filters that can be used to specific the data to return. Please see the section on using filters for more details.
label
key
value
Available Sorts
These are the sorts that can be used order the returned data. Please see the section on using sorting for more details.
label
key
value
API key passed in the Authorization header. Format: <api-key>
The variable identifier.
Filter results by label.
Filter results by key.
Filter results by value.
Sort field. Prefix with - for descending. Available: label, key, value
Page number for pagination.
1Number of results per page.
Successful response
Unauthenticated
Unauthorized
GET /api/v1/variables/{variable} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
"data": {
"id": 1,
"label": "My Label",
"key": "example_key",
"value": "example_value",
"secret": "example_secret",
"locked": "example_locked",
"configurable": "example_configurable",
"created_at": "2025-01-15T10:30:00.000000Z",
"updated_at": "2025-01-15T10:30:00.000000Z",
"modified": "example_modified",
"pivot": "example_pivot",
"required": true,
"advanced": true,
"alias": "example_alias"
}
}API key passed in the Authorization header. Format: <api-key>
The variable identifier.
Successful response
Unauthenticated
Unauthorized
Validation Error
PUT /api/v1/variables/{variable} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 102
{
"label": "My Label",
"key": "example_key",
"value": "example_value",
"configurable": "example_configurable"
}{
"data": {
"id": 1,
"label": "My Label",
"key": "example_key",
"value": "example_value",
"secret": "example_secret",
"locked": "example_locked",
"configurable": "example_configurable",
"created_at": "2025-01-15T10:30:00.000000Z",
"updated_at": "2025-01-15T10:30:00.000000Z",
"modified": "example_modified",
"pivot": "example_pivot",
"required": true,
"advanced": true,
"alias": "example_alias"
}
}Permanently deletes a specific global variable.
API key passed in the Authorization header. Format: <api-key>
The variable identifier.
Successful response
Unauthenticated
Unauthorized
DELETE /api/v1/variables/{variable} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
"message": "Action completed successfully."
}Last updated
Was this helpful?