Anaconda Diagnosis API

The diagnosis API from Anaconda — 1 operation(s) for diagnosis.

OpenAPI Specification

anaconda-diagnosis-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: '6.5'
  title: Anaconda Server Diagnosis API
servers:
- url: https://api.anaconda.cloud/api
tags:
- name: diagnosis
paths:
  /diagnose/blobs:
    post:
      tags:
      - diagnosis
      summary: Diagnose
      operationId: repo.endpoints.diagnosis.blobs.troubleshoot_routes_blobs
      description: "## Troubleshoots routes and blobs in the database.\n* If the blobs of active routes of given channel name(s) are not available, mark the active routes as passive. \nIf the channel name list is not given, then do the process for all channel artifacts.\n* Return the list of routes updated\n* Identify the index blobs in the database as per the channel names given or for all \nchannels (if list is not given) so that admin can analyse it and decide about removing the index blobs\n"
      requestBody:
        description: request body for diagnosis
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiagnosisRequest'
      responses:
        '200':
          description: Analyse missing blobs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiagnoseRoutesAndBlobs'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
      - jwt: []
      - user_token: []
components:
  responses:
    Unauthenticated:
      description: Unauthenticated, no token is provided or token is invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    DiagnosisRequest:
      type: object
      description: "request body with filter details for diagnosis, \ncurrently has channel names list and download_as option\n"
      properties:
        download_as:
          type: string
          description: "* Specifies the format of report download file. \n* The report name will follow the convention\n  DiagnosisReport_{timestamp('%Y%m%d_%H%M%S')}\n"
          enum:
          - json
        channel_names:
          type:
          - array
          - 'null'
          items:
            type: string
          description: List of Channel names
    DiagnosisDetails:
      type: object
      properties:
        channel_name:
          type: string
        artifacts_list:
          type: array
        total:
          type: number
        action_taken:
          type: string
    DiagnoseRoutesAndBlobs:
      type: object
      description: Blobs Diagnosis response
      properties:
        artifact_routes:
          $ref: '#/components/schemas/DiagnosisDetails'
        index_blobs:
          $ref: '#/components/schemas/DiagnosisDetails'
        diagnosis_timestamp:
          type: string
    ErrorResponse:
      type: object
      description: The metadata contained in an error response
      properties:
        code:
          type: string
          description: Internal error code. Could be used to show corresponding message text from a message catalog
          example: bad-parameter
        message:
          type: string
          description: Short human-readable error message. Used mainly for logging
          example: Bad request parameter for 'sort'
        status:
          type: integer
          description: The HTTP Status code
          example: 401
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      x-bearerInfoFunc: repo.auth.token_provider.decode_token
    user_token:
      type: apiKey
      name: X-Auth
      in: header
      x-apikeyInfoFunc: repo.auth.token_provider.decode_user_private_token