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:
- On the User option click on the 'Authorize' button
- Insert your platform credentials on the form
- Now click the Authorize button
- Now click the Close button and now are logged!
- Finally, use the rest of the operations listed in the page
Guide to use via command line operations:
- You must first request the token that will allow you to operate the REST API
- 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
- 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
Name | Located in | Description | Required | Schema |
---|
id | query | The unique identifier for the project | Yes | integer |
Responses
Code | Description |
---|
200 | Successful response with project details |
400 | Invalid ID supplied |
404 | Project not found |
Security
Security Schema | Scopes |
---|
bearerAuth | |
POST
Summary:
Create a project
Description:
Creates a new project with the specified details.
Responses
Code | Description |
---|
200 | Project created successfully |
400 | Invalid input or missing required parameters |
Security
Security Schema | Scopes |
---|
bearerAuth | |
PUT
Summary:
Update a project
Description:
Updates an existing project with the specified details.
Responses
Code | Description |
---|
200 | Project updated successfully |
400 | Invalid input or missing required parameters |
404 | Project not found |
Security
Security Schema | Scopes |
---|
bearerAuth | |
DELETE
Summary:
Delete a project
Description:
Deletes an existing project by its ID.
Parameters
Name | Located in | Description | Required | Schema |
---|
id | query | The ID of the project to delete | Yes | integer |
Responses
Code | Description |
---|
200 | Project deleted successfully |
400 | Invalid project ID supplied |
404 | Project not found |
Security
Security Schema | Scopes |
---|
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
Code | Description |
---|
200 | successful operation |
400 | Invalid status value |
Security
Security Schema | Scopes |
---|
bearerAuth | |
/create/rest/report
GET
Summary:
Get report
Description:
Fetches the details of a specific report.
Parameters
Name | Located in | Description | Required | Schema |
---|
id | query | | Yes | integer |
Responses
Code | Description |
---|
200 | Successful response with report details |
400 | Invalid tag value |
Security
Security Schema | Scopes |
---|
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
Code | Description |
---|
200 | Report created successfully |
400 | Invalid input or missing required parameters |
Security
Security Schema | Scopes |
---|
bearerAuth | |
PUT
Summary:
Update your report
Description:
Updates the details of an existing report.
Responses
Code | Description |
---|
200 | Report updated successfully |
400 | Invalid input or missing required parameters |
404 | Report not found |
Security
Security Schema | Scopes |
---|
bearerAuth | |
DELETE
Summary:
Delete a report
Description:
Deletes an existing report by its ID.
Parameters
Name | Located in | Description | Required | Schema |
---|
id | query | The ID of the report to delete | Yes | integer |
Responses
Code | Description |
---|
200 | Report deleted successfully |
400 | Invalid report ID supplied |
404 | Report not found |
Security
Security Schema | Scopes |
---|
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
Code | Description |
---|
200 | Report updated successfully |
400 | Invalid input or missing required parameters |
404 | Project not found |
Security
Security Schema | Scopes |
---|
bearerAuth | |
/create/rest/calculation
GET
Summary:
Get a calculation
Description:
Fetches the details of a specific calculation.
Parameters
Name | Located in | Description | Required | Schema |
---|
id | query | ID of order that needs to be fetched | Yes | long |
Responses
Code | Description |
---|
200 | successful operation |
400 | Invalid ID supplied |
404 | Order not found |
Security
Security Schema | Scopes |
---|
bearerAuth | |
PUT
Summary:
Update a calculation
Description:
Updates the details of an existing calculation. (only data, no files )
Responses
Code | Description |
---|
200 | calculation updated successfully |
400 | Invalid input or missing required parameters |
404 | Project not found |
Security
Security Schema | Scopes |
---|
bearerAuth | |
DELETE
Summary:
Delete a calculation
Description:
Deletes an existing calculation by its ID.
Parameters
Name | Located in | Description | Required | Schema |
---|
id | query | ID of the order that needs to be deleted | Yes | long |
Responses
Code | Description |
---|
400 | Invalid ID supplied |
404 | Order not found |
Security
Security Schema | Scopes |
---|
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
Name | Located in | Description | Required | Schema |
---|
id | query | id | Yes | integer |
type | query | type of search ( calculation, project ) | No | string |
depth | query | depth of search ( 1, 2 ... or all ) | No | string |
Responses
Code | Description |
---|
200 | Successful operation |
default | successful operation |
Security
Security Schema | Scopes |
---|
bearerAuth | |
/create/rest/calculation/files
GET
Summary:
Find all files of calculation ( names/id )
Description:
Returns a list name files
Parameters
Name | Located in | Description | Required | Schema |
---|
id | query | id | Yes | integer |
type | query | type of search ( files, cml ) | No | string |
Responses
Code | Description |
---|
200 | successful operation |
400 | Invalid ID supplied |
404 | file name list not found |
Security
Security Schema | Scopes |
---|
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
Name | Located in | Description | Required | Schema |
---|
id | query | Calculation id to retrieve file from | Yes | integer |
fileId | query | Filename to retrieve | Yes | string |
Responses
Code | Description |
---|
200 | successful operation |
400 | Invalid ID supplied |
404 | file name list not found |
Security
Security Schema | Scopes |
---|
bearerAuth | |
/create/rest/login
POST
Summary:
Logs user into the system
Responses
Code | Description |
---|
200 | Successful operation |
401 | Invalid username/password supplied |
Security
Security Schema | Scopes |
---|
basicAuth | |