SlashID Organization External Credentials API

The Organization External Credentials API from SlashID — 2 operation(s) for organization external credentials.

OpenAPI Specification

slashid-organization-external-credentials-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: SlashID Groups Organization External Credentials API
  description: "This is the [OpenAPI](https://www.openapis.org/) specification for communicating with the [SlashID](https://www.slashid.dev/) service.\n\nThe latest version of the OpenAPI API spec can be fetched from [our CDN](https://cdn.slashid.com/slashid-openapi-latest.yaml).\n\nWe recommend you use an [OpenAPI SDK generator](https://openapi.tools/#sdk) to create a client library in your programming language,\nbut you can also use this documentation to make HTTP calls directly.\n\n> **Compatibility note**: We aim to keep wire compatibility whenever we update the API, but parts of the specification may occasionally be refactored.\n  If you use an SDK generator, your code may require minor changes between versions.\n"
  version: '1.1'
  termsOfService: https://www.slashid.dev/terms-of-use/
  contact:
    name: API Support
    email: contact@slashid.dev
servers:
- url: https://api.slashid.com
  description: Production
- url: https://api.sandbox.slashid.com
  description: Sandbox
security:
- ApiKeyAuth: []
tags:
- name: Organization External Credentials
paths:
  /organizations/config/external-credentials:
    parameters:
    - $ref: '#/components/parameters/OrgIDHeader'
    get:
      operationId: GetOrganizationsConfigExternalCredentials
      x-rbac-enabled: true
      x-rbac-allowed-groups: admin,member
      tags:
      - Organization External Credentials
      summary: List available external credentials
      description: 'Lists the all available external credentials for third party services. The call doesn''t return any key material, credential IDs can be used to retrieve the credential.

        '
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/APIResponseBase'
                - type: object
                  properties:
                    result:
                      type: array
                      items:
                        $ref: '#/components/schemas/ExternalCredential'
        '400':
          $ref: '#/components/responses/BadRequest'
    post:
      operationId: PostOrganizationsConfigExternalCredentials
      x-rbac-enabled: true
      x-rbac-allowed-groups: admin
      tags:
      - Organization External Credentials
      summary: Create a new set of external credentials
      description: 'Create a new set of credentials for your organization to use with third party services. Includes a provider name and a content whose body is a key value pair of the data needed to authenticate with the third party service - currently only API Key, API ID/API Key, Client Credentials, Access Token and username/password combinations are supported.

        '
      parameters:
      - $ref: '#/components/parameters/RequiredConsistencyHeader'
      - $ref: '#/components/parameters/RequiredConsistencyTimeoutHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalCredentialPostRequest'
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/APIResponseBase'
                - type: object
                  properties:
                    result:
                      type: array
                      items:
                        type: string
                  required:
                  - result
        '400':
          $ref: '#/components/responses/BadRequest'
    delete:
      operationId: DeleteOrganizationsConfigExternalCredentials
      x-rbac-enabled: true
      x-rbac-allowed-groups: admin
      tags:
      - Organization External Credentials
      summary: Remove an external credential by id
      description: 'Remove the specified external credential by id or delete all external credentials. If a credential id is specified, it takes precedence over the deleteAll parameter, so a request with a credentialId specified and deleteAll=true will delete only the specified credential from the list of external credentials. If the specified credential id does not exist in the list of allowed origin credentials, no action will be taken, and a 200 status code will be returned.

        '
      parameters:
      - name: credentialId
        in: query
        description: The id of the credential to delete
        required: true
        schema:
          type: string
      - name: deleteAll
        in: query
        description: Whether to delete all credentials
        required: false
        schema:
          type: boolean
      - $ref: '#/components/parameters/RequiredConsistencyHeader'
      - $ref: '#/components/parameters/RequiredConsistencyTimeoutHeader'
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
  /organizations/config/external-credentials/{cred_id}:
    parameters:
    - $ref: '#/components/parameters/OrgIDHeader'
    - in: path
      name: cred_id
      schema:
        type: string
      required: true
      description: ID of the credential to retrieve, modify or delete
    get:
      operationId: GetOrganizationsConfigExternalCredentialsCredId
      x-rbac-enabled: true
      x-rbac-allowed-groups: admin
      tags:
      - Organization External Credentials
      summary: Get the specified credential
      description: 'Returns the credential specified by the ID. The returned object contains the name of the provider, the credential type and an object which contains the credential material necessary to access a third-party provider (API Key, API ID/API Key, Client Credentials, Access Token and username/password)

        '
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/APIResponseBase'
                - type: object
                  properties:
                    result:
                      $ref: '#/components/schemas/ExternalCredential'
                  required:
                  - result
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: PatchOrganizationsConfigExternalCredentialsCredId
      x-rbac-enabled: true
      x-rbac-allowed-groups: admin
      tags:
      - Organization External Credentials
      summary: Modify the selected credential
      description: 'Set the content of the selected credential to be the request body. If the content or name for this

        credential had previously been created for your organization, it will be overwritten and cannot

        be retrieved. Otherwise, the new content will be set.'
      parameters:
      - $ref: '#/components/parameters/RequiredConsistencyHeader'
      - $ref: '#/components/parameters/RequiredConsistencyTimeoutHeader'
      requestBody:
        description: The new content of the selected credential
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchExternalCredentialRequest'
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    RequiredConsistencyHeader:
      name: SlashID-Required-Consistency
      in: header
      description: 'The consistency level required for this request. If the consistency level is not achieved within the timeout, the request will fail with a 408 Request Timeout error.

        408 Request Timeout error indicates that request was not handled within the timeout, but it may still be handled after request timeout.

        Allowed values: * `local_region`: Wait while the request executes in the local region. * `all_regions`: Wait while the request executes across all regions.

        You can learn more about our replication model on our [Cross-region Replication Model](/docs/access/concepts/replication) page.

        '
      schema:
        type: string
        enum:
        - local_region
        - all_regions
        default: local_region
    OrgIDHeader:
      name: SlashID-OrgID
      in: header
      schema:
        type: string
      required: true
      description: The organization ID
      example: af5fbd30-7ce7-4548-8b30-4cd59cb2aba1
    RequiredConsistencyTimeoutHeader:
      name: SlashID-Required-Consistency-Timeout
      in: header
      description: 'The maximum amount of seconds to wait for the requested consistency level to be achieved. If the consistency level is not achieved within this time, the request will fail with a 408 Request Timeout error.

        408 Request Timeout error indicates that request was not handled within the timeout, but it may still be handled after request timeout.

        You can learn more about our replication model on our [Cross-region Replication Model](/docs/access/concepts/replication) page.

        '
      schema:
        type: integer
        default: 30
        maximum: 120
        minimum: 1
  schemas:
    ExternalProvider:
      type: string
      enum:
      - google
      - onfido
      - shopify
      - generic
    APIResponseBase:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/APIMeta'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/APIResponseError'
    APIPagination:
      type: object
      required:
      - limit
      - offset
      - total_count
      properties:
        limit:
          type: integer
        offset:
          type: integer
        total_count:
          type: integer
          format: int64
    ExternalCredential:
      type: object
      required:
      - external_cred_id
      - organization_id
      - extcred_provider
      - extcred_type
      - extcred_label
      properties:
        external_cred_id:
          $ref: '#/components/schemas/ExternalCredID'
        organization_id:
          $ref: '#/components/schemas/OrganizationID'
        extcred_provider:
          $ref: '#/components/schemas/ExternalProvider'
        extcred_label:
          type: string
        extcred_type:
          $ref: '#/components/schemas/ExternalCredTypes'
        json_blob:
          $ref: '#/components/schemas/ExternalCredentialContent'
    ExternalCredentialContent:
      type: object
      properties: {}
      description: Free form object for implicit server to server authentication credentials, different schema for provider.
      example:
        client_id: my-client-id
        client_secret: my-client-secret
        webhook_token: my-web-hook-token
    APICursorPagination:
      type: object
      required:
      - limit
      - cursor
      - total_count
      properties:
        limit:
          type: integer
        cursor:
          type: string
        total_count:
          type: integer
          format: int64
    OrganizationID:
      type: string
    ExternalCredTypes:
      type: string
      enum:
      - api_key
      - client_credentials
      - user_pass
      - api_id_access
      - access_token
      - json_credentials
    APIResponseError:
      type: object
      properties:
        httpcode:
          type: integer
        message:
          type: string
    APIMeta:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/APIPagination'
        cursor_pagination:
          $ref: '#/components/schemas/APICursorPagination'
    ExternalCredID:
      description: External credential ID
      type: string
    ExternalCredentialPostRequest:
      type: object
      description: Request to create a new external credential
      required:
      - extcred_provider
      - json_blob
      - extcred_type
      properties:
        extcred_provider:
          $ref: '#/components/schemas/ExternalProvider'
        extcred_type:
          $ref: '#/components/schemas/ExternalCredTypes'
        extcred_label:
          type: string
        json_blob:
          $ref: '#/components/schemas/ExternalCredentialContent'
    PatchExternalCredentialRequest:
      type: object
      properties:
        extcred_label:
          type: string
        json_blob:
          $ref: '#/components/schemas/ExternalCredentialContent'
  responses:
    NoContent:
      description: No content
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIResponseBase'
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIResponseBase'
  securitySchemes:
    ApiKeyAuth:
      description: Authorizes the request with the organization's API Key.
      x-svc-um-api: true
      type: apiKey
      in: header
      name: SlashID-API-Key
    OAuth2ClientIdSecret:
      description: Authorizes the request with a client ID/client secret pair
      type: http
      scheme: basic
    OAuth2AccessTokenBearer:
      description: Authorizes the request with an Access Token for the current user.
      type: http
      scheme: bearer
      bearerFormat: opaque