Projects: Modules

🔒 Создание нового программного модуля в продукте.

Создание нового программного модуля в продукте.

Access: authorized (10 ) · Scope: write

Allows: product:structure (все обязательны; ресурс — productID)

TypeScript (copy-paste)

POST /projects/module/create

<details open><summary><b>Params</b></summary>
export interface ProjectsModuleCreateParams {
  skipCreateContent?: boolean | null
}
</details> <details open><summary><b>Body (Partial)</b></summary>
// Patch-body: все поля опциональны (Valid.Patch)
export type ProjectsModuleCreateBody = Partial<Module>

export interface ProjectsModuleCreateBodyFields {
  cID?: string
  projectID?: string
  productID?: string
  parentID?: string | null
  ID?: string
  /** Unix timestamp in milliseconds */
  ord?: number
  title?: string
  desc?: string
  components?: Record<string, any>
  ver?: number
  designID?: string | null
  path?: {
  key: string
  title: string
} | null
  isDeleted?: boolean | null
  /** Unix timestamp in milliseconds */
  deletedTS?: number | null
  /** Unix timestamp in milliseconds */
  updTS?: number
  updUID?: string
}
</details> <details open><summary><b>Response</b></summary>
export type ProjectsModuleCreateResponse = IServerResponse<Module>

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

Полный файл типов: /docs/types · raw: /docs/api-types.ts

post/projects/module/create

Request

  • Base URL: http://localhost
  • URL: http://localhost/projects/module/create
  • Auth: one of:
    • API key in header sid and API key in header rts and API key in header sig
    • HTTP bearer

Query parameters

skipCreateContentboolean nullable

Можно передать header skipCreateContent (сервер мержит headers+query)

Headers

devIDstring uuid required

UUID устройства клиента

tzstring required
Example:Europe/Moscow

Таймзона клиента (IANA или offset)

appstring required
Example:kosmodrom-web

Имя клиентского приложения

appVerstring required
Example:1.0.0

Версия клиента

rKeystring

Уникальный ключ запроса для логов/саппорта

Request body

cIDstring uuid
projectIDstring uuid
productIDstring uuid
parentIDstring uuid nullable
IDstring uuid
ordinteger

Unix timestamp in milliseconds

titlestring
descstring
componentsobject
verinteger
designIDstring uuid nullable
isDeletedboolean nullable
deletedTSinteger nullable

Unix timestamp in milliseconds

updTSinteger

Unix timestamp in milliseconds

updUIDstring

Response

OK — IServerResponse<Module>

codeinteger required
srvTSinteger required

Server timestamp (ms)

rkeystring required

Request key

Example response

{
  "code": 200
}

Changes

No recorded changes to this operation across all 1 revision of this API.