Users

Everything about PostgreSQL users.

List users

get

Retrieves a list of users

Authorizations
Path parameters
clusterIdstringRequired

The unique ID of the cluster.

Example: 498ae72f-411f-11eb-9d07-046c59cc737e
Query parameters
limitinteger · min: 1 · max: 1000Optional

The maximum number of elements to return. Use together with 'offset' for pagination.

Default: 100Example: 100
offsetintegerOptional

The first element to return. Use together with 'limit' for pagination.

Default: 0Example: 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
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 user

post

Create a new Postgres User

Authorizations
Path parameters
clusterIdstringRequired

The unique ID of the cluster.

Example: 498ae72f-411f-11eb-9d07-046c59cc737e
Body
Responses
200
Successful operation.
application/json
Responseall of
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
  }
}

Get user

get

Retrieves a single user

Authorizations
Path parameters
clusterIdstringRequired

The unique ID of the cluster.

Example: 498ae72f-411f-11eb-9d07-046c59cc737e
usernamestring · min: 1 · max: 63Required

The authentication username.

Example: benjamin
Responses
200
Successful operation.
application/json
Responseall of
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
  }
}

Delete user

delete

Deletes a single user

Authorizations
Path parameters
clusterIdstringRequired

The unique ID of the cluster.

Example: 498ae72f-411f-11eb-9d07-046c59cc737e
usernamestring · min: 1 · max: 63Required

The authentication username.

Example: benjamin
Responses
204
Successful response
delete
DELETE /databases/postgresql/clusters/{clusterId}/users/{username} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*

No content

Patch user

patch

Patches a single user. Only changing the password is supported. System users cannot be patched.

Authorizations
Path parameters
clusterIdstringRequired

The unique ID of the cluster.

Example: 498ae72f-411f-11eb-9d07-046c59cc737e
usernamestring · min: 1 · max: 63Required

The authentication username.

Example: benjamin
Body
Responses
200
Successful operation.
application/json
Responseall of
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?