Projects API
GET /api/2/organizations/:organization_id/projects/
Example Response
[
{
"id": 2,
"name": "Better Project",
"graphs":
[
{
"id": 2,
"project_id": 3,
"created_at": "2016-01-29T19:45:22.506Z",
"updated_at": "2016-01-29T19:45:22.506Z",
"title": "Metrics Received",
"position": 1,
"units": "y units",
"stacked": false,
"continuous": false,
"metrics": ["collector.metrics_received"],
"dashboard_id": 2
}
],
"dashboards":
[
{
"id": 2,
"name": "Overview",
"project_id": 2,
"position": 0,
"created_at": "2016-01-29T19:45:22.506Z",
"updated_at": "2016-01-29T19:45:22.506Z"
}
]
},
{
"id": 3,
"name": "Best Project",
"graphs":
[
{
"id": 1,
"project_id": 2,
"created_at": "2016-01-29T19:43:49.513Z",
"updated_at": "2016-01-29T19:43:49.513Z",
"title": "Metrics Received",
"position": 1,
"units": "y units",
"stacked": false,
"continuous": false,
"metrics": ["collector.metrics_received"],
"dashboard_id": 3
}
],
"dashboards":
[
{
"id": 3,
"name": "Overview",
"project_id": 2,
"position": 0,
"created_at": "2016-01-29T19:43:49.513Z",
"updated_at": "2016-01-29T19:43:49.513Z"
}
]
}
]
GET /api/2/organizations/:organization_id/projects/:project_id
Example Response
{
"id": 2,
"name": "Best Project",
"graphs":
[
{
"id": 1,
"project_id": 2,
"created_at": "2016-01-29T19:43:49.513Z",
"updated_at": "2016-01-29T19:43:49.513Z",
"title": "Metrics Received",
"position": 1,
"units": "y units",
"stacked": false,
"continuous": false,
"metrics": ["collector.metrics_received"],
"dashboard_id": 2
}
],
"dashboards":
[
{
"id": 2,
"name": "Overview",
"project_id": 2,
"position": 0,
"created_at": "2016-01-29T19:45:22.506Z",
"updated_at": "2016-01-29T19:45:22.506Z"
}
]
}
POST /api/2/organizations/:organization_id/projects/
Example Post Body
{
"name": "New Project"
}
Example Response
{
"name": "New Project",
"graphs": [],
"dashboards": [],
"id": 6
}
PATCH /api/2/organizations/:organization_id/projects/:project_id
Example Post Body
{
"name": "Different Project"
}
Example Response
{
"id": 2,
"name": "Different Project",
"graphs":
[
{
"id": 1,
"project_id": 2,
"created_at": "2016-01-29T19:43:49.513Z",
"updated_at": "2016-01-29T19:48:29.200Z",
"title": "Metrics Received",
"position": 1,
"units": "y units",
"stacked": false,
"continuous": false,
"metrics": ["collector.metrics_received"],
"dashboard_id": 2
}
],
"dashboards":
[
{
"id": 2,
"name": "Overview",
"project_id": 2,
"position": 0,
"created_at": "2016-01-29T19:43:49.513Z",
"updated_at": "2016-01-29T19:48:29.200Z",
}
]
}
DELETE /api/2/organizations/:organization_id/projects/:project_id
Example Response