API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console

Create timer

POST/v1/timers

Create a new timer in the active tenant.

Modèle de données

Cette opération porte sur l'entité Timer (timer). Les 12 champs (type, validation, caractère obligatoire, relations) figurent dans la référence du schéma.

  • Champs obligatoires : userId, title, startedAt, accumulatedSeconds, isRunning
  • Gérés par le serveur : _id, schema, schemaVersion, tenantId, version, createdAt, updatedAt, createdBy, updatedBy, deletedAt, deletedBy. La plateforme attribue ces champs ; ils sont ignorés dans la requête.

Corps de la requête

NomTypeDescription
ticketIdstring
projectIdstring
partyIdstring
taskIdstring
titleobligatoirestring
notesstring

Exemple

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"
});

Codes de réponse

HTTP Signification
201 Default Response

Recherche