BlindInsight identities API

The identities API from BlindInsight — 2 operation(s) for identities.

OpenAPI Specification

blindinsight-identities-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Blind Insight REST accounts identities API
  version: 10.22.0
  description: End-to-end encrypted datastore
tags:
- name: identities
paths:
  /api/identities/:
    get:
      operationId: identities_list
      description: 'List identities, filtered by the given parameters. Takes optional pagination

        parameters.


        The response will be a list of identity objects.


        **On the command line:**


        ```bash

        blind identities list --user-id "<user_id>"

        ```'
      summary: List Identities
      parameters:
      - in: query
        name: device_id
        schema:
          type: string
        description: The device ID associated with this identity.
      - in: query
        name: id
        schema:
          type: string
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - in: query
        name: primary_public_key
        schema:
          type: string
        description: The primary PGP key for the identity.
      - in: query
        name: sub_public_key
        schema:
          type: string
        description: The PGP sub-key for the identity.
      - in: query
        name: user
        schema:
          type: string
      tags:
      - identities
      security:
      - cookieAuth: []
      - basicAuth: []
      - jwtAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedIdentityList'
          description: ''
    post:
      operationId: identities_create
      description: 'Create a new identity.


        The response will be the newly created identity object.


        **On the command line:**


        ```bash

        blind identities create --user-id "<user_id>" --data identity.json

        ```'
      summary: Create a new Identity
      tags:
      - identities
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Identity'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Identity'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Identity'
        required: true
      security:
      - cookieAuth: []
      - basicAuth: []
      - jwtAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Identity'
          description: ''
  /api/identities/{id}/:
    get:
      operationId: identities_retrieve
      description: 'Retrieve an identity by its ID.


        The response will be the identity object.


        **On the command line:**


        ```bash

        blind identities retrieve --user-id "<user_id>" --id "<identity_id>"

        ```'
      summary: Retrieve a single Identity
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this identity.
        required: true
      tags:
      - identities
      security:
      - cookieAuth: []
      - basicAuth: []
      - jwtAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Identity'
          description: ''
    put:
      operationId: identities_update
      description: 'Update an identity replacing it entirely.


        The response will be the updated identity object.


        **On the command line:**


        ```bash

        blind identities update --user-id "<user_id>" --id "<identity_id>" --data identity.json

        ```'
      summary: Update an Identity
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this identity.
        required: true
      tags:
      - identities
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Identity'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Identity'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Identity'
        required: true
      security:
      - cookieAuth: []
      - basicAuth: []
      - jwtAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Identity'
          description: ''
    patch:
      operationId: identities_partial-update
      description: 'Update an identity with only the specified fields.


        The response will be the updated identity object.


        **On the command line:**


        ```bash

        blind identities partial-update --user-id "<user_id>" --id "<identity_id>" --data identity-update.json

        ```'
      summary: Partially update an Identity
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this identity.
        required: true
      tags:
      - identities
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedIdentity'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedIdentity'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedIdentity'
      security:
      - cookieAuth: []
      - basicAuth: []
      - jwtAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Identity'
          description: ''
    delete:
      operationId: identities_destroy
      description: 'Delete an identity.


        The response will be an empty object with a 204 status.


        **On the command line:**


        ```bash

        blind identities destroy --user-id "<user_id>" --id "<identity_id>"

        ```'
      summary: Delete an Identity
      parameters:
      - in: path
        name: id
        schema:
          type: string
        description: A unique value identifying this identity.
        required: true
      tags:
      - identities
      security:
      - cookieAuth: []
      - basicAuth: []
      - jwtAuth: []
      responses:
        '204':
          description: No response body
components:
  schemas:
    Identity:
      type: object
      description: HyperlinkedModelSerializer with `id` as the first field.
      properties:
        id:
          type: string
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        user:
          type: string
          format: uri
        device_id:
          type: string
          description: The device ID associated with this identity.
          maxLength: 255
        primary_public_key:
          type: string
          description: The primary PGP key for the identity.
        sub_public_key:
          type: string
          description: The PGP sub-key for the identity.
      required:
      - device_id
      - id
      - primary_public_key
      - sub_public_key
      - url
      - user
    PatchedIdentity:
      type: object
      description: HyperlinkedModelSerializer with `id` as the first field.
      properties:
        id:
          type: string
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        user:
          type: string
          format: uri
        device_id:
          type: string
          description: The device ID associated with this identity.
          maxLength: 255
        primary_public_key:
          type: string
          description: The primary PGP key for the identity.
        sub_public_key:
          type: string
          description: The PGP sub-key for the identity.
    PaginatedIdentityList:
      type: array
      items:
        $ref: '#/components/schemas/Identity'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT