Clear cache

The documentation applies to models in the new version buddy.v1.1.0 For the REST API to work correctly, you should send the header X-Buddy-Media-Type: buddy.v1.1.0 You can read more about changes here.

Clears cache of an existing pipeline in the project.

Required scopes: WORKSPACE, EXECUTION_MANAGE

Resource URL

PATCH /workspaces/:domain/projects/:project_name/pipelines/:pipeline_id

URL Parameters

NameTypeDescription
domain
Required
StringThe workspace domain.
pipeline_id
Required
IntegerThe numerical ID of the desired pipeline.
project_name
Required
StringThe name ID of the project.

POST Parameters

NameTypeDescription
clear_cache
Required
BooleanClears cache in a pipeline. Must be set to true.

Example

Request

PATCH https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2

JSON

{"clear_cache":true}

Sample Response

HTTP

Status: 201 Created
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999

JSON

{
    "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2",
    "html_url": "https://app.buddy.works/buddy/company-website/pipelines/pipeline/2",
    "id": 2,
    "name": "Live mirror",
    "on": "CLICK",
    "refs": [
      "refs/heads/master"
    ],
    "last_execution_status": "SUCCESSFUL",
    "last_execution_revision": "184623451d99d95e75e82b687ba4e1d4e087b4ef",
    "create_date": "2020-06-01T13:54:15.000Z",
    "project": {
    "url": "https://api.buddy.works/workspaces/buddy/projects/company-website",
    "html_url": "https://app.buddy.works/buddy/company-website",
    "name": "company-website",
    "display_name": "Company Website",
    "status": "ACTIVE"
    },
    "creator": {
    "url": "https://api.buddy.works/workspaces/buddy/member/1",
    "html_url": "https://app.buddy.works/buddy/profile/1",
    "id": 1,
    "name": "Mike Benson",
    "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png"
    },
    "always_from_scratch": false,
    "ignore_fail_on_project_status": false,
    "no_skip_to_most_recent": false,
    "auto_clear_cache": false,
    "fetch_all_refs": false,
    "do_not_create_commit_status": false,
    "actions": [
    {
      "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions/5",
      "html_url": "https://app.buddy.works/buddy/company-website/pipelines/action/5/edit",
      "id": 5,
      "name": "Upload files to dev",
      "type": "FTP",
      "trigger_time": "ON_EVERY_EXECUTION",
      "last_execution_status": "SUCCESSFUL"
    }
  ]
}

Last modified on April 26, 2022

Get Started

Sign up for free and deploy your project in less than 10 minutes.