A project is a container for resources inside an organization. Resources such as OCR processors belong to one project, and IAM policies can grant access to one project and what’s in it.
Identifiers
| Field | Example | Notes |
|---|---|---|
id |
0199a3c4-7a2b-7c1d-8e3f-4a5b6c7d8e9f |
UUID. API paths use it. |
slug |
prj_g7h8i9j0k1l2 |
prj_ and 12 lowercase letters and digits. Generated, unique and never changes. |
resourceName |
ezgh::org_k3f9a0x2m7qp:prj_g7h8i9j0k1l2 |
Names the project in IAM policies. |
name |
web |
1 to 100 characters. Needn’t be unique. |
The ezgh CLI accepts a project’s ID, slug or name.
What belongs to a project
- Resources. OCR processors are created in a project, under
/v1/organizations/{orgId}/projects/{projectId}/ocr/processors. A resource’s name starts with its project’s:ezgh:us-west-1:org_k3f9a0x2m7qp:prj_g7h8i9j0k1l2:prc_…. - Access. A policy whose resources are
ezgh:*:org_…:prj_…(the project) andezgh:*:org_…:prj_…:*(everything in it) grants access to that project only. See IAM. - Quotas. Some quotas apply per project, such as OCR’s Processors per project. See Service quotas.
In the console, the project switcher at the top of every page selects the project that project-scoped pages, such as OCR, show.
List projects
You see the projects you’re allowed to list (projects.list).
ezgh projects listcurl https://orgs.ezghcloud.com/v1/organizations/$ORG_ID/projects \
-H "Authorization: Bearer $EZGH_API_KEY"See ListProjects.
Create a project
You need projects.create. An organization can have 10 projects by default; over the limit,
creating one returns 409 quota_exceeded. See Project quota.
ezgh projects create webcurl -X POST https://orgs.ezghcloud.com/v1/organizations/$ORG_ID/projects \
-H "Authorization: Bearer $EZGH_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{ "name": "web" }'The response is 201 with the project. See CreateProject
and idempotency keys.
Rename a project
You need projects.update on the project. Renaming changes only name.
ezgh projects update web --name storefrontcurl -X PATCH https://orgs.ezghcloud.com/v1/organizations/$ORG_ID/projects/$PROJECT_ID \
-H "Authorization: Bearer $EZGH_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "storefront" }'See UpdateProject.
Delete a project
You need projects.delete on the project. Deletion takes effect at once and can’t be undone.
The OCR processors in the project are deleted, and the project stops counting toward the
organization’s project quota.
ezgh projects delete storefrontThe CLI asks for confirmation; --yes skips it.
curl -X DELETE https://orgs.ezghcloud.com/v1/organizations/$ORG_ID/projects/$PROJECT_ID \
-H "Authorization: Bearer $EZGH_API_KEY"The response is 204. See DeleteProject.