Documentação Pixel Host
Bancos de dados
Consulte contas gerenciadas e crie bancos para plugins e integrações.Endpoints
/servers/{serverId}/databasesLista contas e mecanismos disponíveis.
- Permissão
database.read
Como enviar
curl -sS -X GET \
-H "Authorization: Bearer $PIXEL_HOST_TOKEN" \
"https://pixel-host.com.br/api/v1/servers/SEU_SERVER_ID/databases"Resposta HTTP 200
{
"accounts": [],
"engines": { "postgresql": true, "mariadb": true, "mongodb": true }
}/servers/{serverId}/databasesCria um banco gerenciado.
- Permissão
database.create
Como enviar
curl -sS -X POST \
-H "Authorization: Bearer $PIXEL_HOST_TOKEN" \
-H "Content-Type: application/json" \
--data '{ "engine": "postgresql", "name": "meu_plugin", "password": "senha-forte" }' \
"https://pixel-host.com.br/api/v1/servers/SEU_SERVER_ID/databases"Corpo JSON formatado
{ "engine": "postgresql", "name": "meu_plugin", "password": "senha-forte" }Resposta HTTP 201
{
"accounts": [
{ "engine": "postgresql", "username": "px_srv", "databases": [{ "name": "meu_plugin" }] }
],
"engines": { "postgresql": true }
}