Upload
kelvin-campelo
View
526
Download
2
Embed Size (px)
Citation preview
hackathoninthegra
API inthegra
INFORMAÇÕES DO MONITORAMENTO DA FROTA DE
ÔNIBUS DA CIDADE DE TERESINA
hackathoninthegra
API inthegrana prática: REST
Content-Type: application/json
Date: no formato "E, dd MMM yyyy HH:mm:ss 'GMT'"
X-Api-Key: com a correspondente chave de Acesso
X-Auth-Token: com o correspondente token de autorizarão (Apenas após a autenticação)
header:
hackathoninthegra
API inthegrana prática: /v[n]/signin LOGIN [POST]
body:"{"email": "[email protected]", "password": "dEfGh369"}"
headers:{Content-Type: "application/json", Accept-Language: "en", Date: "Wed, 13 Apr 2016 12:07:37 GMT", X-Api-Key:"AbdEfGh369K1"}
method:"POST"
url:"https://api.inthegra.strans.teresina.pi.gov.br/v1/signin"
hackathoninthegra
API inthegrana prática: /v[n]/signin LOGIN [POST]
{ "token": "87d19cf0-59f1-434b-9250-54b35902154c", "minutes": 10 }
retorno:
hackathoninthegra
API inthegrana prática:
/veiculosLinha?busca=0618 Posição dos veículos [GET]
Retorna a localização dos veículos que atualizaram a localização na última transmissão
de dados, atualização a cada trinta segundos.
[{ "Linha": { "CodigoLinha": "0618", "Denomicao": "HD-PROMORAR SHOPPING VIA MIGUEL ROSA", "Origem": "PROMORAR", "Retorno": "SHOPPING", "Circular": truet "Veiculos": [{ "CodigoVeiculo": 4663, "Lat": "-5.14842000", "Long": "-42.79380000", "Hora": "10:19" }, { "CodigoVeiculo": 4733, "Lat": "-5.08364000", "Long": "-42.78894000", "Hora": "10:19" }] } }]
retorno:
hackathoninthegra