Information submitted through the support site is private but is not hosted within your secure CDD Vault. Please do not include sensitive intellectual property in your support requests.

Run(s) [GET, PUT, DELETE]

API calls related to runs:

Retrieve

Update

Destroy

Retrieve

GET /api/v1/vaults/<vault_id>/runs/<id>

Retrieve a single run.

GET /api/v1/vaults/<vault_id>/runs

Retrieve a list of runs based on the parameters.


Parameters (optional):

async Boolean
If true, do an asynchronous export (see Async Export)
Use for large data sets. This is recommended any time you want to download more than page_size results.
Note: any page_size parameter used in an API GET call that also uses the async=true parameter will be ignored. The GET call will return all valid data for the given GET call.
offset The index of the first object actually returned. Defaults to 0.  
page_size The maximum number of objects to return in this call. Default is 50, maximum is 1000. If the response exceeds the page_size, we strongly recommend using the async option instead of downloading multiple chunks. Note: any page_size parameter used in an API GET call that also uses the async=true parameter will be ignored. The GET call will return all valid data for the given GET call.
data_sets Comma-separated list of public dataset ids
Defaults to no data sets
Limits scope of query
 
projects Comma-separated list of project ids
Defaults to all available projects
Limits scope of query
 
only_ids Boolean
If true, only the Run IDs are returned, allowing for a smaller and faster response.
Default: false
It can be added to any GET Runs call. Async should still be used when many IDs are expected.

 

Note: any page_size parameter used in an API GET call that also uses the only_ids=true parameter will be ignored. The GET call will return all valid data for the given GET call.

created_before Date (YYYY-MM-DDThh:mm:ss±hh:mm)  
created_after Date (YYYY-MM-DDThh:mm:ss±hh:mm)  
modified_before Date (YYYY-MM-DDThh:mm:ss±hh:mm)  
modified_after Date (YYYY-MM-DDThh:mm:ss±hh:mm)  
protocols Comma-separated list of protocol ids Include only runs for the specified protocols.
slurp

Specify a Slurp ID to return only the Runs created by a specific Slurp (Import)

 
run_date_before

Returns Runs with a Run Date BEFORE the specified date

 
run_date_after

Returns Runs with a Run Date AFTER the specified date

 

 

Examples

Retrieve a single run

curl -H "X-CDD-Token: $TOKEN" https://app.collaborativedrug.com/api/v1/vaults/489978881/runs/753311875

Returns:

 

{
    "id"75331185,
    "class""run",
    "created_at""2016-12-22T22:20:46.000Z",
    "modified_at""2023-07-27T15:13:30.000Z",
    "run_date""2016-07-22",
    "source_files": [
        {
            "id"336231,
            "name""MyDRImport.zip"
        }
    ],
    "attached_files": [],
    "project": {
        "name""Internal Data",
        "id"6134
    },
    "eln_entries": [],
    "person""Charles Weatherall",
    "run_fields": {
        "Person""Charles Weatherall",
        "CRO""CRO ABC"
    },
    "plate_statistics": [
        {
            "plate": {
                "id"261043,
                "name""CW Plate 20161105"
            },
            "readout_definition": {
                "id"283514,
                "name""Raw Data"
            },
            "statistics": [
                {
                    "name""z_prime_factor",
                    "value"0.6913198633901083
                },
                {
                    "name""positive_control_mean",
                    "mean"30.46875,
                    "standard_deviation"11.64248165264855,
                    "count"32
                },
                {
                    "name""negative_control_mean",
                    "mean"2936.5625,
                    "standard_deviation"287.3753235977355,
                    "count"32
                }
            ]
        }
    ]
}

 

Note: If the Run returned is a plate-based Run, this GET Runs API call does return information on the plate statistics (such as Z' Factor and control means).

 

Update

PUT /api/v1/vaults/<vault_id>/runs/id

Updates an existing Run.

This PUT Runs API call allows users to update the Run’s Project association and the Run_Date, Person, Place, Conditions and Vault-specific user-defined Run Fields.

Examples

curl -H "X-CDD-Token: $TOKEN" -X PUT -H "Content-Type: application/json" -d "@data.json" https://app.collaborativedrug.com/api/v1/vaults/489978881/runs/1055309345

File data.json:

{
    "project":"New Project",
    "run_date":"2020-09-14",
    "conditions":"New Condition",
    "place":"New Lab",
    "person":"New Person"
}

Returns:

{
    "id": 1055309345,
    "class": "run",
    "created_at": "2013-03-19T18:35:02.000Z",
    "modified_at": "2020-09-14T14:26:58.000Z",
    "run_date": "2020-09-14",
    "person": "New Person",
    "place": "New Lab",
    "conditions": "New Condition",
    "source_files": [
        {
            "id": 66399,
            "name": "DataToImport.csv"
        }
    ],
    "attached_files": [],
    "project": {
        "name": "New Project",
        "id": 9812
    }
}

Note: Use the "run_fields" parameter in your JSON to update the values of any Vault-specific user-defined Run Fields. (These Run Fields are defined by your Vault Administrator and used to annotate individual Runs of Protocol data.)

The JSON passed to update Run Fields might resemble this:

{
    "project":"New Project",
    "run_date":"2020-09-14",
    "conditions":"New Condition",
    "place":"New Lab",
    "person":"New Person",
    "run_fields": {"CRO":"Graceland CRO"}
}

 

Destroy

DELETE /api/v1/vaults/<vault_id>/runs/<id>

Delete a single run.

 

DELETE /api/v1/vaults/<vault_id>/runs?slurp=<slurp_id>

Delete runs associated with a single slurp.

Parameter:

slurp Specify the slurp_id of an import operation.
All runs associated with the slurp will be deleted if the user has permissions for all runs. If not, no runs will be deleted.

 

Examples

Delete a single run

curl -H "X-CDD-Token: $TOKEN" -X DELETE https://app.collaborativedrug.com/api/v1/vaults/489978881/runs/753311875

Returns:

{
  "message": "Run with ID 753311875 has been destroyed"
}

 

Delete runs associated with a slurp

curl -H "X-CDD-Token: $TOKEN" -X DELETE https://app.collaborativedrug.com/api/v1/vaults/489978881/runs?slurp=75212865

{
  "status": 204,
  "message": "Runs destroyed"
}