Silverbucket's instructions and documentation has moved to a new address:
https://manual.silverbucket.com
Reservations API - Version 1.0
Add new reservations:
- Parameters
- user_id = Person's ID in Silverbucket
- user_username = Person's username in Silverbucket
- user_email = Person's email address in Silverbucket
- role_name = Person's role in the project or the role which should be allocated, if the person is not specified
- project_id = Project's ID in Silverbucket
- project_code = Project's code in Silverbucket
- startdate = Reservation's start date in ISO format YYYY-MM-DD
- enddate = Reservation's end date in ISO format YYYY-MM-DD
- hours = Total amount of hours which will be allocated to the given time span
- percentage = Daily allocation as a percentage from the user/role daily capacity
- overwrite_all = Overwrite all person's allocations in other projects
{"rows":[ { "overwrite_all": "true", "user_username": "matti.meikalainen", "project_code": "FOO", "startdate": "2017-01-01", "enddate": "2017-12-01", "percentage": 100 }, { "overwrite_all": "true", "user_email": "matti.meikalainen@foo.bar", "project_code": "BAR", "startdate": "2017-01-01", "enddate": "2017-12-01", "percentage": 100 }, { "overwrite_all": "false", "role_name": "FOO", "project_code": "BAR", "startdate": "2017-01-01", "enddate": "2017-01-31", "hours": 160 }, { "overwrite_all": "true", "user_id": 1, "project_id": 1, "startdate": "2017-01-01", "enddate": "2017-12-01", "percentage": 100 } ]}
curl -H "Content-Type: application/json" -H 'Authorization: Token <AUTH_TOKEN>' -X POST https://<SUBDOMAIN>.agbucket.com/api/1.0/allocations/save-daterange/ -d 'JSONDATA'
Query reservations:
- Parameters example:
- assigned=true / false
- mode=hours / relative / days / fte
- project_ids=
- ids = This is either project id or person's id or project role's id
- reservation_mode=fixed
- scale_with_probability=true / false
- show-only-with-data=true / false
- show-passive-roles=true / false
- slots=56 / amount of resourcing slots
- startdate=2018-11-26
- unassigned=true / false
- view=weeks / days / months
Project's allocations:
/api/1.0/allocations/projects/overview/
curl -H "Authorization: Token <AUTH_TOKEN>" "https://<SUBDOMAIN>.agbucket.com/api/1.0/allocations/projects/overview/?assigned=false&mode=hours&project_ids=<PROJECT_ID>&reservation_mode=fixed&scale_with_probability=false&show-only-with-data=false&show-passive-roles=true&slots=10&startdate=2018-11-26&unassigned=true&view=weeks"
{ "100": [ { "date": "2018-11-26", "hours": 0.0, "relative": 0.0, "days": 0.0, "fte": 0.0, "load_level": "load-0-0", "hard_absence_level": null, "soft_absence_level": null }, { "date": "2018-12-03", "hours": 0.0, "relative": 0.0, "days": 0.0, "fte": 0.0, "load_level": "load-0-0", "hard_absence_level": null, "soft_absence_level": null } ] }
Project's roles:
/api/1.0/allocations/projects/projectroles/by-ids/
curl -H "Authorization: Token <AUTH_TOKEN>" "https://<SUBDOMAIN>.agbucket.com/a<span class="fr-marker" data-id="0" data-type="false" style="display: none; line-height: 0;"></span><span class="fr-marker" data-id="0" data-type="true" style="display: none; line-height: 0;"></span>pi/1.0/allocations/projects/projectroles/by-ids/?ids=<PROJECT_ID>&mode=hours&show-only-with-data=false&show-passive-roles=true&slots=10&startdate=2018-11-26&view=weeks
[ { "type": "project", "id": 1, "code": "Project code", "extra_code": "", "name": "Project name", "probability": 60, "program": null, "people": [ { "project_id": 1, "user_id": 100, "projectrole_id": 110, "name": "Project name", "code": "Project code", "username": "test", "full_name": "Matti Meikäläinen", "rolename": "Engineer", "note": null, "dayload": "7.50", "hourly_rate": "0.00", "hour_budget": null, "external_id": null, "active": false, "program": null, "is_favourite": false, "is_projectlead": false, "is_role": false, "active_resource": false } ], "unknown": [], "totalPeople": 1, "totalUnknown": 0 } ]
Person's allocations:
/api/1.0/allocations/people/by-ids/
curl -H "Authorization: Token <AUTH_TOKEN>" "https://<SUBDOMAIN>.agbucket.com/api/1.0/allocations/people/by-ids/?ids=<USER_ID>&mode=hours&show-only-with-data=false&show-passive-roles=true&slots=10&startdate=2018-11-26&view=weeks"
{ "startdate": "2018-11-26", "enddate": "2018-12-02", "type": "users", "results": [ { "id": 1, "username": "test", "full_name": "Meikäläinen Matti", "default_role": "Engineer", "external_id": null, "is_favourite": false, "active_resource": false, "allocations": [ { "date": "2018-11-26", "hours": 0, "relative": 0, "days": 0, "fte": 0, "load_level": "load-0-0", "hard_absence_level": "level-absence-high", "soft_absence_level": null } ] } ], "total": 1 }
Person's project roles:
/api/1.0/allocations/people/projectroles/by-ids/
curl -H "Authorization: Token <AUTH_TOKEN>" "https://<SUBDOMAIN>.agbucket.com/api/1.0/allocations/people/projectroles/by-ids/?ids=<USER_ID>&mode=hours&show-only-with-data=false&show-passive-roles=true&slots=10&startdate=2018-11-26&view=weeks"
[ { "type": "person", "id": 1, "username": "test", "full_name": "Meikäläinen Matti", "default_role": Engineer", "external_id": null, "projectroles": [ { "project_id": 308, "project_probability": 100, "user_id": 1, "projectrole_id": 2683, "name": "Example", "code": "code example", "username": "test", "full_name": "Meikäläinen Matti", "rolename": "Engineer", "note": null, "dayload": "7.50", "hourly_rate": "0.00", "hour_budget": null, "external_id": null, "active": false, "program": null, "is_favourite": false, "is_projectlead": true, "is_role": false, "active_resource": false } ], "total": 1 } ]
Project role's allocations:
/api/1.0/allocations/projectroles/by-ids/
curl -H "Authorization: Token <AUTH_TOKEN>" "https://<SUBDOMAIN>.agbucket.com/api/1.0/allocations/projectroles/by-ids/?ids=<PROJECT_ROLE_ID>&mode=hours&show-only-with-data=false&show-passive-roles=true&slots=10&startdate=2018-11-26&view=weeks"
[ { "project_id": 94, "user_id": null, "projectrole_id": 1002, "active_resource": true, "allocations": [ { "date": "2019-01-28", "hours": 35.76, "relative": 95.0, "days": 4.768, "fte": 0.9536, "load_level": "load-81-101", "hard_absence_level": "", "soft_absence_level": null } ] } ]