Docs

Get a project by ID

GET
/projects/{project_id}

Returns a project's current state: its name, origins, password hashing method and owning team.

Authenticate with the project secret, or with the session of a signed-in person who holds a grant on the project.

Authorization

headerAuthorizationBearer <token>

Scope: project.write

Path Parameters

project_id*string

The project ID: the id that createProject (POST /projects) returns, which zitadel setup also prints as project_id.

Match^[a-zA-Z0-9_-]+$

Response Body

The project.

application/json
  1. response

The current state of one project. It adds the owning team to the fields every project listing carries.

id*string

The unique identifier of the project.

name*string

The name of the project.

origins*array<>

The project's origins. An empty list admits no origin except a loopback origin, which is admitted without a pattern.

created_at*string

The time when the project was created.

Formatdate-time
updated_at*string

The time when the project was last updated.

Formatdate-time
password_hash?|

The method this project's passwords are hashed with. Null when the project uses the server default.

owning_team_id*|

The team that owns the project, which is how its members administer it. Null when no team owns the project, for example before it is claimed.

The team lives in the platform project, so treat this ID as opaque. GET /projects/{project_id}/members?relation=admin lists the people who administer the project, through it or through a grant.

Example Request
import { configureZitadel, getApi } from "@zitadel/api/config";// In the browser, through the SDK proxy: the session cookie authenticates the call.const api = getApi(configureZitadel({ projectId: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" }));const project = await api.getProject("proj_01KWH1P4MYS7F0N9WD3P2E4YM5");
Example Response
{  "id": "string",  "name": "string",  "origins": [    {      "pattern": "string",      "kind": "primary"    }  ],  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "password_hash": {    "algorithm": "argon2i",    "params": {      "time": 0,      "memory": 0,      "threads": 0,      "cost": 0,      "rounds": 0,      "hash": "sha1"    }  },  "owning_team_id": "string"}

Was this helpful?