The REST request is structured as follows:
{host_url}/cnr/api/indicator/json/{id_indicateur}/{date_debut}/{date_fin}/{cle_api}
- (1) Static part
- host_url : fixed part of the request relating to our website
- cnr/api/indicator/json : fixed part of the service request
- (2) Dynamic part
- (3) id_indicateur : indicator ID
- (4) date_debut : start date of the period in aaaamm format
- (5) date_fin : end date of the period in aaaamm format
- (6) cle_api : API access key which will be provided upon request
Json Example
The request http://www.cnr.fr/cnr/api/indicator/json/83/201301/201401/hbKm.......c6uE5fnv query the "INSEE services index" dataset with the following filters
- Indicator ID: 83
- Start date: 201301
- End date: 201401
- Api key (example): hbKm.......c6uE5fnv
and returns
{"data":{"name":"Indice INSEE des services","datas":[{"v":"97.05000","d":"01-2013"},{"v":"96.86000","d":"02-2013"},{"v":"97.17000","d":"03-2013"} ,{"v":"96.99000","d":"04-2013"},{"v":"97.34000","d":"05-2013"},{"v":"97.42000","d":"06-2013"},{"v":"97.66000","d":"07-2013"},{"v":"97.87000","d":"08-2013"}, {"v":"98.00000","d":"09-2013"},{"v":"98.06000","d":"10-2013"},{"v":"98.12000","d":"11-2013"}, {"v":"98.16000","d":"12-2013"},{"v":"98.22000","d":"01-2014"}]},"method":"GET"}