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 templateCreateComponent
allows creating new templates in a projectUpdateComponent
allows uploading new versions for existing templates in a projectDeleteComponent
allows deleting templates from a projectViewInstance
allows querying existing workers of a template belonging to the projectCreateInstance
allows launching new workers of a template in the projectUpdateInstance
allows manipulating existing workers of a template belonging to the projectDeleteInstance
allows deleting workers of a template belonging to the projectViewProjectGrants
allows listing the existing grants of the projectCreateProjectGrants
allows creating new grants for the projectDeleteProjectGrants
allows deleting existing grants of the projectMethod | Path | Request | Response |
GET | /v1/project-policies/{project-policy-id} | - | ProjectPolicy JSON |
Response format:
{
"id": "2b41858e-a327-4e63-9539-ff9b123c88a2",
"name": "a policy",
"projectActions": ["ViewComponent", "ViewInstance"]
}
Explanation
Returns a given project policy by it’s ID. Project policy identifiers are used in project grants.
Example cURL:
curl 'https://release.api.golem.cloud/v1/project-policies/2b41858e-a327-4e63-9539-ff9b123c88a2'
-H 'Authorization: Bearer 03f17466-202f-43ac-86cc-52e6c6a42d2d'
Method | Path | Request | Response |
POST | /v1/project-policies | ProjectPolicyData JSON | ProjectPolicy JSON |
Request format:
{
"name": "a policy",
"projectActions": ["ViewComponent", "ViewInstance"]
}
Response format:
{
"id": "2b41858e-a327-4e63-9539-ff9b123c88a2",
"name": "a policy",
"projectActions": ["ViewComponent", "ViewInstance"]
}
Explanation
Creates a new project policy and returns the object describing it, including the newly created policy’s id
.
Example cURL:
curl -X POST
'https://release.api.golem.cloud/v1/project-policies'
-H 'Content-Type: application/json'
-d '{"name": "a policy", "projectActions": ["ViewComponent", "ViewInstance"]}'
-H 'Authorization: Bearer 03f17466-202f-43ac-86cc-52e6c6a42d2d'
All project policy endpoints can return with the following errors:
Status | Body | Description |
400 | { "errors": ["error1", ...] } | Invalid request, returning with a list of issues detected in the request. |
401 | { "message": "..." } | Unauthorized |
403 | { "error": "..." } | Maximum number of projects exceeded |
404 | { "message": "..." } | Project not found |
500 | { "error": "..." } | Internal server error |