This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
orchestrator-swagger-go-client/api/openapi.yaml

167 lines
4.1 KiB
YAML
Raw Permalink Normal View History

2024-05-30 16:34:11 +00:00
openapi: 3.0.1
info:
contact:
email: support@anthrove.art
name: API Support
url: http://anthrove.art/support
description: This service handles the communication between the manager and the
plugs
title: Anthrove Orchestrator API
version: 0.1-PREVIEW
servers:
- url: /api/v1
paths:
/plug/{plug_type}:
put:
description: Initiates a scraping operation for a user with a specific plug
type returns the created task IDs.
parameters:
- description: supported plug type
in: path
name: plug_type
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/models.OrchestratorTask'
2024-05-30 16:34:11 +00:00
description: aa
required: true
responses:
"200":
content: {}
description: OK
"404":
content: {}
description: Not Found
"500":
content: {}
description: Internal Server Error
summary: Initiates a scraping operation for a user with a specific plug type
tags:
- Plug
x-codegen-request-body-name: request
/plug/{plug_type}/{task_id}:
delete:
description: Stops a scraping operation for a user with a specific plug type
returns the created task IDs.
parameters:
- description: supported plug type
in: path
name: plug_type
required: true
schema:
type: string
- description: id of task
in: path
name: task_id
required: true
schema:
type: string
responses:
"200":
content: {}
description: OK
"404":
content: {}
description: Not Found
"500":
content: {}
description: Internal Server Error
summary: Stops a scraping operation for a user with a specific plug type
tags:
- Plug
get:
description: Retrieves the status of a specific task and returns it.
parameters:
- description: supported plug type
in: path
name: plug_type
required: true
schema:
type: string
- description: id of task
in: path
name: task_id
required: true
schema:
type: string
responses:
"200":
content: {}
description: OK
"404":
content: {}
description: Not Found
"500":
content: {}
description: Internal Server Error
summary: Retrieves the status of a specific task type
tags:
- Plug
/user/{user_id}:
put:
description: Initiates a scraping operation for the entire user and returns
the created task IDs.
parameters:
- description: Anthrove UserID
in: path
name: user_id
required: true
schema:
type: string
responses:
"200":
content: {}
description: OK
"404":
content: {}
description: Not Found
"500":
content: {}
description: Internal Server Error
summary: Initiates a scraping operation for the entire user
tags:
- User
components:
schemas:
models.OrchestratorTask:
2024-05-30 16:34:11 +00:00
properties:
anthrove_user_id:
type: string
deep_scrape:
type: boolean
plug_task:
$ref: '#/components/schemas/models.PlugTask'
2024-05-30 16:34:11 +00:00
required:
- anthrove_user_id
- deep_scrape
- plug_task
type: object
models.PlugTask:
2024-05-30 16:34:11 +00:00
properties:
id:
type: string
task_state:
$ref: '#/components/schemas/models.PlugTaskState'
2024-05-30 16:34:11 +00:00
user_id:
type: string
required:
- user_id
type: object
models.PlugTaskState:
2024-05-30 16:34:11 +00:00
enum:
- UNKNOWN
- STARTED
- RUNNING
- STOPPED
type: string
x-enum-varnames:
- PlugTaskStateUnknown
- PlugTaskStateStarted
- PlugTaskStateRunning
- PlugTaskStateStopped
x-original-swagger-version: "2.0"