Welcome to the new Golem Cloud Docs! 👋
Documentation
Project Policy

Project Policy API

The project policy API is only available for Golem Cloud.

Project policies describe a set of actions one account can perform when it was associated with a grant for a project.

The following actions can be used in the projectActions fields of this API:

  • ViewComponent grants read access to a component
  • CreateComponent allows creating new components in a project
  • UpdateComponent allows uploading new versions for existing components in a project
  • DeleteComponent allows deleting components from a project
  • ViewWorker allows querying existing workers of a component belonging to the project
  • CreateWorker allows launching new workers of a component in the project
  • UpdateWorker allows manipulating existing workers of a component belonging to the project
  • DeleteWorker allows deleting workers of a component belonging to the project
  • ViewProjectGrants allows listing the existing grants of the project
  • CreateProjectGrants allows creating new grants for the project
  • DeleteProjectGrants allows deleting existing grants of the project

Get a project policy

PathMethodProtected
/v2/project-policies/{project_policy_id}GETYes

Returns a given project policy by it's ID. Project policy identifiers are used in project grants.

Example Response JSON

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "projectActions": {
    "actions": ["ViewComponent"]
  }
}

Create a project policy

PathMethodProtected
/v2/project-policiesPOSTYes

Creates a new project policy and returns the object describing it, including the newly created policy's id.

Example Request JSON

{
  "name": "string",
  "projectActions": {
    "actions": ["ViewComponent"]
  }
}

Example Response JSON

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "projectActions": {
    "actions": ["ViewComponent"]
  }
}

Project Policy API Errors

Status CodeDescriptionBody
400Invalid request, returning with a list of issues detected in the request{"errors":["string"]}
401Unauthorized{"error":"string"}
404Project not found{"error":"string"}
500Internal server error{"error":"string"}