# Trying query to cloud

**URL:** <https://community.anviz.com/t/trying-query-to-cloud/2046>\
**Category:** Development Tools\
**Created:** [October 9, 2024, 1:31pm UTC](https://community.anviz.com/t/trying-query-to-cloud/2046 "2024-10-09T13:31:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![it1](https://avatars.discourse-cdn.com/v4/letter/i/9de0a6/32.png) [@it1](https://community.anviz.com/u/it1)\
**Post date:** [October 9, 2024, 1:31pm UTC](https://community.anviz.com/t/trying-query-to-cloud/2046/1 "2024-10-09T13:31:10Z")

</div>

Good morning, I’m trying a query to cloud but I receive the nex response  
Respuesta exitosa: {‘header’: {‘nameSpace’: ‘System’, ‘name’: ‘Exception’}, ‘payload’: {‘type’: ‘MISS\_PARAM’, ‘message’: ‘MISS\_PARAM’}}

Here is my python code

import requests  
from datetime import datetime

# URL del endpoint para obtener los registros de asistencia

url = “[https://api.us.crosschexcloud.com/](https://api.us.crosschexcloud.com/)”

# Generar la marca de tiempo actual en formato ISO 8601 (UTC)

timestamp = datetime.now().isoformat() + “+00:00”

# Headers de la petición

headers = {  
“nameSpace”: “attendance.record”, # Valor fijo  
“nameAction”: “getrecord”, # Valor fijo  
“version”: “1.0”, # Valor fijo  
“requestId”: “REQUESTID\_HERE”, # ID único de la solicitud  
“timestamp”: ‘2022-10-21T07:39:07+00:00’  
}

# Autorización (token)

authorize = {  
“type”: “token”, # Valor fijo  
“token”: “Bearer TOKEN\_HERE” # Token JWT (recortado)  
}

# Payload (datos de la petición)

payload = {  
“begin\_time”: “2022-06-01T12:46:43+00:00”, # Hora de inicio para obtener registros  
“end\_time”: “2022-10-24T12:46:43+00:00”, # Hora de fin para obtener registros  
“order”: “asc”, # Orden ascendente  
“page”: 1, # Página 1  
“per\_page”: 100 # Máximo de 100 registros por página  
}

# Combinar headers y autorización

headers.update({  
“Authorization”: f"Bearer {authorize[‘token’]}" # Autorización con token JWT  
})

# Hacer la solicitud POST

response = requests.post(url, headers=headers, json=payload)

# Verificar la respuesta

if response.status\_code == 200:  
# La petición fue exitosa, mostrar el resultado  
data = response.json()  
print(“Respuesta exitosa:”, data)  
else:  
# La petición falló, mostrar el error  
print(f"Error {response.status\_code}: {response.text}")

Can you help me?

---

<div class="post-metadata">

**Author:** ![Technical\_Anviz](https://sea2.discourse-cdn.com/flex020/user_avatar/community.anviz.com/technical_anviz/32/1143_2.png) [@Technical\_Anviz](https://community.anviz.com/u/Technical_Anviz)\
**Post date:** [October 14, 2024, 5:41am UTC](https://community.anviz.com/t/trying-query-to-cloud/2046/2 "2024-10-14T05:41:18Z")

</div>

Hello,

We’re not sure about the issue you have met.

I have attached a sample demo for your reference below.

> **[Google Drive: Sign-in](https://accounts.google.com/v3/signin/identifier?continue=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1ph76dC8t_Uh1aRlJJ3An6YBNP41HbIZW%2Fview%3Fusp%3Ddrive_link&followup=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1ph76dC8t_Uh1aRlJJ3An6YBNP41HbIZW%2Fview%3Fusp%3Ddrive_link&ifkv=ARpgrqdK3c9gYGanTJvCRNh4HCNRwmnPFviPuD-SnlJ-rDi5YGEydZuik05nrD2FDQkdeP8rEMyrGA&osid=1&passive=1209600&service=wise&flowName=GlifWebSignIn&flowEntry=ServiceLogin&dsh=S-432804348%3A1728884449795967&ddm=0)**
>
> Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).

You can check it with Postman and see how to query via the cloud API.

---

<div class="post-metadata">

**Author:** ![it1](https://avatars.discourse-cdn.com/v4/letter/i/9de0a6/32.png) [@it1](https://community.anviz.com/u/it1)\
**Post date:** [October 14, 2024, 10:21am UTC](https://community.anviz.com/t/trying-query-to-cloud/2046/3 "2024-10-14T10:21:48Z")

</div>

Good morning Sarah, I haven’t access to the file, my email is in Microsoft 365 and with this email I don’t have access to the file, could you send me the example by email? Thanks

---

<div class="post-metadata">

**Author:** ![Technical\_Anviz](https://sea2.discourse-cdn.com/flex020/user_avatar/community.anviz.com/technical_anviz/32/1143_2.png) [@Technical\_Anviz](https://community.anviz.com/u/Technical_Anviz)\
**Post date:** [November 4, 2024, 5:25am UTC](https://community.anviz.com/t/trying-query-to-cloud/2046/4 "2024-11-04T05:25:55Z")

</div>

Hello, friend

Sure, we’ll be happy to send the example to your email. But I don’t believe you have left any information about your e-mail address.

You can also send your email address to our support team at [support@anviz.com](mailto:support@anviz.com)

Zac.
