ChatGPT · GPT ActionsDatos
Consultar lectura de sensor
Trae un registro de lecturas de sensor por su ID.
por Prompt Studio
openapisensor-readings
Licencia: MITVer original
Contenido
Dónde va: GPT → Configurar → Acciones → Esquema
{
"openapi": "3.1.0",
"info": {
"title": "Consultar lectura de sensor",
"version": "1.0.0",
"description": "Acción de GPT para lecturas de sensor. Cambia el servidor por la URL de tu API."
},
"servers": [
{
"url": "https://api.tu-dominio.com/v1"
}
],
"paths": {
"/sensor-readings/{id}": {
"get": {
"operationId": "getSensorReading",
"summary": "Obtiene lectura de sensor por ID",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Detalle",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SensorReading"
}
}
}
},
"404": {
"description": "No encontrado"
}
}
}
}
},
"components": {
"schemas": {
"SensorReading": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"sensorId": {
"type": "string"
},
"value": {
"type": "number"
},
"unit": {
"type": "string"
},
"readAt": {
"type": "string",
"format": "date-time"
},
"status": {
"type": "string",
"enum": [
"válida",
"atípica"
]
},
"createdAt": {
"type": "string",
"format": "date-time"
}
}
}
},
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
}
},
"security": [
{
"bearerAuth": []
}
]
}
Más en GPT Actions
Clima por ciudad
Ejemplo mínimo de Action con API key en el encabezado.
Crear lead en el CRM
Registra contactos desde la conversación con autenticación OAuth.
Agendar reunión
Crea eventos con invitados y zona horaria.
Enviar a webhook
Publica el resultado del GPT en cualquier URL (Zapier, Make, n8n).
Buscar contactos
Busca contactos por texto y estado desde tu GPT.
Consultar contacto
Trae un registro de contactos por su ID.