{ "openapi": "3.0.3", "info": { "title": "API for LOCAL ENV of peviitor.ro", "description": "API documentation", "version": "1.0" }, "servers": [ { "url": "http://localhost:8081/api/v1" }, { "url": "http://zimbor.go.ro:8091/api/v1" } ], "paths": { "/random/": { "get": { "tags": [ "General" ], "summary": "Get random data", "responses": { "200": { "description": "A random job or a message indicating no jobs found", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "properties": { "response": { "type": "object", "properties": { "numFound": { "type": "integer" }, "start": { "type": "integer" }, "numFoundExact": { "type": "boolean" }, "docs": { "type": "array", "items": { "type": "object" } } } } } }, { "type": "object", "properties": { "message": { "type": "string", "default": "There are no jobs to display" } } } ] } } } }, "400": { "description": "Container not opened", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Container is not opened" } } } } } }, "403": { "description": "Forbidden - User does not have permission to access PHP code", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "PHP code is not found." } } } } } }, "503": { "description": "Service unavailable. SOLR server is down or request failed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "integer" } } } } } } } } }, "/suggest/": { "get": { "tags": [ "Search" ], "summary": "Get job title suggestions", "description": "Retrieve suggestions for job titles based on a user's query.", "parameters": [ { "name": "q", "in": "query", "description": "The search query string for which suggestions are needed.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Suggestions retrieval successful", "content": { "application/json": { "schema": { "type": "object", "properties": { "suggestions": { "type": "array", "items": { "type": "object", "properties": { "term": { "type": "string", "description": "Suggested term" }, "weight": { "type": "integer", "description": "Weight or score of the suggestion" }, "payload": { "type": "string", "description": "Additional data associated with the suggestion" } } } } } } } } }, "400": { "description": "Bad request, no query provided or invalid input.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } } }, "503": { "description": "Service unavailable. SOLR server is down or request failed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "integer" } } } } } } } } }, "/cleanjobs/": { "delete": { "tags": [ "General" ], "summary": "Delete jobs by company name", "description": "Deletes all job postings for a specified company.", "requestBody": { "required": true, "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "required": [ "company" ], "properties": { "company": { "type": "string", "description": "The name of the company whose jobs should be deleted.", "example": "Example Company" } } } } } }, "responses": { "200": { "description": "Successful deletion", "content": { "application/json": { "schema": { "type": "object", "properties": { "responseHeader": { "type": "object", "properties": { "status": { "type": "integer" }, "QTime": { "type": "integer" } } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "integer" } } } } } }, "503": { "description": "Service unavailable. SOLR server is down or request failed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "integer" } } } } } } } } }, "/companies/": { "get": { "tags": [ "General" ], "summary": "Get list of companies", "parameters": [ { "in": "query", "name": "count", "schema": { "type": "boolean" }, "description": "Whether to count the number of jobs for each company", "required": true } ], "responses": { "200": { "description": "Successfully received the list of companies", "content": { "application/json": { "schema": { "type": "object", "properties": { "total": { "type": "integer" }, "companies": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "jobs": { "type": "integer", "nullable": true } } } } } } } } }, "503": { "description": "Service unavailable. SOLR server is down or request failed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "integer" } } } } } } } } }, "/getuser/": { "get": { "tags": [ "User" ], "summary": "Get a user by ID", "parameters": [ { "name": "ID", "in": "query", "required": true, "description": "The ID of the user", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved the user", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "properties": { "id": { "type": "string" }, "url": { "type": "string" }, "company": { "type": "string" }, "apikey": { "type": "string" } } }, { "type": "object", "properties": { "id": { "type": "string" }, "apikey": { "type": "string" } } }, { "type": "object", "properties": { "id": { "type": "string" }, "logo": { "type": "string" } } } ] } } } }, "404": { "description": "No user found", "content": {} }, "503": { "description": "Service unavailable. SOLR server is down or request failed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "integer" } } } } } }, "400": { "description": "Invalid ID format. Special characters are not allowed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "received": { "type": "string" }, "message": { "type": "string" } } } } } } } } }, "/jobs/": { "get": { "tags": [ "Machine Learning" ], "summary": "Get jobs", "operationId": "getJobs", "parameters": [ { "in": "query", "name": "start_page", "required": false, "schema": { "type": "integer", "minimum": 1, "example": 1 }, "description": "Starting page to be returned. Default is 1." }, { "in": "query", "name": "stop_page", "required": false, "schema": { "type": "integer", "minimum": 1, "example": 1 }, "description": "Last page to be returned. Default is 1." } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "response": { "type": "object", "properties": { "numFound": { "type": "integer", "description": "Total number of jobs found" }, "docs": { "type": "array", "description": "List of job records", "items": { "type": "object", "properties": { "job_id": { "type": "integer" }, "job_title": { "type": "string" } } } } } } } } } } }, "400": { "description": "Bad Request. Invalid input parameter.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } }, "401": { "description": "Unauthorized. Authentication failure.", "content": {} }, "500": { "description": "Internal Server Error. Something went wrong on the server side.", "content": {} }, "503": { "description": "Service unavailable. SOLR server is down or request failed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "integer" } } } } } } } } }, "/search/": { "get": { "tags": [ "Search" ], "summary": "Search jobs", "description": "Search for jobs using Solr", "parameters": [ { "name": "q", "in": "query", "required": true, "description": "The search query", "schema": { "type": "string" } }, { "name": "start", "in": "query", "required": false, "description": "Pagination start index", "schema": { "type": "integer" } }, { "name": "rows", "in": "query", "required": false, "description": "Number of results to return", "schema": { "type": "integer" } }, { "name": "sort", "in": "query", "required": false, "description": "Sort order", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Search results", "content": { "application/json": { "schema": { "type": "object" } } } }, "400": { "description": "Bad Request. Invalid input parameter.", "content": {} }, "404": { "description": "Invalid search query", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "This job is not in the Database" }, "code": { "type": "integer", "example": 404 } } } } } }, "500": { "description": "Internal Server Error. Something went wrong on the server side.", "content": {} }, "503": { "description": "Service unavailable. SOLR server is down or request failed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "integer" } } } } } } } } }, "/total/": { "get": { "tags": [ "General" ], "summary": "Get total job count", "description": "Returns the total number of jobs and companies", "responses": { "200": { "description": "Total job count", "content": { "application/json": { "schema": { "type": "object", "properties": { "total": { "type": "object", "properties": { "jobs": { "type": "string" }, "companies": { "type": "string" } }, "required": [ "jobs", "companies" ] } }, "required": [ "total" ] } } } }, "503": { "description": "Service unavailable. SOLR server is down or request failed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "integer" } } } } } } } } }, "/updateuser/": { "patch": { "tags": [ "User" ], "summary": "Update user", "description": "Update user details in Solr using PATCH", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "apikey": { "type": "string", "description": "API key", "example": "abc123xyz" }, "id": { "type": "string", "description": "User ID (optional)", "example": "local-part@domain" }, "url": { "type": "string", "description": "User URL (optional)", "example": "http://example.com" }, "company": { "type": "string", "description": "Company name (optional)", "example": "Company name" }, "logo": { "type": "string", "description": "Logo URL (optional)", "example": "http://example.com" } }, "required": [ "apikey" ] } } } }, "responses": { "200": { "description": "User updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "url": { "type": "string" }, "company": { "type": "string" }, "logo": { "type": "string" }, "apikey": { "type": "string" } } } } } }, "400": { "description": "Bad Request. Invalid or missing input.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "description": "Details about the error" } } } } } }, "404": { "description": "User with given apikey not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } }, "500": { "description": "Internal Server Error. Something went wrong on the server.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } } } } } }, "503": { "description": "Service Unavailable. SOLR server is down or unreachable.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "integer" } } } } } } } } }, "/empty/": { "delete": { "tags": [ "General" ], "summary": "Delete all jobs from jobs core", "responses": { "200": { "description": "Successfully deleted all jobs", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "jobsDeleted": { "type": "integer" }, "companiesDeleted": { "type": "integer" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "integer" } } } } } }, "503": { "description": "Service unavailable. SOLR server is down or request failed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "integer" } } } } } } } } }, "/update/": { "put": { "tags": [ "Jobs" ], "summary": "Update jobs", "description": "Update jobs using Solr", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "job_link": { "type": "string", "description": "Job link", "example": "https://example.com/job/software-engineer" }, "job_title": { "type": "string", "description": "Job title", "example": "Software Engineer" }, "company": { "type": "string", "description": "Company name", "example": "Tech Corp" }, "country": { "type": "string", "description": "Country", "example": "România" }, "city": { "type": "string", "description": "City", "example": "București" }, "county": { "type": "string", "description": "County", "example": "Ilfov" }, "remote": { "type": "string", "description": "Remote", "example": "on-site" } }, "required": [ "job_link", "job_title", "company", "country", "city", "county", "remote" ] } } } }, "responses": { "200": { "description": "Job updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "string", "example": "Data successfully inserted into Solr" } } } } } }, "400": { "description": "Bad Request. Invalid input parameter.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Missing required fields: job_link, job_title, company, country, city, county, remote" } } } } } }, "500": { "description": "Internal Server Error. Something went wrong on the server side.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Failed to insert data into Solr" } } } } } }, "503": { "description": "Service unavailable. SOLR server is down or request failed.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "code": { "type": "integer" } } } } } } } } }, "/firme/company/": { "post": { "tags": [ "Companies" ], "summary": "Update company name in Solr", "description": "Updates the 'denumire' (name) of a company document in the 'firme' Solr core using its ID.", "operationId": "updateCompanyName", "requestBody": { "required": true, "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "id": { "type": "string", "example": "4546578", "description": "The ID of the company in Solr" }, "company": { "type": "string", "example": "Firma Test SRL", "description": "The new name for the company" } }, "required": [ "id", "company" ] } } } }, "responses": { "200": { "description": "Company name successfully updated", "content": { "application/json": { "example": { "responseHeader": { "status": 0, "QTime": 3 } } } } }, "400": { "description": "Missing id or company parameter", "content": { "application/json": { "example": { "error": "Missing id or company" } } } }, "405": { "description": "Only POST method is allowed", "content": { "application/json": { "example": { "error": "Only POST method is allowed" } } } }, "500": { "description": "Solr request failed or server misconfiguration", "content": { "application/json": { "example": { "error": "Solr request failed" } } } } } } }, "/firme/company/add/": { "put": { "tags": [ "Companies" ], "summary": "Add or update a company in Solr", "description": "Inserts or updates a company document in the 'firme' Solr core. Validates required fields, email, phone, and website formats.", "operationId": "addOrUpdateCompany", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "integer", "example": 4546578, "description": "Unique integer ID of the company" }, "denumire": { "type": "string", "example": "Firma Test SRL", "description": "Company name" }, "cod_inmatriculare": { "type": "string", "example": "J01/2024/999", "description": "Registration code" }, "euid": { "type": "string", "example": "EUID-RO-12345", "description": "European unique identifier" }, "localitate": { "type": "string", "example": "Cluj-Napoca", "description": "City" }, "adresa_completa": { "type": "string", "example": "Str. Test 10", "description": "Full address" }, "judet": { "type": "string", "example": "Bucharest", "description": "County" }, "cod_stare": { "type": "integer", "example": 1234, "description": "Status code" }, "brands": { "type": "string", "example": "Brand A, Brand B", "description": "Optional brands" }, "scraper": { "type": "string", "example": "scraper_name", "description": "Optional scraper identifier" }, "website": { "type": "string", "example": "https://www.example.com", "description": "Website URL" }, "email": { "type": "string", "example": "contact@example.com", "description": "Company email" }, "phone": { "type": "string", "example": "+40712345678", "description": "Phone number" } }, "required": [ "id", "denumire", "cod_inmatriculare", "euid", "localitate", "adresa_completa", "judet", "cod_stare" ] } } } }, "responses": { "200": { "description": "Data successfully inserted into Solr", "content": { "application/json": { "example": { "success": "Data successfully inserted into Solr" } } } }, "400": { "description": "Validation error or missing required fields", "content": { "application/json": { "example": { "error": "Fields 'id' and 'cod_stare' must be integers.", "code": 400 } } } }, "405": { "description": "Only PUT method is allowed", "content": { "application/json": { "example": { "error": "Only PUT method is allowed" } } } }, "503": { "description": "Solr server in DEV is down", "content": { "application/json": { "example": { "error": "SOLR server in DEV is down", "code": 503 } } } } } } }, "/firme/company/delete/": { "delete": { "tags": [ "Companies" ], "summary": "Delete a company from Solr", "description": "Removes a company document from the 'firme' Solr core using its ID.", "operationId": "deleteCompany", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "example": "4546578", "description": "The ID of the company to delete" } }, "required": [ "id" ] } } } }, "responses": { "200": { "description": "Company successfully deleted", "content": { "application/json": { "example": { "responseHeader": { "status": 0, "QTime": 3 } } } } }, "400": { "description": "Missing ID", "content": { "application/json": { "example": { "error": "Missing id" } } } }, "405": { "description": "Only DELETE method is allowed", "content": { "application/json": { "example": { "error": "Only DELETE method is allowed" } } } }, "500": { "description": "Solr request failed or server misconfiguration", "content": { "application/json": { "example": { "error": "Solr request failed" } } } } } } }, "/firme/brand/": { "get": { "tags": [ "Companies' brands" ], "summary": "Get companies by brand name", "description": "Retrieves all companies from the 'firme' core that match the specified brand name.", "parameters": [ { "name": "brand", "in": "query", "required": true, "description": "Brand name to search for in the 'brands' field of the firme core.", "schema": { "type": "string", "example": "Pepsi" } } ], "responses": { "200": { "description": "Successful operation. Returns a list of companies matching the given brand.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "denumire": { "type": "string", "description": "Company name" }, "cui": { "type": "string", "description": "Company tax ID" } } } } } } }, "400": { "description": "Bad Request. Missing or invalid 'brand' parameter.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Missing brand parameter" } } } } } }, "500": { "description": "Internal Server Error. Solr request failed or configuration missing.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Solr request failed" } } } } } } } } }, "/firme/brand/add/": { "post": { "tags": [ "Companies' brands" ], "summary": "Add brand(s) to a company document", "description": "Adds one or more brands to the 'brands' field of a company in the 'firme' Solr core.", "requestBody": { "required": true, "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Solr document ID of the company.", "example": "123456" }, "brands": { "type": "array", "items": { "type": "string" }, "description": "List of brands to add to the company.", "example": [ "Pepsi", "Lay's" ] } }, "required": [ "id", "brands" ] } }, "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "example": "123456" }, "brands": { "type": "array", "items": { "type": "string" }, "example": [ "Pepsi", "Lay's" ] } }, "required": [ "id", "brands" ] } } } }, "responses": { "200": { "description": "Brand(s) successfully added to the company document.", "content": { "application/json": { "schema": { "type": "object", "properties": { "responseHeader": { "type": "object", "description": "Solr response header" }, "response": { "type": "object", "description": "Solr response details" } } } } } }, "400": { "description": "Bad Request. Missing id or brands parameter.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Missing id or brands" } } } } } }, "500": { "description": "Internal Server Error. Solr request failed or configuration missing.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Solr request failed" } } } } } } } } }, "/firme/brand/delete/": { "delete": { "tags": [ "Companies' brands" ], "summary": "Remove brand(s) from a company document", "description": "Removes one or more brands from the 'brands' field of a company in the 'firme' Solr core.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Solr document ID of the company.", "example": "123456" }, "brands": { "type": "array", "items": { "type": "string" }, "description": "List of brand names to remove from the company.", "example": [ "Pepsi", "Lay's" ] } }, "required": [ "id", "brands" ] } } } }, "responses": { "200": { "description": "Brand(s) successfully removed from the company document.", "content": { "application/json": { "schema": { "type": "object", "properties": { "responseHeader": { "type": "object", "description": "Solr response header" }, "response": { "type": "object", "description": "Solr response details" } } } } } }, "400": { "description": "Bad Request. Missing id or brands parameter.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Missing id or brands" } } } } } }, "500": { "description": "Internal Server Error. Solr request failed or configuration missing.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Solr request failed" } } } } } } } } }, "/firme/email/": { "get": { "tags": [ "Companies' emails" ], "summary": "Get companies by email address", "description": "Retrieves all companies from the 'firme' Solr core that match the specified email address.", "parameters": [ { "name": "email", "in": "query", "required": true, "description": "Email address to search for in the 'email' field of the firme core.", "schema": { "type": "string", "format": "email", "example": "contact@firma.ro" } } ], "responses": { "200": { "description": "Successful operation. Returns a list of companies matching the given email.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "denumire": { "type": "string", "description": "Company name" }, "cui": { "type": "string", "description": "Company tax ID" } } } } } } }, "400": { "description": "Bad Request. Missing or invalid 'email' parameter.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Missing email parameter" } } } } } }, "500": { "description": "Internal Server Error. Solr request failed or configuration missing.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Solr request failed" } } } } } } } } }, "/firme/email/add/": { "post": { "tags": [ "Companies' emails" ], "summary": "Add email(s) to a company document", "description": "Adds one or more email addresses to the 'email' field of a company in the 'firme' Solr core.", "requestBody": { "required": true, "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Solr document ID of the company.", "example": "123456" }, "email": { "type": "array", "items": { "type": "string", "format": "email" }, "description": "List of email addresses to add to the company.", "example": [ "contact@firma.ro", "office@firma.ro" ] } }, "required": [ "id", "email" ] } }, "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "example": "123456" }, "email": { "type": "array", "items": { "type": "string", "format": "email" }, "example": [ "contact@firma.ro", "office@firma.ro" ] } }, "required": [ "id", "email" ] } } } }, "responses": { "200": { "description": "Email(s) successfully added to the company document.", "content": { "application/json": { "schema": { "type": "object", "properties": { "responseHeader": { "type": "object", "description": "Solr response header" }, "response": { "type": "object", "description": "Solr response details" } } } } } }, "400": { "description": "Bad Request. Missing id or email parameter.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Missing id or email" } } } } } }, "500": { "description": "Internal Server Error. Solr request failed or configuration missing.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Solr request failed" } } } } } } } } }, "/firme/email/delete/": { "delete": { "tags": [ "Companies' emails" ], "summary": "Delete an email from a company document in Solr", "description": "Removes an email address (or multiple) from the 'email' field of a company document in the 'firme' Solr core.", "operationId": "deleteCompanyEmail", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "email" ], "properties": { "id": { "type": "string", "example": "RO123456", "description": "Unique company ID in Solr." }, "email": { "oneOf": [ { "type": "string", "example": "contact@firma.ro" }, { "type": "array", "items": { "type": "string", "example": "info@firma.ro" } } ], "description": "Email or list of emails to remove." } } } } } }, "responses": { "200": { "description": "Email removed successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "responseHeader": { "type": "object", "example": { "status": 0, "QTime": 5 } } } } } } }, "400": { "description": "Missing id or email parameter" }, "405": { "description": "Only DELETE method is allowed" }, "500": { "description": "Solr request failed or server misconfiguration" } } } }, "/firme/logo/": { "get": { "tags": [ "Companies' logos" ], "summary": "Get companies by logo name", "description": "Retrieves all companies from the 'firme' core that match the specified logo name.", "parameters": [ { "name": "logo", "in": "query", "required": true, "description": "Logo name to search for in the 'logo' field of the firme core.", "schema": { "type": "string", "example": "https://example.com/logo.png" } } ], "responses": { "200": { "description": "Successful operation. Returns a list of companies matching the given logo.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "denumire": { "type": "string", "description": "Company name" }, "cui": { "type": "string", "description": "Company tax ID" } } } } } } }, "400": { "description": "Bad Request. Missing or invalid 'logo' parameter.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Missing logo parameter" } } } } } }, "500": { "description": "Internal Server Error. Solr request failed or configuration missing.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Solr request failed" } } } } } } } } }, "/firme/logo/add/": { "post": { "tags": [ "Companies' logos" ], "summary": "Add logo(s) to a company document", "description": "Adds one or more logos to the 'logo' field of a company in the 'firme' Solr core.", "requestBody": { "required": true, "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Solr document ID of the company.", "example": "123456" }, "logo": { "type": "array", "items": { "type": "string" }, "description": "List of logos to add to the company.", "example": [ "https://example.com/logo.png", "http://example.com/logo.jpg" ] } }, "required": [ "id", "logo" ] } }, "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "example": "123456" }, "logo": { "type": "array", "items": { "type": "string" }, "example": [ "https://example.com/logo.png", "http://example.com/logo.jpg" ] } }, "required": [ "id", "logo" ] } } } }, "responses": { "200": { "description": "Logo(s) successfully added to the company document.", "content": { "application/json": { "schema": { "type": "object", "properties": { "responseHeader": { "type": "object", "description": "Solr response header" }, "response": { "type": "object", "description": "Solr response details" } } } } } }, "400": { "description": "Bad Request. Missing id or logo parameter.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Missing id or logo" } } } } } }, "500": { "description": "Internal Server Error. Solr request failed or configuration missing.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Solr request failed" } } } } } } } } }, "/firme/logo/delete/": { "delete": { "tags": [ "Companies' logos" ], "summary": "Remove logo(s) from a company document", "description": "Removes one or more logos from the 'logo' field of a company in the 'firme' Solr core.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Solr document ID of the company.", "example": "123456" }, "logo": { "type": "array", "items": { "type": "string" }, "description": "List of logo names to remove from the company.", "example": [ "https://example.com/logo.png", "http://example.com/logo.jpg" ] } }, "required": [ "id", "logo" ] } } } }, "responses": { "200": { "description": "Logo(s) successfully removed from the company document.", "content": { "application/json": { "schema": { "type": "object", "properties": { "responseHeader": { "type": "object", "description": "Solr response header" }, "response": { "type": "object", "description": "Solr response details" } } } } } }, "400": { "description": "Bad Request. Missing id or logo parameter.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Missing id or logo" } } } } } }, "500": { "description": "Internal Server Error. Solr request failed or configuration missing.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Solr request failed" } } } } } } } } }, "/firme/phone/": { "get": { "tags": [ "Companies' phones" ], "summary": "Get companies by phone name", "description": "Retrieves all companies from the 'firme' core that match the specified phone name.", "parameters": [ { "name": "phone", "in": "query", "required": true, "description": "Phone name to search for in the 'phone' field of the firme core.", "schema": { "type": "string", "example": "0712345678" } } ], "responses": { "200": { "description": "Successful operation. Returns a list of companies matching the given phone.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "denumire": { "type": "string", "description": "Company name" }, "cui": { "type": "string", "description": "Company tax ID" } } } } } } }, "400": { "description": "Bad Request. Missing or invalid 'phone' parameter.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Missing phone parameter" } } } } } }, "500": { "description": "Internal Server Error. Solr request failed or configuration missing.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Solr request failed" } } } } } } } } }, "/firme/phone/add/": { "post": { "tags": [ "Companies' phones" ], "summary": "Add phone(s) to a company document", "description": "Adds one or more phones to the 'phone' field of a company in the 'firme' Solr core.", "requestBody": { "required": true, "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Solr document ID of the company.", "example": "123456" }, "phone": { "type": "array", "items": { "type": "string" }, "description": "List of phone to add to the company.", "example": [ "0712345678", "0798765432" ] } }, "required": [ "id", "phone" ] } }, "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "example": "123456" }, "phone": { "type": "array", "items": { "type": "string" }, "example": [ "0712345678", "0798765432" ] } }, "required": [ "id", "phone" ] } } } }, "responses": { "200": { "description": "Phone(s) successfully added to the company document.", "content": { "application/json": { "schema": { "type": "object", "properties": { "responseHeader": { "type": "object", "description": "Solr response header" }, "response": { "type": "object", "description": "Solr response details" } } } } } }, "400": { "description": "Bad Request. Missing id or phone parameter.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Missing id or phone" } } } } } }, "500": { "description": "Internal Server Error. Solr request failed or configuration missing.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Solr request failed" } } } } } } } } }, "/firme/phone/delete/": { "delete": { "tags": [ "Companies' phones" ], "summary": "Remove phone(s) from a company document", "description": "Removes one or more phones from the 'phone' field of a company in the 'firme' Solr core.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Solr document ID of the company.", "example": "123456" }, "phone": { "type": "array", "items": { "type": "string" }, "description": "List of phone names to remove from the company.", "example": [ "0712345678", "0798765432" ] } }, "required": [ "id", "phone" ] } } } }, "responses": { "200": { "description": "Phone(s) successfully removed from the company document.", "content": { "application/json": { "schema": { "type": "object", "properties": { "responseHeader": { "type": "object", "description": "Solr response header" }, "response": { "type": "object", "description": "Solr response details" } } } } } }, "400": { "description": "Bad Request. Missing id or phone parameter.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Missing id or phone" } } } } } }, "500": { "description": "Internal Server Error. Solr request failed or configuration missing.", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Solr request failed" } } } } } } } } }, "/firme/scraper/": { "get": { "tags": [ "Companies' scrapers" ], "summary": "Get companies by scraper name", "description": "Retrieves all companies from the 'firme' Solr core that were added or updated by a specific scraper.", "operationId": "getCompaniesByScraper", "parameters": [ { "name": "scraper", "in": "query", "required": true, "schema": { "type": "string", "example": "bestjobs" }, "description": "Name of the scraper used to collect company data." } ], "responses": { "200": { "description": "List of companies that match the scraper name", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "denumire": { "type": "string", "example": "SC EXAMPLE SRL" }, "cui": { "type": "string", "example": "RO12345678" } } } } } } }, "400": { "description": "Missing scraper parameter" }, "405": { "description": "Only GET method is allowed" }, "500": { "description": "Solr request failed or server misconfiguration" } } } }, "/firme/scraper/add/": { "post": { "tags": [ "Companies' scrapers" ], "summary": "Add a scraper to a company", "description": "Adds a scraper name to the 'scraper' field of a company in the 'firme' Solr core.", "operationId": "addScraperToCompany", "requestBody": { "required": true, "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "id": { "type": "string", "example": "12345", "description": "Unique identifier of the company document in Solr." }, "scraper": { "type": "string", "example": "bestjobs", "description": "Name of the scraper to add." } }, "required": [ "id", "scraper" ] } } } }, "responses": { "200": { "description": "Scraper successfully added to the company", "content": { "application/json": {} } }, "400": { "description": "Missing id or scraper" }, "405": { "description": "Only POST method is allowed" }, "500": { "description": "Solr request failed or server misconfiguration" } } } }, "/firme/scraper/delete/": { "delete": { "tags": [ "Companies' scrapers" ], "summary": "Delete a scraper from a company", "description": "Removes a scraper name from the 'scraper' field of a company in the 'firme' Solr core.", "operationId": "deleteScraperFromCompany", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "example": "12345", "description": "Unique identifier of the company document in Solr." }, "scraper": { "type": "string", "example": "bestjobs", "description": "Name of the scraper to remove." } }, "required": [ "id", "scraper" ] } } } }, "responses": { "200": { "description": "Scraper successfully removed from the company", "content": { "application/json": {} } }, "400": { "description": "Missing id or scraper" }, "405": { "description": "Only DELETE method is allowed" }, "500": { "description": "Solr request failed or server misconfiguration" } } } }, "/firme/website/": { "get": { "tags": [ "Companies' websites" ], "summary": "Get company by website", "description": "Searches the 'firme' Solr core for companies matching the given website.", "operationId": "getCompanyByWebsite", "parameters": [ { "name": "website", "in": "query", "required": true, "schema": { "type": "string", "example": "www.example.com" }, "description": "The website of the company to search for." } ], "responses": { "200": { "description": "Company data successfully retrieved", "content": { "application/json": {} } }, "400": { "description": "Missing website parameter" }, "405": { "description": "Only GET method is allowed" }, "500": { "description": "Solr request failed or server misconfiguration" } } } }, "/firme/website/add/": { "post": { "tags": [ "Companies' websites" ], "summary": "Add a website to a company", "description": "Adds a website to the 'website' field of a company document in the 'firme' Solr core.", "operationId": "addCompanyWebsite", "requestBody": { "required": true, "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "id": { "type": "string", "example": "12345", "description": "The ID of the company in Solr." }, "website": { "type": "string", "example": "www.example.com", "description": "The website to add to the company." } }, "required": [ "id", "website" ] } } } }, "responses": { "200": { "description": "Website successfully added", "content": { "application/json": {} } }, "400": { "description": "Missing id or website parameter" }, "405": { "description": "Only POST method is allowed" }, "500": { "description": "Solr request failed or server misconfiguration" } } } }, "/firme/website/delete/": { "delete": { "tags": [ "Companies' websites" ], "summary": "Remove a website from a company", "description": "Removes a website from the 'website' field of a company document in the 'firme' Solr core.", "operationId": "deleteCompanyWebsite", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "example": "12345", "description": "The ID of the company in Solr." }, "website": { "type": "string", "example": "www.example.com", "description": "The website to remove from the company." } }, "required": [ "id", "website" ] } } } }, "responses": { "200": { "description": "Website successfully removed", "content": { "application/json": {} } }, "400": { "description": "Missing id or website parameter" }, "405": { "description": "Only DELETE method is allowed" }, "500": { "description": "Solr request failed or server misconfiguration" } } } } } }