Get Last Devices by dni
Endpoint que retorna el último dispositivo asociado a un usuario, para hacer uso de este es necesario ingresar la dni del usuario.
Endpoint
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
Authorization | Bearer {{access_token}} | access_token obtained in Atenea |
Endpoint:
Method: GET
URL: https://api.trust.lat/identification/api/v1/identity/:dni/lastdevice
caution
Recuerda que para utilizar este endpoint es necesario un access token obtenido en el servicio Atenea
Code Examples
- Curl
- JavaScript
- Python
curl --location --request GET 'https://api.trust.lat/identification/api/v1/identity/:dni/lastdevice' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{accessToken}}'
import requests
url = "https://api.trust.lat/identification/api/v1/identity/:dni/lastdevice"
payload={}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {{accessToken}}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var axios = require('axios');
var config = {
method: 'get',
url: 'https://api.trust.lat/identification/api/v1/identity/:dni/lastdevice',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer {{accessToken}}'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Responses
HTTP Code: 201 Created
{
"status": true,
"dni": "18300594-4",
"device": {
"id": 43,
"trust_id": "zea0b5-5049-44d6-ad75-974c807e7f",
"characteristics": {
"id": "PPR1.180610.011",
"nfc": "YES",
"UUID": "12d801-2117-4f27-8992-26b121dcbcd1",
"host": "21HH1E05",
"imei": "356810090575046",
"root": "No Rooted",
"board": "universal9810",
"brand": "samsung",
"model": "SM-G965F",
"device": "star2lte",
"serial": "21b4b514b60c7ece",
"battery": "Presente ",
"cameras": [],
"display": "PPR1.180610.011.G965FXU2CRLI",
"product": "star2ltexx",
"cpu_part": "0x002",
"hardware": "samsungexynos9810",
"mem_total": "5760432 kB",
"wlan0_mac": "24:18:1D:F9:D7:5D",
"sensorData": [],
"swap_total": "2097148 kB",
"wifi_state": true,
"cpu_variant": "0x1",
"fingerprint": "samsung/star2ltexx/star2lte:9/PPR1.180610.011/G965FXXU2CRLI:user/release-keys",
"red_g_state": true,
"sensor_size": "40",
"system_name": "Android",
"cameras_size": "2",
"cpu_revision": "0",
"manufacturer": "samsung",
"bluetooth_mac": "02:00:00:00:00:00",
"system_version": "28",
"bluetooth_state": true,
"cpu_implementer": "0x53",
"battery_capacity": "3500 mAh",
"cpu_architecture": "8",
"software_version": "01",
"android_device_id": "004935774efa1747",
"battery_technology": "Li-ion",
"processor_bogomips": "52.00",
"processor_features": "fp asimd evtstrm aes pmull sha1 sha2 crc32 fphp asimdhp",
"processor_quantity": "8",
"google_service_framework_gsf": "3E556538D3BD5F5C"
},
"created_at": "2019-04-01T21:25:53.021Z",
"updated_at": "2019-04-01T21:25:53.021Z",
"status": true,
"trust_id_type": "classic_trust_id"
}
}
HTTP Code: 204 Not Content
Cuando el endpoint no encuentre resultados enviará un código 204 indicando que no hubo éxito en la búsqueda.