In order to store user-submitted data into the GlyTouCan RDF, an authorization check is required to authenticate the registrant. Instead of using a username and password, GlyTouCan generates a specific Contributor ID and API key.The ID and key can be obtained via the profile page.
Endpoint : https://glytoucan.org/api/bulkload/:format
format : wurcs or glycoct
Basic Authentication over HTTPS is used to transfer the user authentication information.
How basic authentication is handled depends upon the tool being used, for curl, it is the -u parameter.
curl -X POST -F "file=@./insert.txt" -u <Contributor ID>:<API Key> https://glytoucan.org/api/bulkload/wurcs
Please use files containing only WURCS sequences and newlines.
WURCS=2.0/...
WURCS=2.0/...
WURCS=2.0/...
....
Please use files containing only GlycoCT sequences and newlines.
The registration system will recognize regex of (?=RES\\n1[a-zA-Z]) as separators.
RES
1s....
...
RES
1s....
....
If your submissions is successful, the following response should be returned.
{
"errcode": "",
"contents": [
"badbc3beb1321bda8a9afef2e8b6fe3680b1ffd8c1051bcb6295648eb45f8c25",
"6bf44407e3c31ba89a5d8da77f9a6baae35b609fda1635418407d0f90bc8e125"
],
"logs": {
"url": "https://glytoucan.org/api/bulkload/wurcs"
}
}
Since a submission number should always be created, errcode is currently empty. Error codes are planned to be added as needed, but are not yet defined. The same applies to the errcode field in the other API on this page.
Endpoint : http://glytoucan.org/api/submission
Basic Authentication over HTTPS is used to transfer the user authentication information.
How basic authentication is handled depends upon the tool being used, for curl, it is the -u parameter.
In the example below, data is sent in json. The sequence must be json encoded. Please Note Please be carefully to escape some characters such as ‘$’or '|' that may be contained within some sequence data when using the command line scripts.
curl -X POST -H 'Content-Type: application/json' -u <Contributor ID>:<API Key> -d '{ "sequence": "<WURCS Sequence>" }' https://glytoucan.org/api/submission
If your submissions is successful, the following response should be returned.
{
"errcode": "",
"contents": {
"submission_number": "467c1fc1a533e91fa230be048772d1396f3c168fc13218cd6a98aa09274bd1c5"
},
"logs": {
"url": "http://glytoucan.org/api/submission"
}
}
At present, this API can also be called using the previous endpoint
https://api.glytoucan.org/glycan/register. Please note that this previous endpoint is deprecated and will no longer be available by the end of 2026.
To check the submitted data (e.g. validation results and the issued accession) using the submission number, see the Data Retrieval API page.