Didomi secrets API

Manage secrets

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

didomi-secrets-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  title: Didomi consents/events secrets API
  description: 'A REST API to communicate with the Didomi platform (<a href="https://api.didomi.io/v1/">https://api.didomi.io/v1/</a>)


    This is the complete specification of the API. A complete guide to authenticating and using the API is available on our <a href="https://developers.didomi.io/" target="_blank">Developers Portal</a>.


    All HTTP calls to the API require a valid JWT token. The token must be provided in an **Authorization** header with the value "Bearer <token>".

    Click on the Authorize button in the header of this page to provide a token before testing requests from this documentation.


    '
  version: '1.0'
servers:
- url: https://api.didomi.io/v1
  description: Didomi Platform API
security:
- bearer: []
tags:
- name: secrets
  description: Manage secrets
paths:
  /secrets:
    get:
      parameters:
      - description: Number of results to return
        in: query
        name: $limit
        schema:
          type: integer
      - description: Number of results to skip
        in: query
        name: $skip
        schema:
          type: integer
      - description: Property to sort results
        in: query
        name: $sort
        style: deepObject
        schema:
          type: object
      - description: Query parameters to filter
        in: query
        name: filter
        style: form
        explode: true
        schema:
          $ref: '#/components/schemas/secrets'
      responses:
        '200':
          description: A list of Secret objects
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/secrets'
      description: Returns a list of all the secrets the user has access to
      summary: Retrieve a list of secrets
      tags:
      - secrets
      security:
      - bearer: []
    post:
      parameters:
      - name: secret
        in: body
        description: The Secret object to create
        required: true
        schema:
          $ref: '#/components/schemas/secrets-input'
      responses:
        '200':
          description: The created Secret object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/secrets'
      description: Create a new secret
      summary: Create a secret
      tags:
      - secrets
      security:
      - bearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/secrets'
  /secrets/{id}:
    get:
      parameters:
      - name: id
        in: path
        description: The ID of the secret to retrieve
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A Secret object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/secrets'
      description: Returns a single secret with the given ID
      summary: Retrieve a secret
      tags:
      - secrets
      security:
      - bearer: []
    put:
      parameters:
      - name: id
        in: path
        description: The ID of the secret to update
        required: true
        schema:
          type: string
      - name: secret
        in: body
        description: The new data to update the secret with
        required: true
        schema:
          $ref: '#/components/schemas/secrets-input'
      responses:
        '200':
          description: The updated Secret object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/secrets'
      description: Update an existing secret
      summary: Update a secret
      tags:
      - secrets
      security:
      - bearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/secrets'
    patch:
      parameters:
      - name: id
        in: path
        description: The ID of the secret to patch
        required: true
        schema:
          type: string
      - name: secret
        in: body
        description: The secrets to replace in the Secret object
        required: true
        schema:
          $ref: '#/components/schemas/secrets-input'
      responses:
        '200':
          description: The patched Secret object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/secrets'
      description: Partially update a secret
      summary: Patch a secret
      tags:
      - secrets
      security:
      - bearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/secrets'
    delete:
      parameters:
      - name: id
        in: path
        description: The ID of the secret to delete
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The deleted Secret object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/secrets'
      description: Delete an existing secret. Secrets are unrecoverable after being deleted so make sure that they are not in-use before deleting them.
      summary: Delete a secret
      tags:
      - secrets
      security:
      - bearer: []
components:
  schemas:
    secrets-input:
      title: SecretInput
      type: object
      properties:
        name:
          type: string
          description: Name of the secret
        description:
          type: string
          description: Description of the secret
        organization_id:
          type: string
          description: The ID of the organization that owns this secret
      required:
      - name
      - organization_id
    secrets:
      type: object
      title: Secret
      description: A secret is used to authenticate API requests in unsecure environments (client-side, emails, etc.)
      properties:
        id:
          type: string
          description: Secret ID
        name:
          type: string
          description: Name of the secret
        description:
          type: string
          description: Description of the secret
        secret:
          type: string
          description: The actual secret
        organization_id:
          type: string
          description: The ID of the organization that owns this secret
        created_at:
          type: string
          description: Creation date of the secret
          format: date-time
        updated_at:
          type: string
          description: Last update date of the secret
          format: date-time
        version:
          type: number
          description: Revision number of the secret
      required:
      - id
      - name
      - organization_id
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http