Skip to main content

API Overview

Qinfinite Automation Hub exposes two primary REST API surfaces, each served by a dedicated microservice:

ServiceDefault PortPurpose
Job Executor9000Job CRUD, step management, execution control, search, logging
Global Configurator8081Connection credentials, global variables, certificates, datasets, files, API templates

A third service, the MCP Server (port 8080), provides the AI-facing interface via Model Context Protocol. See AI Integration for MCP-specific documentation.

Base URLs​

Job Executor:       http://localhost:9000
Global Configurator: http://localhost:8081
MCP Server: http://localhost:8080

In production, these are typically behind a reverse proxy or API gateway with paths like /api/job-executor/, /api/configurator/, etc.

Authentication​

All API endpoints are secured with role-based access control via Spring Security. Each endpoint requires a specific authority (permission) in the caller's authentication token.

Authorities follow the pattern:

{Service}:{Resource}:{Action}

Examples:

AuthorityDescription
JobExecutor:Job:upsertCreate or update jobs
JobExecutor:Job:readRead job details
JobExecutor:Job:deleteDelete jobs
JobExecutor:JobExecution:readRead execution data
GlobalConfigurator:Connection:upsertCreate or update connections
GlobalConfigurator:Connection:readRead connection details
GlobalConfigurator:GlobalVariable:upsertCreate or update global variables

Pass the authentication token in the Authorization header:

curl -H "Authorization: Bearer <token>" http://localhost:9000/jobs/{id}

Common Response Format​

All API responses use a consistent ApiResponse wrapper:

{
"status": "Success",
"message": "Human-readable description of the result",
"data": { },
"error": null,
"meta": null
}

Fields​

FieldTypeDescription
statusstring"Success" or "Error".
messagestringDescription of what happened.
dataanyThe response payload. Type varies by endpoint.
errorobject | nullError details when status is "Error". Contains code and message.
metaobject | nullPagination metadata for list endpoints.

Pagination Metadata​

Paginated endpoints include a meta object:

{
"meta": {
"totalElements": 142,
"page": 0,
"size": 10
}
}

Error Handling​

When an error occurs, the response includes an error object:

{
"status": "Error",
"message": "Failed to fetch job",
"data": null,
"error": {
"code": "NOT_FOUND",
"message": "Job with ID 'job-invalid' not found"
},
"meta": null
}

HTTP Status Codes​

CodeMeaning
200Success
201Resource created
204Success with no response body (e.g., delete)
400Bad request (validation error, invalid input)
401Unauthorized (missing or invalid token)
403Forbidden (insufficient permissions)
404Resource not found
500Internal server error

Content Type​

All endpoints accept and return application/json:

curl -X POST http://localhost:9000/jobs/upsert \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{ "name": "My Job" }'

API Sections​

Job Executor APIs​

  • Jobs API -- CRUD operations for job definitions.
  • Execution API -- Start, stop, pause, resume, and monitor executions.
  • Steps API -- Manage steps within jobs.
  • Search API -- Advanced search and filtering.

Global Configurator APIs​