GetMeasure API version 1.0
/login
Get an access token
post /login
Get an access token
Body
Media type: application/json
Type: any
Example:
{
"username": "test",
"password": "test"
}
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"username": "test",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYiI6ImNjOTk2IiwiZXhwIjoxNjQzNDUxMTE3LCJpc3MiOiJoYXJpYm8ifQ.xvPkeNptIlEaGjPxd4g6G6Rp4UZLKG1G42flB1ijyxc"
}
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{
"reason": "Wrong credentials"
}
/measures
Retrieve measures for a specific site aggregated by step you chose in parameters
get /measures/site/{id_site}
Retrieve measures for a specific site aggregated by step you chose in parameters
URI Parameters
- id_site: required(int)
Site from you want to get measures
Headers
- Authorization: required(string)
Example:
Bearer your_token
Query Parameters
- date_start: required(string)
Example:
2020-08-25 00:00:00 - date_end: required(string)
Example:
2020-08-25 23:59:59 - step: required(string)
Step by what you want to aggregate parameters. Possible values = hour, day, month or year
Example:
hour
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id_entity_analyzed": XXXXXXX,
"date_time": "2020-08-25T00:00:00Z",
"entrees": 133,
"sorties": 190,
"passage": 0,
"interest": 0,
"interest_duration": 0,
},
{
"id_entity_analyzed": XXXXXXX,
"date_time": "2020-08-25T00:00:00Z",
"entrees": 171,
"sorties": 57,
"passage": 0,
"interest": 0,
"interest_duration": 0,
}
HTTP status code 400
Two errors can be encountered. Date start is greater than end date and period selected cannot be greater than 153 days (5 months)
Body
Media type: application/json
Type: any
Example:
{
"reason": "Start date cannot be greater than end date"
},
{
"reason": "Period chosen is too long"
}
HTTP status code 404
Body
Media type: application/json
Type: any
Example:
{
"reason": "No measures found"
}
Retrieve measures for a specific entity analyzed aggregated by step you chose in parameters
get /measures/{id_entity_analyzed}
Retrieve measures for a specific entity analyzed aggregated by step you chose in parameters
URI Parameters
- id_entity_analyzed: required(int)
Entity analyzed from you want to get measures
Headers
- Authorization: required(string)
Example:
Bearer your_token
Query Parameters
- date_start: required(string)
Example:
2020-08-25 00:00:00 - date_end: required(string)
Example:
2020-08-25 23:59:59 - step: required(string)
Step by what you want to aggregate parameters. Possible values = hour, day, month or year
Example:
hour
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"date_time": "2020-08-25T00:00:00Z"
"entrees": 133,
"sorties": 190,
"passage": 0,
"interest": 0,
"interest_duration": 0,
},
{
"date_time": "2020-08-25T01:00:00Z",
"entrees": 171,
"sorties": 57,
"passage": 0,
"interest": 0,
"interest_duration": 0,
}
HTTP status code 400
Two errors can be encountered. Date start is greater than end date and period selected cannot be greater than 153 days (5 months)
Body
Media type: application/json
Type: any
Example:
{
"reason": "Start date cannot be greater than end date"
},
{
"reason": "Period chosen is too long"
}
HTTP status code 404
Body
Media type: application/json
Type: Can not resolve examples/measures/response404.raml