Skip to the content
Forge

Caches

The caches runs save and restore.

Every path is under /api/v1; see the API for authenticating, errors and rate limits, and the schemas for the bodies.

The project's cache entries, newest first, with its cache usage and quota (run:read)

GET /api/v1/projects/{project}/caches

Entries ready to restore, in every scope: a linked repository's branch, tag or pull request (refs/heads/NAME, refs/tags/NAME, refs/pull/NUMBER), or none for runs without Git context.

Parameter In Description
project path ID
key query string: Only entries whose key starts with this
limit query integer
cursor query string: next_cursor of the previous page

Answers:

Errors: 400, 403, 404 (how errors look).

Delete the project's cache entries whose key starts with key, or all of them (cache:manage)

DELETE /api/v1/projects/{project}/caches

At most 500 entries go per call; more says to call again for the rest. A run saving one of them saves nothing. Recorded in the audit log.

Parameter In Description
project path ID
key query string: Only entries whose key starts with this; all without it

Answers:

Errors: 403, 404 (how errors look).

Delete one of the project's cache entries (cache:manage)

DELETE /api/v1/projects/{project}/caches/{entry}

Parameter In Description
project path ID
entry path string (uuid)

Answers:

Errors: 403, 404 (how errors look).