# Update a project

`PUT /apis/cra.diagrid.io/v1beta1/projects/{ProjectId}`

Update an existing project by replacing its configuration.

## Request

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ProjectId` | string | Yes | Unique identifier of the project. |

### Request body

The project configuration to apply.

`application/json`

- `apiVersion` (string)
- `kind` (string)
- `metadata` (object)
  - `name` (string)
  - `uid` (string)
  - `resourceVersion` (integer)
  - `createdAt` (string)
  - `updatedAt` (string)
  - `deletedAt` (string)
  - `labels` (object<string, string>)
  - `annotations` (object)
- `spec` (object) — ProjectSpec is the project configuration exposed by the API.
  - `displayName` (string)
  - `region` (string) — Immutable. Region is optional on create — the server assigns the org's default region when it is omitted. It is immutable once set.
  - `regionGroup` (string) — Immutable. RegionGroup names the region group the project is placed in, instead of a single region. Empty for an ordinary single-region project. Mutually exclusive with Region, and immutable: a project is created into a group or into a region, and cannot be moved between them afterwards.
  - `privateRegion` (boolean)
  - `defaultPubsubEnabled` (boolean)
  - `defaultKVStoreEnabled` (boolean)
  - `defaultWorkflowStoreEnabled` (boolean)
  - `defaultAgentInfrastructureEnabled` (boolean)
  - `agentRegistryStore` (string) — AgentRegistryStore names the KVStore backing the managed agent-registry component; empty means the default managed KVStore.
  - `disableAppTunnels` (boolean)
  - `enableWorkflowHistorySigning` (boolean) — Immutable. EnableWorkflowHistorySigning turns on Dapr workflow history signing for the project's sidecars. Settable only at creation time.
  - `globalAppId` (object) — GlobalAppIDSpec defines global settings that apply to all appids in a project.
    - `maxBodySize` (string)
- `status` (object) — ProjectStatus represents the status of a project.
  - `status` (string) — Status is the current processing status of the resource.
  - `updatedAt` (string) — UpdatedAt is the time of the last status update.
  - `messages` (object[]) — Messages contains any status messages, such as error details.
    - `message` (string)
  - `instances` (object[]) — Instances includes the status for each instance of the resource.
    - `cluster` (string) — Cluster is the name of the cluster hosting this instance.
    - `region` (string) — Region is the region where the instance is located (e.g. "us-east-1").
    - `placementId` (string) — PlacementID is the project placement this instance belongs to (e.g. "1").
    - `status` (string) — Status is the current processing status of the resource.
    - `updatedAt` (string) — UpdatedAt is the time of the last status update.
    - `messages` (object[]) — Messages contains any status messages, such as error details.
      - `message` (string)
  - `endpoints` (object) — ProjectEndpoint represents the endpoints of a project.
    - `http` (object) — Endpoint represents a network endpoint.
      - `url` (string) — Complete URL (e.g. https://prj-123123.api.diagrid.io:443).
      - `scheme` (string) — Scheme (http, https).
      - `host` (string) — Host (e.g. localhost, prj-123123.api.diagrid.io).
      - `port` (integer) — Port (e.g. 80, 443).
    - `grpc` (object) — Endpoint represents a network endpoint.
      - `url` (string) — Complete URL (e.g. https://prj-123123.api.diagrid.io:443).
      - `scheme` (string) — Scheme (http, https).
      - `host` (string) — Host (e.g. localhost, prj-123123.api.diagrid.io).
      - `port` (integer) — Port (e.g. 80, 443).
  - `regionEndpoints` (object[]) — RegionEndpoints lists the project's endpoints in every region it is placed in, one entry per region, ordered by region name. A project in a region group has one entry per member region; a project in a single region has one. The endpoints field above repeats the first of these entries that is serving the project, and does not follow which region's database takes writes.
    - `region` (string) — Region is the region the endpoints are served from.
    - `http` (object) — Endpoint represents a network endpoint.
      - `url` (string) — Complete URL (e.g. https://prj-123123.api.diagrid.io:443).
      - `scheme` (string) — Scheme (http, https).
      - `host` (string) — Host (e.g. localhost, prj-123123.api.diagrid.io).
      - `port` (integer) — Port (e.g. 80, 443).
    - `grpc` (object) — Endpoint represents a network endpoint.
      - `url` (string) — Complete URL (e.g. https://prj-123123.api.diagrid.io:443).
      - `scheme` (string) — Scheme (http, https).
      - `host` (string) — Host (e.g. localhost, prj-123123.api.diagrid.io).
      - `port` (integer) — Port (e.g. 80, 443).
    - `oidc` (string) — OIDC is the region's public OIDC issuer URL: it serves the discovery documents (openid-configuration, JWKS) that verify the workload identities this project's App IDs are issued in that region. Empty when the region has no public issuer.
  - `defaultWorkflowStoreEnabled` (boolean)
  - `externalWorkflowStoreRef` (string) — ExternalWorkflowStoreRef references the external workflow store; unset when defaultWorkflowStoreEnabled is true.
  - `disableAppTunnels` (boolean)

Example:

```json
{
  "apiVersion": "cra.diagrid.io/v1beta1",
  "kind": "Project",
  "metadata": {
    "name": "my-project"
  },
  "spec": {
    "displayName": "My Project",
    "region": "us-east-1",
    "defaultPubsubEnabled": true,
    "defaultKVStoreEnabled": true
  }
}
```

`application/vnd.api+json`

JSONAPI.org specification project response wrapper for UI.

- `data` (object) — Required.
  - `type` (string) — Type of the resource object.
  - `id` (string) — Unique identifier of the resource object.
  - `attributes` (object)
    - `apiVersion` (string)
    - `kind` (string)
    - `metadata` (object)
      - `name` (string)
      - `uid` (string)
      - `resourceVersion` (integer)
      - `createdAt` (string)
      - `updatedAt` (string)
      - `deletedAt` (string)
      - `labels` (object<string, string>)
      - `annotations` (object)
    - `spec` (object) — ProjectSpec is the project configuration exposed by the API.
      - `displayName` (string)
      - `region` (string) — Immutable. Region is optional on create — the server assigns the org's default region when it is omitted. It is immutable once set.
      - `regionGroup` (string) — Immutable. RegionGroup names the region group the project is placed in, instead of a single region. Empty for an ordinary single-region project. Mutually exclusive with Region, and immutable: a project is created into a group or into a region, and cannot be moved between them afterwards.
      - `privateRegion` (boolean)
      - `defaultPubsubEnabled` (boolean)
      - `defaultKVStoreEnabled` (boolean)
      - `defaultWorkflowStoreEnabled` (boolean)
      - `defaultAgentInfrastructureEnabled` (boolean)
      - `agentRegistryStore` (string) — AgentRegistryStore names the KVStore backing the managed agent-registry component; empty means the default managed KVStore.
      - `disableAppTunnels` (boolean)
      - `enableWorkflowHistorySigning` (boolean) — Immutable. EnableWorkflowHistorySigning turns on Dapr workflow history signing for the project's sidecars. Settable only at creation time.
      - `globalAppId` (object) — GlobalAppIDSpec defines global settings that apply to all appids in a project.
        - `maxBodySize` (string)
    - `status` (object) — ProjectStatus represents the status of a project.
      - `status` (string) — Status is the current processing status of the resource.
      - `updatedAt` (string) — UpdatedAt is the time of the last status update.
      - `messages` (object[]) — Messages contains any status messages, such as error details.
        - `message` (string)
      - `instances` (object[]) — Instances includes the status for each instance of the resource.
        - `cluster` (string) — Cluster is the name of the cluster hosting this instance.
        - `region` (string) — Region is the region where the instance is located (e.g. "us-east-1").
        - `placementId` (string) — PlacementID is the project placement this instance belongs to (e.g. "1").
        - `status` (string) — Status is the current processing status of the resource.
        - `updatedAt` (string) — UpdatedAt is the time of the last status update.
        - `messages` (object[]) — Messages contains any status messages, such as error details.
          - `message` (string)
      - `endpoints` (object) — ProjectEndpoint represents the endpoints of a project.
        - `http` (object) — Endpoint represents a network endpoint.
          - `url` (string) — Complete URL (e.g. https://prj-123123.api.diagrid.io:443).
          - `scheme` (string) — Scheme (http, https).
          - `host` (string) — Host (e.g. localhost, prj-123123.api.diagrid.io).
          - `port` (integer) — Port (e.g. 80, 443).
        - `grpc` (object) — Endpoint represents a network endpoint.
          - `url` (string) — Complete URL (e.g. https://prj-123123.api.diagrid.io:443).
          - `scheme` (string) — Scheme (http, https).
          - `host` (string) — Host (e.g. localhost, prj-123123.api.diagrid.io).
          - `port` (integer) — Port (e.g. 80, 443).
      - `regionEndpoints` (object[]) — RegionEndpoints lists the project's endpoints in every region it is placed in, one entry per region, ordered by region name. A project in a region group has one entry per member region; a project in a single region has one. The endpoints field above repeats the first of these entries that is serving the project, and does not follow which region's database takes writes.
        - `region` (string) — Region is the region the endpoints are served from.
        - `http` (object) — Endpoint represents a network endpoint.
          - `url` (string) — Complete URL (e.g. https://prj-123123.api.diagrid.io:443).
          - `scheme` (string) — Scheme (http, https).
          - `host` (string) — Host (e.g. localhost, prj-123123.api.diagrid.io).
          - `port` (integer) — Port (e.g. 80, 443).
        - `grpc` (object) — Endpoint represents a network endpoint.
          - `url` (string) — Complete URL (e.g. https://prj-123123.api.diagrid.io:443).
          - `scheme` (string) — Scheme (http, https).
          - `host` (string) — Host (e.g. localhost, prj-123123.api.diagrid.io).
          - `port` (integer) — Port (e.g. 80, 443).
        - `oidc` (string) — OIDC is the region's public OIDC issuer URL: it serves the discovery documents (openid-configuration, JWKS) that verify the workload identities this project's App IDs are issued in that region. Empty when the region has no public issuer.
      - `defaultWorkflowStoreEnabled` (boolean)
      - `externalWorkflowStoreRef` (string) — ExternalWorkflowStoreRef references the external workflow store; unset when defaultWorkflowStoreEnabled is true.
      - `disableAppTunnels` (boolean)
  - `relationships` (object<string, object>) — Members of the relationships object represent references from the resource object in which it's defined to other resource objects.
    - Any of:
      - **option 1**
      - **option 2**
      - **option 3**
  - `links` (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.
  - `meta` (object) — Non-standard meta-information that can not be represented as an attribute or relationship.
- `links` (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.

## Responses

### 202 — Accepted for asynchronous processing.

### 403 — You are not authorized to perform this action.

`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.

### 404 — The project was not found.

`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.

### 409 — The request conflicts with the current state of the project.

`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.

### 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.
