Nile Credentials API

The credentials API from Nile — 3 operation(s) for credentials.

Operations 4

GET /workspaces/{workspaceSlug}/databases/{databaseName}/credentials Lists credentials for a database #
POST /workspaces/{workspaceSlug}/databases/{databaseName}/credentials Create a database credential #
DELETE /workspaces/{workspaceSlug}/databases/{databaseName}/credentials/{credentialId} Delete a database credential #
POST /workspaces/{workspaceSlug}/databases/{databaseName}/credentials/rotate Rotate a database credential #

Specifications

Schemas & Data

📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-apierror-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-create-database-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-get-database-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-dedicated-compute-instance-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-unauthenticated-provision-database-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-workspace-usage-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-oidcprovider-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-user-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-tenant-ssoregistration-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-logical-database-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-oidcrelying-party-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-create-basic-user-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-mfa-setup-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-mfa-disable-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-tenant-user-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-mfa-verify-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/thenile/json-schema/thenile-mfa-verify-response-schema.json

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/thenile:thenile-credentials-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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

thenile-credentials-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Thenile Credentials API
  version: 0.1.0-72f73d7
  contact:
    email: support@thenile.dev
  description: 'Operations tagged credentials across 2 of this provider''s published API definitions: global-openapi.json, thenile-global-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://global.thenile.dev
tags:
- name: Credentials
paths:
  /workspaces/{workspaceSlug}/databases/{databaseName}/credentials:
    get:
      tags:
      - Credentials
      summary: Lists credentials for a database
      description: 'Lists all credentials that exist for a database. The id of the credential is

        included in the response, but not the password. Passwords are provided only once,

        at the time the credential is created, and are encrypted for storage.'
      operationId: listCredentials
      parameters:
      - name: workspaceSlug
        in: path
        required: true
        schema:
          type: string
      - name: databaseName
        in: path
        required: true
        schema:
          type: string
      - name: tenantId
        in: query
        schema:
          type: string
      - name: internal
        in: query
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: A list of Credential objects
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GetCredentialResponse'
        '401':
          description: Unauthorized. Credentials were missing or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: Forbidden. The credentials provided do not grant access to the requested resource(s).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
      security:
      - jwtBearerAuth: []
    post:
      tags:
      - Credentials
      summary: Create a database credential
      description: 'Generates a new secure credential for a database. The generated password is

        returned in the response, and is the only time the password is available in

        plaintext. No request body is required."'
      operationId: createCredential
      parameters:
      - name: workspaceSlug
        in: path
        required: true
        schema:
          type: string
      - name: databaseName
        in: path
        required: true
        schema:
          type: string
      - name: tenantId
        in: query
        schema:
          type: string
      - name: internal
        in: query
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: Credential created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCredentialResponse'
        '401':
          description: Unauthorized. Credentials were missing or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: Forbidden. The credentials provided do not grant access to the requested resource(s).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
      security:
      - jwtBearerAuth: []
    servers:
    - url: https://global.thenile.dev
  /workspaces/{workspaceSlug}/databases/{databaseName}/credentials/{credentialId}:
    delete:
      tags:
      - Credentials
      summary: Delete a database credential
      description: Deletes an existing database credential. No request body is required."
      operationId: deleteCredential
      parameters:
      - name: workspaceSlug
        in: path
        required: true
        schema:
          type: string
      - name: databaseName
        in: path
        required: true
        schema:
          type: string
      - name: credentialId
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Credential deleted
        '401':
          description: Unauthorized. Credentials were missing or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
        '403':
          description: Forbidden. The credentials provided do not grant access to the requested resource(s).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
      security:
      - jwtBearerAuth: []
    servers:
    - url: https://global.thenile.dev
  /workspaces/{workspaceSlug}/databases/{databaseName}/credentials/rotate:
    post:
      tags:
      - Credentials
      summary: Rotate a database credential
      description: Generates a new credential and schedules existing credentials for deletion after the provided delay.
      operationId: rotateCredential
      parameters:
      - name: workspaceSlug
        in: path
        required: true
        schema:
          type: string
      - name: databaseName
        in: path
        required: true
        schema:
          type: string
      - name: tenantId
        in: query
        schema:
          type: string
      - name: internal
        in: query
        schema:
          type: boolean
          default: false
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/RotateCredentialRequest'
      responses:
        '200':
          description: New credential after rotation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCredentialResponse'
      security:
      - jwtBearerAuth: []
    servers:
    - url: https://global.thenile.dev
