openapi: 3.0.1 info: title: V7 Darwin Annotations Workflows API description: 'REST API for the V7 Darwin training-data platform. Manage datasets, register and upload items (images, video, documents), read and import annotations, orchestrate human-in-the-loop workflows and stages, manage annotation classes, and request dataset exports (releases). All requests are authenticated with an `Authorization: ApiKey {key}` header. Paths use the team slug as a path parameter; API keys are scoped to a team and their permissions determine which operations are allowed.' termsOfService: https://www.v7labs.com/terms contact: name: V7 Support url: https://docs.v7labs.com version: '2.0' servers: - url: https://darwin.v7labs.com/api description: V7 Darwin production API security: - ApiKeyAuth: [] tags: - name: Workflows description: Manage multi-stage annotation workflows and stages. paths: /v2/teams/{team_slug}/workflows: get: operationId: listWorkflows tags: - Workflows summary: List workflows parameters: - $ref: '#/components/parameters/TeamSlug' responses: '200': description: A list of workflows. content: application/json: schema: type: array items: $ref: '#/components/schemas/Workflow' post: operationId: createWorkflow tags: - Workflows summary: Create workflow parameters: - $ref: '#/components/parameters/TeamSlug' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Workflow' responses: '200': description: The created workflow. content: application/json: schema: $ref: '#/components/schemas/Workflow' /v2/teams/{team_slug}/workflows/{id}: get: operationId: getWorkflow tags: - Workflows summary: Get workflow parameters: - $ref: '#/components/parameters/TeamSlug' - name: id in: path required: true schema: type: string responses: '200': description: The requested workflow. content: application/json: schema: $ref: '#/components/schemas/Workflow' '404': $ref: '#/components/responses/NotFound' /v2/teams/{team_slug}/items/stage: post: operationId: setStage tags: - Workflows summary: Set stage description: Sets the workflow stage of the items matched by the filters. parameters: - $ref: '#/components/parameters/TeamSlug' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SetStageRequest' responses: '200': description: Stage updated. components: schemas: SetStageRequest: type: object required: - filters - stage_id - workflow_id properties: filters: $ref: '#/components/schemas/ItemFilters' stage_id: type: string format: uuid workflow_id: type: string format: uuid ItemFilters: type: object properties: dataset_ids: type: array items: type: integer item_ids: type: array items: type: string format: uuid statuses: type: array items: type: string Error: type: object properties: errors: type: object message: type: string Stage: type: object properties: id: type: string format: uuid name: type: string type: type: string enum: - dataset - annotate - review - complete - model - consensus - discard edges: type: array items: type: object Workflow: type: object properties: id: type: string format: uuid name: type: string dataset: type: object properties: id: type: integer name: type: string stages: type: array items: $ref: '#/components/schemas/Stage' parameters: TeamSlug: name: team_slug in: path required: true description: The slug of the team that owns the resource. schema: type: string responses: NotFound: description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: ApiKeyAuth: type: apiKey in: header name: Authorization description: 'Team-scoped API key sent as `Authorization: ApiKey {key}`. Generate keys at https://darwin.v7labs.com/?settings=api-keys. Key permissions determine which operations are allowed.'