Skip to content

ioChem-BD API - OpenAPI 3.0

In order to use the Create Module REST API service, you will first need to request a credential token (JWT) that will authorise you to use the service and will expire in 24 hours.

Guide to use via Swagger:

  1. On the User option click on the 'Authorize' button
  2. Insert your platform credentials on the form
  3. Now click the Authorize button
  4. Now click the Close button and now are logged!
  5. Finally, use the rest of the operations listed in the page

Guide to use via command line operations:

  1. You must first request the token that will allow you to operate the REST API
  2. Using curl, wget or other libraries you must POST the /create/rest/login appending your credentials as basicAuth, ex:

    curl -X POST 'https://test.iochem-bd.org:8443/create/rest/login' -u johndoe@iochem-bd.org:foobar

    Or using a safer method that requests your password interactivelly:

    read -sp 'Enter password:' pwd

    curl -X POST 'https://test.iochem-bd.org:8443/create/rest/login' -u johndoe@iochem-bd.org:$pwd



  3. It will return the JWT token as a string that must be appended to all requests as an authorization header with the format 'Bearer token_string'

    curl -X 'GET' 'https://test.iochem-bd.org:8443/create/rest/project?id=200' -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...'

Version: 1.1.0

/create/rest/project

GET

Summary:

Get project

Description:

Fetches the details of a specific project.

Parameters
NameLocated inDescriptionRequiredSchema
idqueryThe unique identifier for the projectYesinteger
Responses
CodeDescription
200Successful response with project details
400Invalid ID supplied
404Project not found
Security
Security SchemaScopes
bearerAuth

POST

Summary:

Create a project

Description:

Creates a new project with the specified details.

Responses
CodeDescription
200Project created successfully
400Invalid input or missing required parameters
Security
Security SchemaScopes
bearerAuth

PUT

Summary:

Update a project

Description:

Updates an existing project with the specified details.

Responses
CodeDescription
200Project updated successfully
400Invalid input or missing required parameters
404Project not found
Security
Security SchemaScopes
bearerAuth

DELETE

Summary:

Delete a project

Description:

Deletes an existing project by its ID.

Parameters
NameLocated inDescriptionRequiredSchema
idqueryThe ID of the project to deleteYesinteger
Responses
CodeDescription
200Project deleted successfully
400Invalid project ID supplied
404Project not found
Security
Security SchemaScopes
bearerAuth

/create/rest/report-type

GET

Summary:

Get all report types

Description:

Retrieves a list of all active report types including their ID, name and status

Responses
CodeDescription
200successful operation
400Invalid status value
Security
Security SchemaScopes
bearerAuth

/create/rest/report

GET

Summary:

Get report

Description:

Fetches the details of a specific report.

Parameters
NameLocated inDescriptionRequiredSchema
idqueryYesinteger
Responses
CodeDescription
200Successful response with report details
400Invalid tag value
Security
Security SchemaScopes
bearerAuth

POST

Summary:

Create a report

Description:

Creates a new report with the specified details.
reportType ids must be retrieved from ReportType GET method.

Responses
CodeDescription
200Report created successfully
400Invalid input or missing required parameters
Security
Security SchemaScopes
bearerAuth

PUT

Summary:

Update your report

Description:

Updates the details of an existing report.

Responses
CodeDescription
200Report updated successfully
400Invalid input or missing required parameters
404Report not found
Security
Security SchemaScopes
bearerAuth

DELETE

Summary:

Delete a report

Description:

Deletes an existing report by its ID.

Parameters
NameLocated inDescriptionRequiredSchema
idqueryThe ID of the report to deleteYesinteger
Responses
CodeDescription
200Report deleted successfully
400Invalid report ID supplied
404Report not found
Security
Security SchemaScopes
bearerAuth

/create/rest/report/calculations

PUT

Summary:

Update report calculations

Description:

Insert an ordered list of calculations to be associated to the report, will replace existing previous values.

Responses
CodeDescription
200Report updated successfully
400Invalid input or missing required parameters
404Project not found
Security
Security SchemaScopes
bearerAuth

/create/rest/calculation

GET

Summary:

Get a calculation

Description:

Fetches the details of a specific calculation.

Parameters
NameLocated inDescriptionRequiredSchema
idqueryID of order that needs to be fetchedYeslong
Responses
CodeDescription
200successful operation
400Invalid ID supplied
404Order not found
Security
Security SchemaScopes
bearerAuth

PUT

Summary:

Update a calculation

Description:

Updates the details of an existing calculation. (only data, no files )

Responses
CodeDescription
200calculation updated successfully
400Invalid input or missing required parameters
404Project not found
Security
Security SchemaScopes
bearerAuth

DELETE

Summary:

Delete a calculation

Description:

Deletes an existing calculation by its ID.

Parameters
NameLocated inDescriptionRequiredSchema
idqueryID of the order that needs to be deletedYeslong
Responses
CodeDescription
400Invalid ID supplied
404Order not found
Security
Security SchemaScopes
bearerAuth

/create/rest/project/descendant

GET

Summary:

Get children of a project

Description:

Handle hierarchy

  • type undefined or type=calculation: return first level calculations of the project
  • type=calculation&depth=all: return all children calculations of the project
  • type=project: return first level subprojects of the project
  • type=project&depth=2: return first and second level calculations of the projects
  • type=project&depth=all: return all subprojects of the project
Parameters
NameLocated inDescriptionRequiredSchema
idqueryidYesinteger
typequerytype of search ( calculation, project )Nostring
depthquerydepth of search ( 1, 2 ... or all )Nostring
Responses
CodeDescription
200Successful operation
defaultsuccessful operation
Security
Security SchemaScopes
bearerAuth

/create/rest/calculation/files

GET

Summary:

Find all files of calculation ( names/id )

Description:

Returns a list name files

Parameters
NameLocated inDescriptionRequiredSchema
idqueryidYesinteger
typequerytype of search ( files, cml )Nostring
Responses
CodeDescription
200successful operation
400Invalid ID supplied
404file name list not found
Security
Security SchemaScopes
bearerAuth

/create/rest/calculation/files/bitstream

GET

Summary:

Retrieves a calculation file

Description:

Retrieves a calculation file (bitstream) given calculation id and file name.

Parameters
NameLocated inDescriptionRequiredSchema
idqueryCalculation id to retrieve file fromYesinteger
fileIdqueryFilename to retrieveYesstring
Responses
CodeDescription
200successful operation
400Invalid ID supplied
404file name list not found
Security
Security SchemaScopes
bearerAuth

/create/rest/login

POST

Summary:

Logs user into the system

Responses
CodeDescription
200Successful operation
401Invalid username/password supplied
Security
Security SchemaScopes
basicAuth