Users
Everything about PostgreSQL users.
Retrieves a list of users
Authorizations
Path parameters
clusterIdstringRequiredExample:
The unique ID of the cluster.
498ae72f-411f-11eb-9d07-046c59cc737e
Query parameters
limitinteger · min: 1 · max: 1000OptionalDefault:
The maximum number of elements to return. Use together with 'offset' for pagination.
100
Example: 100
offsetintegerOptionalDefault:
The first element to return. Use together with 'limit' for pagination.
0
Example: 200
systembooleanOptional
If set to 'true' all users, including system users are returned. System users cannot be deleted or updated.
Responses
200
Successful operation.
application/json
Responseall of
default
Any erroneous status code: 400 (parse error), 401 (auth error),
402 (trial access), 403 (insufficient permissions), 404 (not found),
405 (unsupported HTTP method), 415 (unsupported content type,
422 (validation error), 429 (request rate limit exceeded),
500 (server error), 503 (maintenance)
application/json
get
GET /databases/postgresql/clusters/{clusterId}/users HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
"offset": 200,
"limit": 100,
"_links": {
"prev": "<PREVIOUS-PAGE-URI>",
"self": "<THIS-PAGE-URI>",
"next": "<NEXT-PAGE-URI>"
},
"type": "collection",
"id": "498ae72f-411f-11eb-9d07-046c59cc737e",
"href": "text",
"items": [
{
"type": "collection",
"id": "498ae72f-411f-11eb-9d07-046c59cc737e",
"href": "text",
"metadata": {
"createdBy": "ionos:iam:cloud::users/f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"createdByUserId": "f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"createdDate": "2023-05-11T13:37:50Z",
"lastModifiedBy": "ionos:iam:cloud::users/f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"lastModifiedByUserId": "f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"lastModifiedDate": "2023-05-11T13:37:50Z",
"resourceURN": "ionos:postgresql:de-fra:11274857:clusters/c668480f-8627-4b6c-b422-2599d4b568a6/users/benjamin"
},
"properties": {
"username": "benjamin",
"system": false
}
}
]
}
Create a new Postgres User
Authorizations
Path parameters
clusterIdstringRequiredExample:
The unique ID of the cluster.
498ae72f-411f-11eb-9d07-046c59cc737e
Body
Responses
200
Successful operation.
application/json
Responseall of
default
Any erroneous status code: 400 (parse error), 401 (auth error),
402 (trial access), 403 (insufficient permissions), 404 (not found),
405 (unsupported HTTP method), 415 (unsupported content type,
422 (validation error), 429 (request rate limit exceeded),
500 (server error), 503 (maintenance)
application/json
post
POST /databases/postgresql/clusters/{clusterId}/users HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 62
{
"properties": {
"username": "benjamin",
"password": "TopSecret!"
}
}
{
"type": "collection",
"id": "498ae72f-411f-11eb-9d07-046c59cc737e",
"href": "text",
"metadata": {
"createdBy": "ionos:iam:cloud::users/f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"createdByUserId": "f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"createdDate": "2023-05-11T13:37:50Z",
"lastModifiedBy": "ionos:iam:cloud::users/f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"lastModifiedByUserId": "f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"lastModifiedDate": "2023-05-11T13:37:50Z",
"resourceURN": "ionos:postgresql:de-fra:11274857:clusters/c668480f-8627-4b6c-b422-2599d4b568a6/users/benjamin"
},
"properties": {
"username": "benjamin",
"system": false
}
}
Retrieves a single user
Authorizations
Path parameters
clusterIdstringRequiredExample:
The unique ID of the cluster.
498ae72f-411f-11eb-9d07-046c59cc737e
usernamestring · min: 1 · max: 63RequiredExample:
The authentication username.
benjamin
Responses
200
Successful operation.
application/json
Responseall of
default
Any erroneous status code: 400 (parse error), 401 (auth error),
402 (trial access), 403 (insufficient permissions), 404 (not found),
405 (unsupported HTTP method), 415 (unsupported content type,
422 (validation error), 429 (request rate limit exceeded),
500 (server error), 503 (maintenance)
application/json
get
GET /databases/postgresql/clusters/{clusterId}/users/{username} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
"type": "collection",
"id": "498ae72f-411f-11eb-9d07-046c59cc737e",
"href": "text",
"metadata": {
"createdBy": "ionos:iam:cloud::users/f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"createdByUserId": "f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"createdDate": "2023-05-11T13:37:50Z",
"lastModifiedBy": "ionos:iam:cloud::users/f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"lastModifiedByUserId": "f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"lastModifiedDate": "2023-05-11T13:37:50Z",
"resourceURN": "ionos:postgresql:de-fra:11274857:clusters/c668480f-8627-4b6c-b422-2599d4b568a6/users/benjamin"
},
"properties": {
"username": "benjamin",
"system": false
}
}
Deletes a single user
Authorizations
Path parameters
clusterIdstringRequiredExample:
The unique ID of the cluster.
498ae72f-411f-11eb-9d07-046c59cc737e
usernamestring · min: 1 · max: 63RequiredExample:
The authentication username.
benjamin
Responses
204
Successful response
default
Any erroneous status code: 400 (parse error), 401 (auth error),
402 (trial access), 403 (insufficient permissions), 404 (not found),
405 (unsupported HTTP method), 415 (unsupported content type,
422 (validation error), 429 (request rate limit exceeded),
500 (server error), 503 (maintenance)
application/json
delete
DELETE /databases/postgresql/clusters/{clusterId}/users/{username} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
No content
Patches a single user. Only changing the password is supported. System users cannot be patched.
Authorizations
Path parameters
clusterIdstringRequiredExample:
The unique ID of the cluster.
498ae72f-411f-11eb-9d07-046c59cc737e
usernamestring · min: 1 · max: 63RequiredExample:
The authentication username.
benjamin
Body
Responses
200
Successful operation.
application/json
Responseall of
default
Any erroneous status code: 400 (parse error), 401 (auth error),
402 (trial access), 403 (insufficient permissions), 404 (not found),
405 (unsupported HTTP method), 415 (unsupported content type,
422 (validation error), 429 (request rate limit exceeded),
500 (server error), 503 (maintenance)
application/json
patch
PATCH /databases/postgresql/clusters/{clusterId}/users/{username} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 40
{
"properties": {
"password": "TopSecret!"
}
}
{
"type": "collection",
"id": "498ae72f-411f-11eb-9d07-046c59cc737e",
"href": "text",
"metadata": {
"createdBy": "ionos:iam:cloud::users/f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"createdByUserId": "f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"createdDate": "2023-05-11T13:37:50Z",
"lastModifiedBy": "ionos:iam:cloud::users/f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"lastModifiedByUserId": "f719718d-e0aa-4870-a36c-cc0bdb8c6d90",
"lastModifiedDate": "2023-05-11T13:37:50Z",
"resourceURN": "ionos:postgresql:de-fra:11274857:clusters/c668480f-8627-4b6c-b422-2599d4b568a6/users/benjamin"
},
"properties": {
"username": "benjamin",
"system": false
}
}
Was this helpful?