# Get the organization's default project

`GET /apis/cra.diagrid.io/v1beta1/defaultproject`

Report the state of your organization's `default` project, and start creating it if it is still expected and does not exist yet.

Every organization on a public region is given a project named `default` when it is created, so this normally just confirms it is there. It exists for the cases where that is not true, which are not interchangeable: an organization whose region is still coming up will get one shortly, an organization on a private region never will, and an organization whose `default` was deleted never gets it back. The response says which, and what to do instead.

Safe to repeat: the project is only ever created by the platform, from one definition, so calling this twice creates nothing the first call did not.

## Responses

### 200 — The state of the organization's default project.

`application/json`

The state of an organization's `default` project, and what to do about it. Callers branch on `outcome`; `instruction` is prose aimed at an AI agent, which cannot see the region type that decided the answer.

- `outcome` (string) — Required. `ready` means a project named `default` exists. `pending` means it does not yet but is expected to, and repeating the call is the right response. `unavailable` means this organization will never have one, and repeating the call will never change that. One of: `ready`, `pending`, `unavailable`.
- `reason` (string) — Why the project is not there. `no_region` and `region_not_connected` resolve on their own. `region_not_public` means the organization's default region is private, and the default project is never provisioned into a customer's own cluster. `region_in_group` means that region belongs to a region group, which takes no standalone projects at all. `default_deleted` means the project existed and was deleted, which is never undone. `ready` beside a `pending` outcome means the project is being created now. Absent when the project already exists. One of: `ready`, `no_region`, `region_not_connected`, `region_not_public`, `region_in_group`, `default_deleted`.
- `project` (string) — The name of the default project. Present only when `outcome` is `ready`.
- `otherProjects` (string[]) — The organization's other projects. Present so a caller told to use an existing project can, without a second call and without guessing a name.
- `instruction` (string) — Required. What to do about this outcome, in a few sentences: what the situation is, whether repeating the call will change it, which project to use in the meantime, and — always — not to create a project. Creating one spends a project slot the organization may not have, and cannot be undone.

### default — Unexpected error.

`application/json`

In the case of an error, a standard format error response body will be returned and the HTTP status code will be set to an error status. The response contains an object with a single error object.

- `code` (string) — Required. This is the same as the HTTP status of the response.
- `message` (string) — Required. A short description of the error.
- `status` (object) — Required. A status code that indicates the error type.
- `details` (object) — Additional details about the errors.
  - `@type` (string) — The type of error.
  - `reason` (string) — A reason for the error.
  - `domain` (string) — The domain in which the error occurred.
  - `metadata` (object) — Additional metadata about the error.

`application/vnd.api+json`

JSONAPI.org specification error response wrapper for UI.

- `error` (object) — In the case of an error, a standard format error response body will be returned and the HTTP status code will be set to an error status. The response contains an object with a single error object.
  - `code` (string) — Required. This is the same as the HTTP status of the response.
  - `message` (string) — Required. A short description of the error.
  - `status` (object) — Required. A status code that indicates the error type.
  - `details` (object) — Additional details about the errors.
    - `@type` (string) — The type of error.
    - `reason` (string) — A reason for the error.
    - `domain` (string) — The domain in which the error occurred.
    - `metadata` (object) — Additional metadata about the error.
- `meta` (object<string, object>) — Link members related to the primary data.
  - One of:
    - **string (uri-reference)** — A string containing the link's URL.
    - **object**
      - `href` (string (uri-reference)) — Required. A string containing the link's URL.
      - `meta` (object) — Non-standard meta-information that can not be represented as an attribute or relationship.
- `links` (object) — Non-standard meta-information that can not be represented as an attribute or relationship.
