API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola

Create timer

POST/v1/timers

Create a new timer in the active tenant.

Modelo de datos

Esta operación trabaja sobre la entidad Timer (timer). Los 12 campos (tipo, validación, obligatoriedad y relaciones) figuran en la referencia del esquema.

  • Campos obligatorios: userId, title, startedAt, accumulatedSeconds, isRunning
  • Gestionados por el servidor: _id, schema, schemaVersion, tenantId, version, createdAt, updatedAt, createdBy, updatedBy, deletedAt, deletedBy. La plataforma asigna estos campos; si se envían en la solicitud, se descartan.

Cuerpo de la solicitud

NombreTipoDescripción
ticketIdstring
projectIdstring
partyIdstring
taskIdstring
titleobligatoriostring
notesstring

Ejemplo

curl -X POST https://api.codemeta-os.de/v1/timers \
  -H "X-Tenant-Id: $TENANT" \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
  "ticketId": "string",
  "projectId": "string",
  "partyId": "string",
  "taskId": "string",
  "title": "string",
  "notes": "string"
}'
const result = await cm.timers.post({
  "ticketId": "string",
  "projectId": "string",
  "partyId": "string",
  "taskId": "string",
  "title": "string",
  "notes": "string"
});

Códigos de respuesta

HTTP Significado
201 Default Response

Búsqueda