Skip to content

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.

EndpointDescriptionRequired fields
/{tenant}/ns/{namespace}/set/{set}/id/{id}Upsert data for a single ID.
/{tenant}/ns/{namespace}/set/{set}/idBatch 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-Type header in the request must match the set's contentType.
    • If the set does not have a specified contentType but its overarching namespace does, the type will be taken from the namespace. Conversely, a set's contentType will override its namespace's contentType if both are defined.
    • If neither the set nor its namespace has a contentType defined, the expected content type is text/plain.
    • A set or namespace can be configured to accept other valid MIME types.
  • When retrieving data, the Content-Type header in the response and the file extension will reflect the same content type.
  • Only text-based sets allow batch uploads. The Content-Type in the request itself must be text/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 ​

EndpointDescription
/{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.

EndpointDescription
/{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.

BIOINFORMATICS RESEARCH LABORATORY