> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wesog.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Check operation status



## OpenAPI

````yaml https://api.wesog.com/openapi.json get /ops/{op_id}
openapi: 3.1.0
info:
  title: Wesog API
  description: Wesog AI services for media providers
  version: 1.0.0
servers:
  - url: https://api.wesog.com
    description: Production server
  - url: https://v2.api.wesog.com
    description: Production server (v2)
security: []
paths:
  /ops/{op_id}:
    get:
      tags:
        - Operations
      summary: Check operation status
      operationId: operation_status_ops__op_id__get
      parameters:
        - name: op_id
          in: path
          required: true
          schema:
            type: integer
            title: Op Id
      responses:
        '200':
          description: Operation status successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation_Out'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    Operation_Out:
      properties:
        method:
          $ref: '#/components/schemas/OpMethod'
          description: Operation type based on the HTTP method.
        resource:
          $ref: '#/components/schemas/OpResource'
          description: Resource type involved in the operation.
        num_total:
          type: integer
          title: Num Total
          description: Total of elements.
        num_good:
          type: integer
          title: Num Good
          description: Number of correctly processed elements.
        num_bad:
          type: integer
          title: Num Bad
          description: Number of failed processed elements.
        is_started:
          type: boolean
          title: Is Started
          description: Boolean indicating if the operation has started.
        is_finished:
          type: boolean
          title: Is Finished
          description: Boolean indicating if the operations has finished.
        all_good:
          anyOf:
            - type: boolean
            - type: 'null'
          title: All Good
          description: Boolean indicating that there is no failed elements yet.
        do_wait:
          type: boolean
          title: Do Wait
          description: Boolean for know if have to wait or not.
        do_urgent:
          type: boolean
          title: Do Urgent
          description: Boolean for know if it is an urgent operation.
        do_strict:
          type: boolean
          title: Do Strict
          description: Boolean for know if is required strict operations over DB.
        idle_ms:
          type: number
          title: Idle Ms
          description: >-
            Duration (milliseconds) between the operation has been created and
            has started.
        exec_ms:
          type: number
          title: Exec Ms
          description: >-
            Duration (milliseconds) between the operation has been started and
            has finished.
        created_at:
          type: string
          title: Created At
          description: Creation datetime.
        started_at:
          type: string
          title: Started At
          description: Start datetime.
        finished_at:
          type: string
          title: Finished At
          description: Finalization datetime.
        errors:
          items:
            $ref: '#/components/schemas/OpError'
          type: array
          title: Errors
          description: List of errors that occurred during processing the operation.
      type: object
      required:
        - method
        - resource
        - num_total
        - num_good
        - num_bad
        - is_started
        - is_finished
        - all_good
        - do_wait
        - do_urgent
        - do_strict
        - idle_ms
        - exec_ms
        - created_at
        - started_at
        - finished_at
        - errors
      title: Operation_Out
      description: |-
        Output of:
        - a synchronous (blocking) operation. POST /imgs?wait=true
        - operation status.                   GET ops/<op_id>
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OpMethod:
      type: string
      enum:
        - add
        - upd
        - del
        - multiple
      title: OpMethod
      description: Tipo de respuesta asociada a una operación con imágenes.
    OpResource:
      type: string
      enum:
        - video
        - image
        - celebs
      title: OpResource
    OpError:
      properties:
        id:
          type: integer
          title: Id
          description: Identifier of the resource that triggered the error.
        msg:
          type: string
          title: Msg
          description: Human-readable description of the error returned by the system.
      type: object
      required:
        - id
        - msg
      title: OpError
      description: Details of an error produced during the operation.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: API-Key

````