Cityscore is a CoB city-performance metric devised by the Mayors office, calculated and managed by the analytics team.
Drupal (via https://www.boston.gov) is used to provide a public endpoint or micro service which can be used by other departments or external organizations to retrieve current cityscore data for use in their own applications.
Load Cityscore Data
POSThttps://www.boston.gov/rest/cityscore/load
This secure endpoint is used by analytics to load and update the current cityscore data.
Request Body
Name
Type
Description
payload
string
A JSON formatted array of cityscore metric objects.
api-key
string
Authentication token
// Message received and processed correctly.
{
"status": "success",
"message": "cityscore updated"
}
// No api-key provided in post form.
{
"status": "error",
"message": "error missing token"
}
// No payload provided in post form.
{
"status": "error",
"message": "error no payload"
}
// JSON in payload is not corretly encoded.
{
"status": "error",
"message": "bad json in payload"
}
// Not all metric objects were loaded.
{
"status": "error",
"message": "Not all records saved"
}