Legacy Blockwise API documentation

Rotem
Rotem
  • Updated

Whether you wish to make your Blockwise data transparent through a publicly-viewable dashboard, or to incorporate it into an internal analytics tool, you can use the API below to embed this data in your website.


Authentication

The API uses BasicAuth and requires three parameters:

  • Username: your Zencity email

  • Password: your Zencity password

  • Elucd-API-Key: A key provided by Zencity, to be included in the request header

 

Endpoint

https://vault.zencity.io/api/scores


Sample Payload

[ ... { 
"org_level": "2",
"level_0": "City",
"level_1": "Patrol 1",
"level_2": "Sector 2",
"level_3": null,
"level_4": null,
"level_0_type": "city",
"level_1_type": "patrol_division",
"level_2_type": "sector",
"level_3_type": "null",
"level_4_type": null,
"safety": 63.9155692708106,
"trust": 66.2840141900332,
"start_date": "2021-03-01T07:00:00Z",
"end_date": "2021-03-31T00:00:00Z"
}, ...

 

Key Descriptors

Field name

Type

Description

org_level

String

The organizational level the individual score is for.

level_0

String

What level 0 (city) this score is for.

level_1

String

What level 1 (patrol division) this particular score is for.

level_2

String

What level 2 (sector) this particular score is for.

level_0_type

String

The string name for organizational level 0. Similarly for level_1_type, level_2_type, level_3_type and level_4_type.

trust

Integer

A trust score for the selected division at the selected month.

safety

Integer

A safety score for the selected division at the selected month.

start_date

String

The beginning of the month this score object represents.

end_date

String

The end of the month this score object represents.

topics

List

Number (total and percentage) of responses that were categorized into each assignable topic category (e.g. Noise, Streets and Traffic, etc.). Note: This descriptor produces a list of multiple responses.

 

Filters

Year

Example: All score records for 2021

...?year=2021

 

Month

Example: All score records for March.

...?month=3 


Note: By itself, it does not define a year, so this would return all data from March for all available years of data. Please combine filter with year for a more specific result. Starts at 1.

 

Org Level

Example: All score records for all level 1 divisions, e.g. patrol divisions

...?org_level=1


Level_1

Example: All score records for Sand Creek (patrol division 3)

...?level_1=3


Level_2

Example: All score records for Sector 31

...?level_2=31

 

 

 

Was this article helpful?

/

Comments

0 comments

Article is closed for comments.