Create - ioChem-BD module - REST API You can find out more about ioChem-BD at https://www.iochem-bd.com/ .
Additional links:
Base URL Each ioChem-BD instance has its own URL replace the placeholder text for your server hostname:
https://XXXX.XXXX.XX/create/rest For example the REST API Service for the Create module at ICIQ research institution has the following address:
https://iochem-bd.iciq.es/create/rest Similar for URV university:
https://iochem-bd.urv.es/create/rest 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/project/share GET Summary: Get all project shares
Description: Retrieves all the shares set on a 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 shares 400 Invalid ID supplied 404 Project not found
Security Security Schema Scopes bearerAuth
POST Summary: Create a share for a Project
Description: Creates a new share for a Project.
Responses Code Description 200 Project shared successfully 400 Invalid input or missing required parameters
Security Security Schema Scopes bearerAuth
PUT Summary: Update a project share
Description: Updates an existing project share with the permissions READ, WRITE or FULLACCESS.
Responses Code Description 200 Project share updated successfully 400 Invalid input or missing required parameters 404 Share not found
Security Security Schema Scopes bearerAuth
DELETE Summary: Delete a project share
Description: Deletes a share of an existing project by its ID.
Parameters Name Located in Description Required Schema shareId query The ID of the share to delete Yes integer
Responses Code Description 200 Share deleted successfully 400 Invalid share ID supplied 404 Share not found
Security Security Schema Scopes bearerAuth
/create/rest/report/types 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 The unique identifier for the report Yes integer
Responses Code Description 200 Successful response with report details 400 Invalid ID supplied
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 calculations updated successfully 400 Invalid input or missing required parameters 404 Report 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 calculation that needs to be fetched Yes long
Responses Code Description 200 successful operation 400 Invalid ID supplied 404 Calculation 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 Calculation 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 calculation to delete Yes long
Responses Code Description 200 Calculation deleted successfully 400 Invalid ID supplied 404 Calculation 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 projecttype=calculation&depth=all : return all children calculations of the projecttype=project : return first level subprojects of the projecttype=project&depth=2 : return first and second level calculations of the projectstype=project&depth=all : return all subprojects of the projectParameters 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 400 Invalid ID supplied 404 Project not found
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 Binary file returned for download 400 Invalid ID supplied 404 file name list not found
Security Security Schema Scopes bearerAuth
/create/rest/calculation/xyz GET Summary: Retrieves the xyz of a Calculation
Description: Retrieves a calculation xyz given calculation id.
Parameters Name Located in Description Required Schema id query Calculation id to retrieve XYZ Yes integer filename query filename you want for the xyz recovered. No string
Responses Code Description 200 XYZ binary file returned for download 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
Description: ⚠️ Warning! This method has been included only to show how JWT is requested using command line. It displays your Base64-encoded credentials. Avoid leaving it open, sharing your screen, or storing credentials insecurely. Use with caution in secure environments only. Please click the Authorize 🔒 button to proper obtain and use the token.
Responses Code Description 200 Successful operation 401 Invalid username/password supplied
Security Security Schema Scopes basicAuth
/create/rest/user/info GET Summary: Retrieve user information
Description: Retrieve all user self information.
Responses Code Description 200 Successful operation 401 Invalid or expired token
Security Security Schema Scopes bearerAuth
/create/rest/navigation/path/resolve GET Summary: Get id
Description: Retrieves id of an entity with his path
Parameters Name Located in Description Required Schema path query Entity path Yes string type query Entity type (project, calculation, report) Yes string
Responses Code Description 200 Successful operation 401 Invalid or expired token 501 Report ID retrieval not implemented yet
Security Security Schema Scopes bearerAuth