API submission
Using the BioSamples API you can submit new samples to our resource, as well as update or curate samples.
This website requires the limited processing of your personal data in order to function. By using the site you are agreeing to this as outlined in our Submission Privacy Notice
Submission minimal fields
Sample
Sample content reference:
| Field | Description | Type | Cardinality ======= |
|---|---|---|---|
name |
The short name of the sample. |
|
Required |
release |
The date at which the sample was first made public. |
|
Required |
update |
The date at which the sample was last updated. |
|
System Generated |
accession |
The sample unique identifier in the BioSamples database. If not provided, one will be automatically assigned. |
|
Required for |
characteristics |
The key-value pairs representing the attributes of the sample. |
|
Optional |
externalReferences |
A list of links towards external references, such as datasets in other archives. |
|
Optional |
relationships |
A list of relationships this sample has to other, existing, samples. |
|
Optional |
data |
A more structured data format to allow submission of tables (eg. antibiogram) in addition to key-value pairs. |
|
Optional, required only for structured data submission using our POST or PUT endpoints. |
The structure of elements in Field characteristics :
| Field | Type | Cardinality |
|---|---|---|
text |
|
Recommended |
ontologyTerms |
|
Optional |
unit |
|
Optional |
Curation Link
| Field | Type | Cardinality |
|---|---|---|
sample |
|
Required |
curation |
|
Required |
curation.attributesPre |
|
Required, could be empty |
curation.attributesPost |
|
Required, could be empty |
curation.externalReferencesPre |
|
Required, could be empty |
curation.externalReferencesPost |
|
Required, could be empty |
Submit a sample
POST sample to BioSamples
Request
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/post-sample/http-request.adoc[]
Response
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/post-sample/http-response.adoc[]
Links
For all the links available in BioSamples check the Links Reference
Update sample
PUT a sample to BioSamples
The submitted sample is required to have an accession and the accession should match the one in the url. Updating a sample overwrites its existing content with the new one. If you want to preserve existing attributes, you should first download the sample, build a new version including existing and new attributes, and resubmit the new content.
Request
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/put-sample/http-request.adoc[]
Response
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/put-sample/http-response.adoc[]
Links
For all the links available in BioSamples check the Links Reference
Submit structured data
PUT structured data associated with a sample
This endpoint is useful if an user wants to add structured data to an existing sample (example: Antibiogram data of sample)
Sample structured data should be submitted after submission of the original sample (need sample accession). The ownership of the Sample and the Structured data are decoupled, hence they can be edited without affecting the other. BioSamples currently contains structured data for AMR, CHICKEN_DATA, HISTOLOGY_MARKERS, MOLECULAR_MARKERS, FATTY_ACIDS. This is defined in the "type" field of the data and we recommend to use one of the exisitng types if possible.
Example 1
Request
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/put-structured-data/http-request.adoc[]
Response
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/put-structured-data/http-response.adoc[]
Links
For all the links available in BioSamples check the Links Reference
Submit curation object
POST a curation to BioSamples
Request
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/post-curation/http-request.adoc[]
Response
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/post-curation/http-response.adoc[]
Links
For all the links available in BioSamples check the Links Reference
Accession a sample
POST a sample for accessioning. Accessioned sample is saved as a private sample.
Request
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/accession-sample/http-request.adoc[]
Response
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/accession-sample/http-response.adoc[]
Links
For all the links available in BioSamples check the Links Reference ls
Validate sample fields
POST a sample to validate its basic fields before submission.
Request
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/validate-sample/http-request.adoc[]
Response
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/validate-sample/http-response.adoc[]
Post sample with external references
POST sample with external reference attached to it
Request
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/post-sample-with-external-references/http-request.adoc[]
Response
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/post-sample-with-external-references/http-response.adoc[]
Put sample with relationships
PUT sample with relationships
Request
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/put-sample-with-relationships/http-request.adoc[]
Response
Unresolved directive in ref_api_submit.adoc - include::/home/isuru/projects/bsd/biosamples-v4/webapps/core/target/generated-snippets/put-sample-with-relationships/http-response.adoc[]
Links
For all the links available in BioSamples check the Links Reference