Software technologies to automatically extract chemical information from Safety Data Sheets.
Method Endpoint
POST /parser/login
Call this POST endpoint with a JSON body with the keys “username” and “password“.
If successful return a JSON with the key “token” and the relative token. The token has a validity of 1 hour.
If not successful, returns an HTTP status other than 200.
Method Endpoint
POST /parser/uploadPdf
Description
Call this POST endpoint with a JSON body with three keys: “file“, “filename” and “bucket“.
In headers as key use “token” and as value use the token that you receive with the login method.
If successful, returns a JSON with three keys:
If not successful, returns an HTTP status other than 200.
Method Endpoint
POST /parser/uploadFile
Description
Call this POST endpoint with a form-data request, use as key the word “file” and attach the pdf file to send.
In Query Parameters use as key the word “bucket” and as value a string that represent the place where your pdf will be stored.
In headers as key use “token” and as value use the token that you receive with the login method.
If successful, returns a JSON with three keys:
If not successful, returns an HTTP status other than 200.
Method Endpoint
POST /parser/getFile
Description
Call this GET endpoint with two Query Parameters: “request_id” and “content_type“.
In headers as key use “token” and as value use the token that you receive with the login method.
If successful, returns a JSON with one key “file” with as value a string that is the base64 of your results in the chosen content type.
If not successful, returns an HTTP status other than 200.
Method Endpoint
POST /parser/getContent
Description
Call this GET endpoint with two Query Parameters: “request_id” and “content_type“.
In headers as key use “token” and as value use the token that you receive with the login method.
If successful, returns a JSON with all the keys and the relative values of your results in the chosen content type.
If not successful, returns an HTTP status other than 200.
Method Endpoint
POST /parser/getStatus
Description
Call this GET endpoint with one Query Parameter: “request_id“.
“request_id” is the 16-digit numeric unique identifier of a pdf previously sent.
In headers as key use “token” and as value use the token that you receive with the login method.
If successful, returns a JSON with two keys: “status” and “description“.
If not successful, returns an HTTP status other than 200.
Method Endpoint
POST /parser/getBucketTrees
Description
Call this GET without any additional Query Parameter.
In headers as key use “token” and as value use the token that you receive with the login method.
If successful, returns a JSON with two keys: “bucket_names” and “number_of_buckets“.
If not successful, returns an HTTP status other than 200.
Method Endpoint
POST /parser/getBucketInfo
Description
Call this GET endpoint with one Query Parameter: “bucket“.
“bucket” has as value a string with the bucket whose information you want to receive.
In headers as key use “token” and as value use the token that you receive with the login method.
If successful, returns a JSON with three keys: “number_sds“, “ratio_ready” and “status“.
If not successful, returns an HTTP status other than 200.
Method Endpoint
POST /parser/getInfoDownload
Description
all this GET endpoint with one Query Parameter: “bucket“.
“bucket” has as value a string with the bucket whose information you want to receive.
In headers as key use “token” and as value use the token that you receive with the login method.
If successful, returns a JSON with a list that contains three sections.
In the first section there are two keys: “downloaded” and “not_downloaded“.
In the second section there is one key: “ratio_downloaded“.
In the third section there are as keys the 16-digit numeric unique identifiers that correspond to the SDSs in the specified bucket.
Each unique identifier has a sub-section with three keys: “downloaded”, “date”, and “msg”.
“bucket“, “filename” and “request_id” that is the 16-digit numeric unique identifier of the pdf sent.
If not successful, returns an HTTP status other than 200.
Alternatively you can call this GET method with the Query Parameter “request_id” with the 16-digit unique identifier as its value if you want information on the download status of a single sds (in this case it provides only the third section).
Method Endpoint
POST /parser/sendComment
Description
Call this POST endpoint with a JSON body with one key: “comment“.
“comment” has as value a string with a comment, relative to a specific pdf, that you want to send to the Chemparser factory.
In Query Parameters use as key “request_id” and as value the 16-digit numeric unique identifier of a pdf previously sent.
In headers as key use “token” and as value use the token that you receive with the login method.
If successful, returns a JSON with one key: “msg“. “msg” has as value a string that inform you that the comment was sent.
If not successful, returns an HTTP status other than 200.