Additional Endpoints
Restricted usage
The endpoints documented below are for illustrative purposes only. An admin must set up the appropriate auth context(s), role(s), etc.
If you have data you would like to upload into the service, contact us at ldh-admin@bcm.edu.
A. PUT endpoints
Endpoints to upload data.
| Endpoint | Description | Required fields |
|---|---|---|
/{tenant}/ns/{namespace}/set/{set}/id/{id} | Upsert data for a single ID. | |
/{tenant}/ns/{namespace}/set/{set}/id | Batch upsert using a TSV payload. Only for text-based namespaces. | id, data |
A.1. Size restrictions
- Payloads sent to the PUT endpoints are subject to size restrictions.
- For a single-record upload, the size, in bytes, is checked. The default limit is 250 MB per request.
- For batch uploads, both (a) the number of bytes and (b) the number of records in the request payload are checked. Currently, the default limits are 250 MB and 5,000 records per request.
- For either single-record or batch requests, the byte limit is configurable on a namespace basis.
A.2 Content type restrictions
- When uploading data, the
Content-Typeheader in the request must match the set'scontentType.- If the set does not have a specified
contentTypebut its overarching namespace does, the type will be taken from the namespace. Conversely, a set'scontentTypewill override its namespace'scontentTypeif both are defined. - If neither the set nor its namespace has a
contentTypedefined, the expected content type istext/plain. - A set or namespace can be configured to accept other valid MIME types.
- If the set does not have a specified
- When retrieving data, the
Content-Typeheader in the response and the file extension will reflect the same content type. - Only text-based sets allow batch uploads. The
Content-Typein the request itself must betext/tab-separated-values(see the example below).
A.3 Example PUT requests
A.3.1 Example single-record PUT requests
Below is an example of supplying the data directly on the command line.
bash
curl -H "Authorization: Bearer $jwt" -X PUT \
-H "Content-Type: text/plain" --data "some text data" \
"https://{HOST}/ldh-dss/sandbox_tn/ns/ns1/set/set1/id/testid123"Below is an example of sending a file to the DSS.
bash
curl -H "Authorization: Bearer $jwt" -X PUT \
-H "Content-Type: text/plain" --upload-file some_file.txt \
"https://${HOST}/ldh-dss/sandbox_tn/ns/ns1/set/set1/id/testid123"A.3.2 Example batch PUT request
bash
curl -H "Authorization: Bearer $jwt" -X PUT \
-H "Content-Type: text/tab-separated-values" --data-binary @test.tsv \
"https://${HOST}/ldh-dss/sandbox_tn/ns/ns1/set/set1/id"CA11000123 {"locus":{"contig":"chr2"}}
CA21000500 {"locus":{"contig":"chr1"}}
CA2499224945 {"locus":{"contig":"chr17"}}json
{
"data": {
"changeType": {
"insert": 2,
"update": 1
}
}
}B. DELETE endpoints
| Endpoint | Description |
|---|---|
/{tenant}/ns/{namespace}/set/{set}/id/{id} | Delete data for a single ID. |
C. Configuration endpoints
These PUT and DELETE endpoints enable an authorized user to customize the behavior of a tenant, namespace, and/or set.
| Endpoint | Description |
|---|---|
/{tenant} | Update/delete the config for a tenant. |
/{tenant}/ns/{namespace} | Update/delete the config for a namespace. |
/{tenant}/ns/{namespace}/set/{set} | Update/delete the config for a set. |