components:
  schemas:
    DatabaseParentResponse:
      required:
      - id
      - name
      type: object
      properties:
        id:
          type: string
        name:
          minLength: 1
          type: string
    Workspace:
      required:
      - name
      - slug
      type: object
      properties:
        id:
          type: string
        name:
          minLength: 1
          type: string
        slug:
          minLength: 1
          type: string
        stripe_customer_id:
          type: string
        created:
          type: string
          format: date-time
    GetDatabaseResponse:
      required:
      - expandable
      - id
      - name
      - region
      - status
      - workspace
      type: object
      properties:
        id:
          type: string
        name:
          minLength: 1
          type: string
        workspace:
          $ref: '#/components/schemas/Workspace'
        status:
          type: string
          enum:
          - PENDING
          - REQUESTED
          - BUILT
          - POOLED
          - READY
        region:
          type: string
          enum:
          - AWS_US_WEST_2
          - AWS_US_EAST_1
          - AWS_EU_CENTRAL_1
          - AZURE_EASTUS
        expandable:
          type: boolean
        created:
          type: string
          format: date-time
        deleted:
          type: string
          format: date-time
        apiHost:
          type:
          - string
          - 'null'
          description: Public database API URL; Since it is only used for tenants/users management, it is null for un-sharded databases.
          format: uri
        dbHost:
          type: string
          format: uri
        parent:
          $ref: '#/components/schemas/DatabaseParentResponse'
    APIError:
      required:
      - errorCode
      - message
      - statusCode
      type: object
      properties:
        errorCode:
          type: string
          enum:
          - internal_error
          - bad_request
          - unsupported_operation
          - forbidden_operation
          - entity_not_found
          - duplicate_entity
          - invalid_credentials
          - unknown_oidc_provider
          - unknown_oidc_party
          - provider_already_exists
          - provider_config_error
          - provider_mismatch
          - provider_update_error
          - provider_disabled
          - session_state_missing
          - session_state_mismatch
          - oidc_code_missing
          - tenant_not_found
          - constraint_violation
          - sql_exception
          - db_creation_failure
          - db_rename_failure
          - db_status_failure
          - db_initialization_failure
          - db_deletion_failure
          - db_config_missing
          - unauthorized_workspace_access
          - email_send_failure
          - jdbc_exception
          - oidc_exception
          - region_mismatch
          - credential_creation_failure
          - credential_propagation_failure
          - unauthorized_client
          - unsupported_response_type
          - invalid_request
          - server_error
          - access_denied
          - feature_ineligible
          - customer_lookup_failure
          - threshold_exceeded
          - create_rejected
        message:
          minLength: 1
          type: string
        statusCode:
          type: integer
          format: int32
    GetCredentialResponse:
      required:
      - database
      - id
      type: object
      properties:
        id:
          minLength: 1
          type: string
        database:
          $ref: '#/components/schemas/GetDatabaseResponse'
        tenant:
          type: string
        internal:
          type: boolean
        created:
          type: string
          format: date-time
    RotateCredentialRequest:
      type: object
      properties:
        delayOldSecretsExpirationHours:
          maximum: 720
          minimum: 0
          type: number
          format: double
        reason:
          type: string
    CreateCredentialResponse:
      required:
      - database
      - id
      - password
      type: object
      properties:
        id:
          minLength: 1
          type: string
        database:
          $ref: '#/components/schemas/GetDatabaseResponse'
        tenant:
          type: string
        internal:
          type: boolean
        password:
          minLength: 1
          type: string
        created:
          type: string
          format: date-time
  securitySchemes:
    jwtBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-refined-from:
- global-openapi.json
- thenile-global-openapi.yml
x-provenance:
  method: harvested
  publisher: Nile
  source: https://global.thenile.dev/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)