openapi: 3.0.0 info: title: Android Vacancy Scraper API description: API for managing scraping jobs version: 1.0.0 servers: - url: http://localhost:8080 description: Local development server paths: /api/jobs: get: summary: Get all scraping jobs description: Retrieve a list of all scraping jobs operationId: getAllJobs tags: - Jobs responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/ScrapingJob' '500': description: Internal server error content: application/json: schema: type: object properties: error: type: string post: summary: Create new scraping job description: Create and queue a new scraping job operationId: createJob tags: - Jobs requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScrapeTarget' responses: '201': description: Job created successfully content: application/json: schema: $ref: '#/components/schemas/ScrapingJob' '500': description: Internal server error content: application/json: schema: type: object properties: error: type: string /api/jobs/{id}: get: summary: Get job by ID description: Retrieve a specific scraping job by its ID operationId: getJobById tags: - Jobs parameters: - name: id in: path required: true schema: type: string format: uuid description: ID of the job to retrieve responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/ScrapingJob' '400': description: Missing job ID content: application/json: schema: type: object properties: error: type: string '404': description: Job not found content: application/json: schema: type: object properties: error: type: string '500': description: Internal server error content: application/json: schema: type: object properties: error: type: string delete: summary: Delete job description: Delete a scraping job by its ID operationId: deleteJob tags: - Jobs parameters: - name: id in: path required: true schema: type: string format: uuid description: ID of the job to delete responses: '204': description: Job deleted successfully '400': description: Missing job ID content: application/json: schema: type: object properties: error: type: string '404': description: Job not found content: application/json: schema: type: object properties: error: type: string '500': description: Internal server error content: application/json: schema: type: object properties: error: type: string components: schemas: ScrapingJob: type: object properties: id: type: string format: uuid description: Unique identifier for the job status: type: string enum: [pending, in_progress, completed, failed] description: Current status of the job target: $ref: '#/components/schemas/ScrapeTarget' createdAt: type: string format: date-time description: When the job was created required: - id - status - target - createdAt ScrapeTarget: type: object properties: url: type: string format: uri description: URL of the target to scrape name: type: string description: Name of the target needsFiltering: type: boolean description: Whether the scraped content needs filtering required: - url - name - needsFiltering