curl
curl -sS -X POST "https://gateway.orbit/api/v1/database-connections/app/users" \
--cacert /path/to/orbit-root-ca.pem \
-H 'Accept: application/json' \
-H 'X-Orbit-Request-Id: 9d6b1e5c-4a3f-4a1b-9f0e-6d2c3f5a7b81' \
-H 'Content-Type: application/json' \
-d '{"username": "app", "password": "secret", "read_only": true}'{
"data": {
"id": 123,
"database_connection_id": 123,
"username": "<string>",
"privileges": "<string>",
"created_by": "<string>",
"created_at": "<string>"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"data": {
"id": 123,
"database_connection_id": 123,
"username": "<string>",
"privileges": "<string>",
"created_by": "<string>",
"created_at": "<string>"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Database connections
Add a database user
Adds a user to a database on a Database server, or sets the password and privileges of an existing one. read_only grants SELECT; otherwise the user gets all privileges on the database. A connection without a server returns database.server_required. The username of a connection on the server returns database.name_conflict.
POST
/
api
/
v1
/
database-connections
/
{database_connection}
/
users
curl
curl -sS -X POST "https://gateway.orbit/api/v1/database-connections/app/users" \
--cacert /path/to/orbit-root-ca.pem \
-H 'Accept: application/json' \
-H 'X-Orbit-Request-Id: 9d6b1e5c-4a3f-4a1b-9f0e-6d2c3f5a7b81' \
-H 'Content-Type: application/json' \
-d '{"username": "app", "password": "secret", "read_only": true}'{
"data": {
"id": 123,
"database_connection_id": 123,
"username": "<string>",
"privileges": "<string>",
"created_by": "<string>",
"created_at": "<string>"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"data": {
"id": 123,
"database_connection_id": 123,
"username": "<string>",
"privileges": "<string>",
"created_by": "<string>",
"created_at": "<string>"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Path Parameters
Database connection slug.
Pattern:
^[a-z0-9]+(?:-[a-z0-9]+)*$Body
application/json