---
title: "🔒 Обновление записей ворклогов (времени и заметок) пользователя."
method: POST
path: "/worklogs/update"
tags: ["Worklogs"]
---

# 🔒 Обновление записей ворклогов (времени и заметок) пользователя.

`POST /worklogs/update`

## Request

- Base URL: `http://localhost`
- URL: `http://localhost/worklogs/update`
- Auth: one of:
  - API key in header `sid` and API key in header `rts` and API key in header `sig`
  - HTTP bearer

Обновление записей ворклогов (времени и заметок) пользователя.

**Access:** `authorized` (10 ) · **Scope:** `write`

**Allows:** `worklog:update` (все обязательны; проверка в команде по ресурсу из запроса)

### TypeScript (copy-paste)

**`POST /worklogs/update`**

<details open><summary><b>Params</b></summary>

```typescript
export interface WorklogsUpdateParams {
  userID?: string
}
```

</details>

<details open><summary><b>Body (Partial)</b></summary>

```typescript
// Patch-body: все поля опциональны (Valid.Patch)
export type WorklogsUpdateBody = Partial<Resp_worklogs_update>

export interface WorklogsUpdateBodyFields {
  select?: {
  entityID?: string | null
  entityType?: SystemEntityType | null
  worklogID?: string | null
  startDk?: number | null
  endDk?: number | null
  roleType?: UserRole_Type | null
}
  update?: {
  time?: number | null
  note?: string | null
}
}
```

</details>

<details open><summary><b>Response</b></summary>

```typescript
export type WorklogsUpdateResponse = IServerResponse<Resp_worklogs_update>

export interface IServerResponse<T = any> {
  code: number
  data: T
  srvTS: number
  rkey: string
}
```

</details>

> Полный файл типов: [`/docs/types`](/docs/types) · raw: [`/docs/api-types.ts`](/docs/api-types.ts)

## Query parameters

- `userID` string, uuid

## Headers

- `devID` string, uuid, required
- `tz` string, required
- `app` string, required
- `appVer` string, required
- `rKey` string

## Request body

- WorklogsUpdateBody: Partial body (Valid.Patch) for `worklogs/update` — все поля опциональны
  - `select` object
    - `entityID` string, uuid, nullable
    - `entityType` 'project' | 'product' | 'module' | 'component' | 'version' | 'feature' | 'task' | 'bug' | 'meeting': `project` = "project", `product` = "product", `module` = "module", `component` = "component", `version` = "version", `feature` = "feature", `task` = "task", `bug` = "bug", `meeting` = "meeting"
    - `worklogID` string, uuid, nullable
    - `startDk` integer, nullable: Day key (YYYYMMDD or internal day index)
    - `endDk` integer, nullable: Day key (YYYYMMDD or internal day index)
    - `roleType` 10 | 20 | 30 | 40 | 50 | 60 | 70: `management` = 10, `analytics` = 20, `marketing` = 30, `design` = 40, `development` = 50, `qa` = 60, `support` = 70
  - `update` object
    - `time` integer, nullable
    - `note` string, nullable

## Response `200`

OK — `IServerResponse<Resp_worklogs_update>`

- object
  - `code` integer, required
  - `data` RespWorklogsUpdate, required: Empty response object
  - `srvTS` integer, required: Server timestamp (ms)
  - `rkey` string, required: Request key

## Other responses

- `400`: BadRequest: No update data provided, invalid time value, or missing worklogID for time update
- `401`: Unauthorized: Active user session required
- `403`: AccessNotAllowed: Privilege worklog:update required (own worklogs - common)
- `404`: NotFound: Target user or worklogs matching selection criteria not found
- `406`: TimeResync — расхождение rts с сервером

---

[API](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api.md) · [All operations](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kosmodrom/apis/kosmodrom-backend-api/revisions/a143b51ba29a?raw)
