API / Program-Milestones

Program-Milestones endpoint enables you to get milestones information and manage milestones in Silverbucket's database. Endpoint's URL is:
https://<your_environment_url>/customer-api/1.0/program-milestones/




GET


When calling /program-milestones/ endpoint without parameters you will get all the program milestones from database. Example response:
{
"count": 1,
"csvUrl": "/customer-api/1.0/program-milestones/?csv=true",
"itemsPerPage": 500,
"excelUrl": "/customer-api/1.0/program-milestones/?excel=true",
"next": null,
"current": 1,
"lastPage": 1,
"data": [
{ "id": 3,
"created": "2021-01-19T14:57:04.842776+02:00",
"modified": "2021-01-19T14:57:04.909869+02:00",
"name": "Keskivaihe",
"date": "2019-06-27",
"description": null,
"project": 2322,
"program": null },
],
"previous": null
}



POST


You can add program-milestones with POST method to the same URL than get. POST body contains new program-milestone's data in JSON format. Successful call will give response code 201 and return the newly created program-milestone's JSON. Minimum JSON for adding a program-milestone is:
{
"name": "<string>",
"date": <iso_date>,
"project": "<project_id>",
<---- or --->
"program": "<program_id>",
}