Environment Shares API
Get all shares of the environment
| Path | Method | Protected |
|---|---|---|
/v1/envs/{environment_id}/shares | GET | Yes |
Example Response JSON
{
"values": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"revision": 0,
"environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563",
"granteeAccountId": "210f854b-3301-464e-9bfd-4e6f0bdab57d",
"roles": [
"admin"
]
}
]
}Create a new environment share
| Path | Method | Protected |
|---|---|---|
/v1/envs/{environment_id}/shares | POST | Yes |
Example Request JSON
{
"granteeAccountId": "210f854b-3301-464e-9bfd-4e6f0bdab57d",
"roles": [
"admin"
]
}Example Response JSON
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"revision": 0,
"environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563",
"granteeAccountId": "210f854b-3301-464e-9bfd-4e6f0bdab57d",
"roles": [
"admin"
]
}Get environment share by id.
| Path | Method | Protected |
|---|---|---|
/v1/environment-shares/{environment_share_id} | GET | Yes |
Example Response JSON
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"revision": 0,
"environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563",
"granteeAccountId": "210f854b-3301-464e-9bfd-4e6f0bdab57d",
"roles": [
"admin"
]
}Delete environment share
| Path | Method | Protected |
|---|---|---|
/v1/environment-shares/{environment_share_id} | DELETE | Yes |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| current_revision | integer | Yes | - |
Example Response JSON
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"revision": 0,
"environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563",
"granteeAccountId": "210f854b-3301-464e-9bfd-4e6f0bdab57d",
"roles": [
"admin"
]
}Update environment share
| Path | Method | Protected |
|---|---|---|
/v1/environment-shares/{environment_share_id} | PATCH | Yes |
Example Request JSON
{
"currentRevision": 0,
"roles": [
"admin"
]
}Example Response JSON
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"revision": 0,
"environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563",
"granteeAccountId": "210f854b-3301-464e-9bfd-4e6f0bdab57d",
"roles": [
"admin"
]
}Environment Shares API Errors
| Status Code | Description | Body |
|---|---|---|
| 400 | Invalid request, returning with a list of issues detected in the request | {"errors":["string"]} |
| 401 | Unauthorized request | {"error":"string"} |
| 403 | Forbidden Request | {"error":"string"} |
| 404 | Entity not found | {"error":"string"} |
| 409 | {"error":"string"} | |
| 422 | Limits of the plan exceeded | {"error":"string"} |
| 500 | Internal server error | {"error":"string"} |