iCodex Projects API

Professional API for accessing job data from multiple project databases

API Information

Base URLs:

http://localhost:5000/api/ngrammr - nGrammr project data

http://localhost:5000/api/ops - OPS project data

Authentication: No authentication required for local development

Response Format: JSON

Available Endpoints

GET

Get All Job Data

GET /api/ngrammr

Retrieves all job records from the database.

GET

Get Job Data by ID

GET /api/ngrammr/{id}

Retrieves a specific job record by its ID.

Parameter: id (integer) - The unique identifier of the job record

GET

Get Job Data by Date

GET /api/ngrammr/date/{date}

Retrieves job records filtered by creation date, ordered by ID in descending order.

Parameter: date (string) - Date in YYYY-MM-DD format

Data Model

Details of the NGrammrData object returned by the API endpoints.

Field Type Description Nullable
id integer Unique identifier for the job record No
status string Current status of the job (e.g., "Completed") Yes
journalAbbr string Abbreviated journal name Yes
referenceNumber string Unique reference identifier (GUID format) Yes
jobId string Job identifier Yes
isScoreOnly string Flag indicating if this is a score-only job ("true" or "false") Yes
nXpress string nXpress flag ("true", "false", or empty) Yes
fileName string Name of the file being processed Yes
filePath string Full path to the file Yes
score string Job score value Yes
track string Processing track (e.g., "A", "B", "C") Yes
createdOn datetime Timestamp when the job was created Yes
modifiedOn datetime Timestamp when the job was last modified Yes

Error Handling

The API uses standard HTTP status codes to indicate the success or failure of requests.

Status Code Description
200 Success - Request was successful
404 Not Found - The requested resource was not found
500 Internal Server Error - An error occurred on the server

Frontend Applications

For a visual interface, you can also access the following frontend applications:

Interactive Data Viewer

A web-based interface to view and interact with the data.

Location: frontend/client/api-test.html

Open this file directly in your browser to access the interactive data viewer.

Complete API Documentation

Detailed documentation with examples and usage instructions.

Location: frontend/client/api-documentation.html

Open this file directly in your browser for comprehensive API documentation.

OPS Database Testing

Test the connection and functionality of the OPS database:

GET

Test OPS Database Connection

GET /api/opsdatabase-test/connection

Tests the connection to the OPS database and returns the database name.

GET

Get OPS Database Tables

GET /api/opsdatabase-test/tables

Retrieves a list of all tables in the OPS database.

GET

Test JobMaster Query

GET /api/opsdatabase-test/jobmaster-test

Tests the specific JobMaster query used in the OPS JobMaster page.