Portabase Logo
Portabase DashboardAPIProjects

Replace the storage policies of a project

The list replaces all of the project's storage policies in one step. Every channel must be one the organization can use (its own or an assigned global storage channel). With no enabled storage policy left, backups go to the instance's default storage.

PUT
/projects/{id}/storage-policy

The list replaces all of the project's storage policies in one step. Every channel must be one the organization can use (its own or an assigned global storage channel). With no enabled storage policy left, backups go to the instance's default storage.

Authorization

apiKeyAuth
headerx-api-key<token>

API key generated from the Portabase dashboard. Pass as the x-api-key header.

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
policies*array<>

Response Body

Storage policies

application/json
  1. response
data*array<>
Example Request
curl -X PUT 'https://portabase.example.com/api/v1/projects/123e4567-e89b-12d3-a456-426614174000/storage-policy' \  -H 'Content-Type: application/json' \  -d '{  "policies": [    {      "storageChannelId": "b1f34603-bc6d-47ef-9b4b-df6729e51ad4"    }  ]}'
Example Response
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "storageChannelId": "b1f34603-bc6d-47ef-9b4b-df6729e51ad4",      "enabled": true,      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "channel": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "name": "string",        "provider": "string",        "enabled": true      }    }  ]}