Portabase DashboardAPIDatabases
Get database by ID
GET
apiKeyAuthheader
x-api-key<token>API key generated from the Portabase dashboard. Pass as the x-api-key header.
id*stringFormat
uuidDatabase details
application/json- response
data*Example Request
curl -X GET 'https://portabase.example.com/api/v1/databases/123e4567-e89b-12d3-a456-426614174000'Example Response
{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "agentDatabaseId": "78f4c143-eccc-413e-8e8a-868364d45b73", "name": "string", "dbms": "postgresql", "description": "string", "backupPolicy": "string", "isWaitingForBackup": true, "backupToRestore": "string", "backupEngine": "archive", "methodConflict": "string", "fullBackupCron": "string", "healthErrorCount": -2147483648, "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2", "lastContact": "2019-08-24T14:15:22Z", "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8", "updatedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "retentionPolicy": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "databaseId": "d0f4f849-8ecf-4909-96bf-7953790e45f9", "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8", "type": "count", "count": -2147483648, "days": -2147483648, "gfsHourly": -2147483648, "gfsDaily": -2147483648, "gfsWeekly": -2147483648, "gfsMonthly": -2147483648, "gfsYearly": -2147483648, "updatedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z" } }}Declare a database on an agent POST
Same as Add database on the agent page: the dashboard stores the configuration (secrets encrypted) and sends it to the agent at its next ping. Requires system admin rights for a global agent, or canManageAgents in the agent's organization. projectId also attaches the database to that project (canManageSettings in its organization).
Attach the database to a project, or detach it (projectId: null) PATCH
Next Page