For the complete documentation index, see llms.txt. This page is also available as Markdown.

Caches

List Caches

get

Retrieves a paginated list of caches. Can be filtered by flow_id, for_flow, scope, and name.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Query parameters
filter[flow_id]stringOptional

Filter results by flow_id.

filter[for_flow]stringOptional

Filter results by for_flow.

filter[scope]stringOptional

Filter results by scope.

filter[id]stringOptional

Filter results by id.

filter[,]stringOptional

Filter results by ,.

filter[name]stringOptional

Filter results by name.

filter[LIKE]stringOptional

Filter results by LIKE.

filter[flow]stringOptional

Filter results by flow.

includestringOptional

Comma-separated list of relationships to include. Available: flow

pageinteger · min: 1Optional

Page number for pagination.

Default: 1
per_pageinteger · min: 1 · max: 100Optional

Number of results per page.

Responses
200

Successful response

application/json
get/api/v1/caches
GET /api/v1/caches HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": 0,
      "name": "string",
      "scope": "string",
      "ttl": 0,
      "flow_id": 0,
      "flow": {
        "id": 0,
        "name": "string"
      },
      "created_at": "2025-01-15T10:30:00.000000Z",
      "updated_at": "2025-01-15T10:30:00.000000Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "https://api.example.com/api/v1/caches",
    "per_page": 15,
    "to": 1,
    "total": 1
  },
  "links": {
    "first": "https://api.example.com/api/v1/caches?page=1",
    "last": "https://api.example.com/api/v1/caches?page=1",
    "prev": null,
    "next": null
  }
}

Get Metadata

get

Retrieves information about caches used in flows.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Responses
200

Successful response

application/json
get/api/v1/caches/metadata
GET /api/v1/caches/metadata HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": 0,
      "key_count": 0,
      "memory_usage": 0
    }
  ],
  "pagination": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 15,
    "total": 0
  }
}

Get Cache

get

Retrieves the details of a specific cache.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
cachestringRequired

The cache identifier.

Query parameters
filter[flow_id]stringOptional

Filter results by flow_id.

filter[for_flow]stringOptional

Filter results by for_flow.

filter[scope]stringOptional

Filter results by scope.

filter[id]stringOptional

Filter results by id.

filter[,]stringOptional

Filter results by ,.

filter[name]stringOptional

Filter results by name.

filter[LIKE]stringOptional

Filter results by LIKE.

filter[flow]stringOptional

Filter results by flow.

includestringOptional

Comma-separated list of relationships to include. Available: flow

pageinteger · min: 1Optional

Page number for pagination.

Default: 1
per_pageinteger · min: 1 · max: 100Optional

Number of results per page.

Responses
200

Successful response

application/json
get/api/v1/caches/{cache}
GET /api/v1/caches/{cache} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": {
    "id": 0,
    "name": "string",
    "scope": "string",
    "ttl": 0,
    "flow_id": 0,
    "flow": {
      "id": 0,
      "name": "string"
    },
    "created_at": "2025-01-15T10:30:00.000000Z",
    "updated_at": "2025-01-15T10:30:00.000000Z"
  }
}

Update Cache

put

Updates an existing cache.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
cachestringRequired

The cache identifier.

Body
ttl_unitstring · nullableOptional
ttl_numberstring · nullableOptional
namestringRequired
Responses
200

Successful response

application/json
put/api/v1/caches/{cache}
PUT /api/v1/caches/{cache} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 85

{
  "ttl_unit": "example_ttl_unit",
  "ttl_number": "example_ttl_number",
  "name": "My Example"
}
{
  "data": {
    "id": 1,
    "scope": "example_scope",
    "ttl": "example_ttl",
    "created_at": "2025-01-15T10:30:00.000000Z",
    "updated_at": "2025-01-15T10:30:00.000000Z",
    "name": "My Example",
    "flow_id": 1,
    "cache_template_id": 1,
    "content": "example_content",
    "ttl_unit": "example_ttl_unit",
    "ttl_number": "example_ttl_number",
    "flow": "example_flow"
  }
}

Delete Cache

delete

Permanently deletes a specific cache.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
cachestringRequired

The cache identifier.

Responses
200

Successful response

application/json
messagestringOptional
delete/api/v1/caches/{cache}
DELETE /api/v1/caches/{cache} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "message": "Action completed successfully."
}

Get Content

get

Retrieves data for a given cache key.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
cachestringRequired

The cache identifier.

keystringRequired

The key identifier.

Responses
200

Successful response

No content

get/api/v1/caches/{cache}/content/{key}
GET /api/v1/caches/{cache}/content/{key} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*

No content

Update Cache Content

put

Updates the content for a given cache key.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
cachestringRequired

The cache identifier.

keystringRequired

The key identifier.

Body
contentstring · nullableOptional
Responses
200

Successful response

application/json
put/api/v1/caches/{cache}/content/{key}
PUT /api/v1/caches/{cache}/content/{key} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 29

{
  "content": "example_content"
}
{
  "data": {
    "id": 1,
    "scope": "example_scope",
    "ttl": "example_ttl",
    "created_at": "2025-01-15T10:30:00.000000Z",
    "updated_at": "2025-01-15T10:30:00.000000Z",
    "name": "My Example",
    "flow_id": 1,
    "cache_template_id": 1,
    "content": "example_content",
    "ttl_unit": "example_ttl_unit",
    "ttl_number": "example_ttl_number",
    "flow": "example_flow"
  }
}

Flush Cache

post

Flushes the contents of a specific cache.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
cachestringRequired

The cache identifier.

Responses
200

Successful response

application/json
objectOptional
post/api/v1/caches/{cache}/flush
POST /api/v1/caches/{cache}/flush HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{}
get

Searches key names, page numbers, and unique keys within a specific cache for a given term.

Authorizations
AuthorizationstringRequired

API key passed in the Authorization header. Format: <api-key>

Path parameters
cachestringRequired

The cache identifier.

searchstringRequired

The search identifier.

Responses
200

Successful response

application/json
objectOptional
get/api/v1/caches/{cache}/search/{search}
GET /api/v1/caches/{cache}/search/{search} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{}

Last updated

Was this helpful?