Partially update a project
const url = 'https://example.com/v1/projects/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","slug":"example","description":"example","orgId":"example","sortEndUserCorrections":true,"everyoneCanRun":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/v1/projects/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "slug": "example", "description": "example", "orgId": "example", "sortEndUserCorrections": true, "everyoneCanRun": true }'A new slug, or a move to another org (orgId, or null for none), answers 409 slug-conflict when the slug is taken where the project ends up. A new slug also answers it when another project of the workspace had that slug before it was renamed, in any org (details.heldAs: 'old-slug'). Either has details.deletedProject: true when the project holding the slug is deleted: its slugs stay its own. The slug a rename leaves stays this project’s, in formerSlugs: no other project can take it, and this one can take it back, unless another project also had it before a rename.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "name": "example", "slug": "example", "description": "example", "orgId": "example", "sortEndUserCorrections": true, "everyoneCanRun": true}Responses
Section titled “Responses”Updated. No body.
Malformed request body.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}No admin on the project; or the body names orgId (even the current one) and the caller is not a tenant admin, as making a project in an org needs (permission-denied). Without an authorization store, key-project-mismatch (details.keyProjectId): the API key or session is limited to a project, and this writes above it, to the workspace, an org or a team (with a store, that is permission-denied).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Project-not-found: no project with that id under this workspace; or org-not-found: orgId names no org of the workspace (it never existed, or it was deleted).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}A reused Idempotency-Key with a different body; slug-conflict when the slug is taken where the project ends up, or another project of the workspace had it before it was renamed (details.heldAs: 'old-slug'), with details.deletedProject: true when that project is deleted; or project-in-environment-order — the project is a member of an environment order, so it can’t be moved to another parent (clear it from the order first). Or idempotency-key-in-flight (with Retry-After): a request with the same Idempotency-Key still runs, so this one wasn’t run; send it again after Retry-After to get that request’s answer.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”The request body is over the API’s limit (request-too-large; details.maxBytes says how much).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”Server error (unmapped domain code or framework crash).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}With authorization enforced, a runtime whose tenant-hierarchy binding can’t change everyoneCanRun together with its grant refuses with authz-membership-unsupported; nothing is changed.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The Idempotency-Key store (idempotency-store-unavailable) or the authorization store (authz-backend-unavailable) couldn’t be reached before the request ran, or the database was too busy for its authorization check (database-busy), so nothing was changed; Retry-After (whole seconds) says when to try again with the same key. Or tenant-state-unavailable (with Retry-After), on a runtime serving many workspaces: the workspace’s state couldn’t be read, so nothing was changed.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”See also
GET /v1/projects/{projectId}: Fetch a project by idDELETE /v1/projects/{projectId}: Delete a project (idempotent)POST /v1/projects/{projectId}/restore: Restore a deleted projectGET /v1/projects/{projectId}/queue-rules: List a project's queue rules- Projects, packs and values
- Kindgi 0.4.0
- Kindgi 0.6.0
- Error code
authz-backend-unavailable - Error code
authz-membership-unsupported - Error code
database-busy - Error code
idempotency-key-in-flight - Error code
idempotency-store-unavailable - Error code
key-project-mismatch - Error code
permission-denied - Error code
project-in-environment-order - Error code
rate-limit-exceeded - Error code
request-too-large - Error code
slug-conflict - Error code
tenant-state-unavailable - Every error code