This repository has been archived by the owner on Jun 16, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Tracking API specification
Patrick Titzler edited this page Aug 3, 2016
·
5 revisions
###Deployment tracking request To record an application deployment:
-
POST
/api/v1/track
-
Parameters:
Parameter Value Parameter Type Description Data Type Content-Type
application/json
header Must be application/json
string Body
JSON, see details below body Tracking payload string Body Model (Example tracking request is listed at the bottom of this page):
{ application_name (string), application_uris ([string], optional), application_version (string), bound_vcap_services ([vcap_service_object],optional), code_version (string), date_sent: (dateTime), repository_url: (string), runtime: (string), space_id: (string) }
-
application_name: Cloud Foundry Environment variable VCAP_APPLICATION attribute
application_name
-
application_uris (Optional): Cloud Foundry Environment variable VCAP_APPLICATION attribute
application_uris
-
application_version: Cloud Foundry Environment variable VCAP_APPLICATION attribute
application_version
-
bound_vcap_services (Optional): Derived from Cloud Foundry Environment variable
VCAP_SERVICES
.
[ { "<vcap_service_label>": { "count": <vcap_service_label_instance_count>, "plans": [ "<vcap_service_label_instance_plan>" ] } } ]
- code_version: Sample application code version
-
date_sent: ISO 8601 formatted date/time (e.g.
1985-04-12T23:20:50.52Z
) -
repository_url: [GitHub] repository URL of the sample application (e.g.
https://github.com/ibm-cds-labs/simple-data-pipe.git
) -
runtime: one of
nodejs
,java
,python
,go
,swift
-
space_id: Cloud Foundry Environment variable VCAP_APPLICATION attribute
space_id
-
application_name: Cloud Foundry Environment variable VCAP_APPLICATION attribute
-
Responses:
Response codes:
HTTP status code Reason Response body 201 success {"ok":true}
400 body of tracking request is empty 500 server-side error Response headers:
{ "Content-Type": "application/json" }
Example:
POST https://deployment-tracker.mybluemix.net/api/v1/track
{
"application_name": "my-simple-data-pipe",
"application_uris": ["my-simple-data-pipe.mybluemix.net"],
"application_version": "5bbcb651-0ca4-4b67-b710-c327cd040257",
"bound_vcap_services": [
{
"cloudantNoSQLDB": {
"count": 1,
"plans": ["Shared"]
}
}
],
"code_version": "0.1.0",
"date_sent": "2016-08-02T20:59:00.153Z",
"repository_url": "https://github.com/ibm-cds-labs/simple-data-pipe.git",
"runtime": "nodejs",
"space_id": "9b275cb0-9249-4c36-437a-3ef8682d3523"
}