API calls related to CDD Vault Projects:
Retrieve
Return a list of accessible projects for the given vault.
GET /api/v1/vaults/$VAULT_ID/projects
Example:
curl -H "X-CDD-Token: $TOKEN" https://app.collaborativedrug.com/api/v1/vaults/489978881/projects
Returns:
[
{
"name": "Super User Private Stuff",
"id": 3870925
},
{
"name": "Collaboration Data",
"id": 938429932
}
]
Return details for a specific CDD Vault Project within a given CDD Vault.
GET /api/v1/vaults/$VAULT_ID/projects/$PROJECT_ID
Example:
curl -H "X-CDD-Token: $TOKEN" https://app.collaborativedrug.com/api/v1/vaults/489978881/projects/20206
Returns:
{
"name": "Compound Registry",
"id": 20206,
"description": "Compound Registry",
"members": [
{
"id": 27395,
"first_name": "Elvis",
"last_name": "Presely",
"email": "TheKing@graceland.org",
"can_manage_project": true,
"can_edit_data": true
},
{
"id": 27396,
"first_name": "Lisa",
"last_name": "Marie",
"email": "LMP@graceland.org",
"can_manage_project": false,
"can_edit_data": true
}
]
}
Create
POST /api/v1/vaults/<vault_id>/projects
Create a new CDD Vault Project.
Parameters
name |
The name of the CDD Vault Project. Required. |
description |
A description of the CDD Vault Project. |
members |
List of users to add as Members of the new CDD Vault Project. Specify the IDs of each user:
Specify if the user can edit the CDD Vault Project:
Specify if the user can manage the CDD Vault Project:
|
Using all available parameters together, the POST Projects JSON should resemble:
{"name": "A New Project",
"description": "A 2nd project created by the API",
"members": [
{"user_id":14202,"can_edit_data": true, "can_manage_project": false},
{"user_id":10276,"can_edit_data": true, "can_manage_project": false}
]
}
Update
PUT /api/v1/vaults/<vault_id>/projects
Update an existing CDD Vault Project. Note: Only the API keys of vault admins can modify CDD Vault Projects via the API.
Parameters
name |
The name of the CDD Vault Project to update. Required. |
description |
Modify the description of the CDD Vault Project. |
members |
Modify the list of users which are Members of the new CDD Vault Project. Specify the IDs of each user:
Specify if the user can edit the CDD Vault Project:
Specify if the user can manage the CDD Vault Project:
|
Using all available parameters together, the PUT Projects JSON should resemble:
{"name": "A New Project",
"description": "Updationg a project",
"members": [
{"user_id":14202,"can_edit_data": true, "can_manage_project": false}
]
}Note: The users included in the members parameter of the PUT Projects API call will replace the entire current membership of that Project. If you list 1 user in the members parameter, then that Project will have that 1 user as its only Member.
Delete
Delete an existing CDD Vault Project. Note: Only the API keys of vault admins can modify CDD Vault Projects via the API.
DELETE /api/v1/vaults/$VAULT_ID/projects/$PROJECT_ID
Example:
curl -H "X-CDD-Token: $TOKEN" https://app.collaborativedrug.com/api/v1/vaults/489978881/projects/36962