British historian, Sir Antony James Beevor, has said “I get slightly obsessive about working in archives because you don't know what you're going to find. In fact, you don't know what you're looking for until you find it.” If you, too, are obsessed with the information archived within your ELN then this bulk ELN export feature is rather ace!
API users may now retrieve ELN entries via the new GET eln/entries
API call:
GET /api/v1/vaults/<vault_id>/eln/entries
Several parameters are supported for this GET ELN Entries
API call including, but not limited to, eln_entries, author, created_after, modified_after, status, finalized_date_after
. An example curl command demonstrates how to retrieve entries finalized after 2019-12-31.
curl -H "X-CDD-Token: $TOKEN" -X GET
"https://app.collaborativedrug.com/api/v1/vaults/<vault_id>/eln/entries?
finalized_date_after=2019-12-31"
Without the async=true
parameter, the above curl command returns:
{
"count": 1,
"offset": 0,
"page_size": 50,
"objects": [
{
"id": 1111,
"name": "Entry: 1111 - Data for submission",
"status": "finalized",
"author": {
"id": 6021,
"first_name": "First",
"last_name": "Last"
},
"url": "https://app.collaborativedrug.com/vaults/<vault_id>/eln/entries/1111"
}
]
}
1. To retrieve a specific set of ELN entries based by IDs use the eln_entries
parameter.
https://app.collaborativedrug.com/api/v1/vaults/<vault_id>/eln/entries?eln_entries=1111,2222
2. To search by “author
”, you must provide the user ID and not a user’s name.
https://app.collaborativedrug.com/api/v1/vaults/<vault_id>/eln/entries?author=999&async=true
The GET Users
API call will return all user IDs for a specific Vault. User IDs are also returned when the async parameter is omitted in the GET ELN Entries
call (see the “author” section of the JSON).
3. The “async” parameter is required to retrieve a ZIP export of your ELN entries. As an example, the following GET API call will return an Export ID that can then be retrieved using the GET Exports
API call.
https://app.collaborativedrug.com/api/v1/vaults/<vault_id>/eln/entries?finalized_date_after=2019-12-31&async=true