Scaleway Privileges API

Privileges are permissions that can be granted to database users. You can manage user permissions either via the console, the Scaleway APIs or SQL. Managed Database for PostgreSQL and MySQL provides a simplified and unified permission model through the API and the console to make things easier to manage and understand. Each user has associated permissions that give them access to zero or more logical databases. These include: * **None:** No access to the database * **Read:** Allow users to read tables and fields in a database * **Write:** Allow users to write content in databases. * **Admin:** Read and write access to the data, and extended privileges depending on the database engine.

Operations 2

GET /rdb/v1/regions/{region}/instances/{instance_id}/privileges List user privileges for a database #
PUT /rdb/v1/regions/{region}/instances/{instance_id}/privileges Set user privileges for a database #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/scaleway-privileges-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

scaleway-privileges-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Managed Database for PostgreSQL and MySQL Privileges API
  description: Managed Database for PostgreSQL and MySQL provides fully-managed relational Database Instances, with MySQL or PostgreSQL as database engines.
  version: v1
servers:
- url: https://api.scaleway.com
tags:
- name: Privileges
  description: Privileges are permissions that can be granted to database users.
paths:
  /rdb/v1/regions/{region}/instances/{instance_id}/privileges:
    get:
      tags:
      - Privileges
      operationId: ListPrivileges
      summary: List user privileges for a database
      description: List privileges of a user on a database. By default, the details returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as `database_name` and `user_name`.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: instance_id
        description: UUID of the Database Instance.
        required: true
        schema:
          type: string
      - in: query
        name: order_by
        description: Criteria to use when ordering privileges listing.
        schema:
          type: string
          enum:
          - user_name_asc
          - user_name_desc
          - database_name_asc
          - database_name_desc
          default: user_name_asc
      - in: query
        name: page
        schema:
          $ref: '#/components/schemas/google.protobuf.Int32Value'
      - in: query
        name: page_size
        schema:
          type: integer
          format: uint32
      - in: query
        name: database_name
        description: Name of the database.
        schema:
          type: string
      - in: query
        name: user_name
        description: Name of the user.
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.rdb.v1.ListPrivilegesResponse'
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: "curl -X GET \\\n  -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n  \"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/privileges\""
      - lang: HTTPie
        source: "http GET \"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/privileges\" \\\n  X-Auth-Token:$SCW_SECRET_KEY"
    put:
      tags:
      - Privileges
      operationId: SetPrivilege
      summary: Set user privileges for a database
      description: Set the privileges of a user on a database. You must define `database_name`, `user_name` and `permission` in the request body.
      parameters:
      - in: path
        name: region
        description: The region you want to target
        required: true
        schema:
          type: string
          enum:
          - fr-par
          - nl-ams
          - pl-waw
      - in: path
        name: instance_id
        description: UUID of the Database Instance.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/scaleway.rdb.v1.Privilege'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                database_name:
                  type: string
                  description: Name of the database.
                user_name:
                  type: string
                  description: Name of the user.
                permission:
                  type: string
                  description: Permission to set (Read, Read/Write, All, Custom).
                  enum:
                  - readonly
                  - readwrite
                  - all
                  - custom
                  - none
                  default: readonly
              x-properties-order:
              - database_name
              - user_name
              - permission
      security:
      - scaleway: []
      x-codeSamples:
      - lang: cURL
        source: "curl -X PUT \\\n  -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"database_name\":\"string\",\"user_name\":\"string\"}' \\\n  \"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/privileges\""
      - lang: HTTPie
        source: "http PUT \"https://api.scaleway.com/rdb/v1/regions/{region}/instances/{instance_id}/privileges\" \\\n  X-Auth-Token:$SCW_SECRET_KEY \\\n  database_name=\"string\" \\\n  user_name=\"string\""
components:
  schemas:
    scaleway.rdb.v1.Privilege:
      type: object
      properties:
        permission:
          type: string
          description: Permission (Read, Read/Write, All, Custom).
          enum:
          - readonly
          - readwrite
          - all
          - custom
          - none
          default: readonly
        database_name:
          type: string
          description: Name of the database.
        user_name:
          type: string
          description: Name of the user.
      x-properties-order:
      - permission
      - database_name
      - user_name
    scaleway.rdb.v1.ListPrivilegesResponse:
      type: object
      properties:
        privileges:
          type: array
          description: Privileges of a user in a database in a Database Instance.
          items:
            $ref: '#/components/schemas/scaleway.rdb.v1.Privilege'
        total_count:
          type: integer
          description: Total count of privileges present on a database.
          format: uint32
      x-properties-order:
      - privileges
      - total_count
    google.protobuf.Int32Value:
      type: integer
      format: int32
      nullable: true
  securitySchemes:
    scaleway:
      in: header
      name: X-Auth-Token
      type: apiKey