Перейти к содержимому

POST /v3/templates

Create template (v3)

Create a new template

Тело запроса

Обязательно: да

application/json

Схема: TemplateBuildRequestV3

  • name · string · необязательно

    Name of the template. Can include a tag with colon separator (e.g. "my-template" or "my-template:v1"). If tag is included, it will be treated as if the tag was provided in the tags array.

    Максимальная длина: 128

  • tags · array<string> · необязательно

    Tags to assign to the template build

  • cpuCount · CPUCount · необязательно

    CPU cores for the sandbox

    Формат: int32

    Минимум: 1

  • memoryMB · MemoryMB · необязательно

    Memory for the sandbox in MiB

    Формат: int32

    Минимум: 128

Ответы

202

The build was requested successfully

Content-Type: application/json

Схема: TemplateRequestResponseV3

  • templateID · string · обязательно

    Identifier of the template

  • buildID · string · обязательно

    Identifier of the last successful build for given template

  • public · boolean · обязательно

    Whether the template is public or only accessible by the team

  • names · array<string> · обязательно

    Names of the template

  • tags · array<string> · обязательно

    Tags assigned to the template build

400

Bad request

Content-Type: application/json

Схема: Error

  • code · integer · обязательно

    Error code

    Формат: int32

  • message · string · обязательно

    Error

401

Authentication error

Content-Type: application/json

Схема: Error

  • code · integer · обязательно

    Error code

    Формат: int32

  • message · string · обязательно

    Error

403

Forbidden

Content-Type: application/json

Схема: Error

  • code · integer · обязательно

    Error code

    Формат: int32

  • message · string · обязательно

    Error

500

Server error

Content-Type: application/json

Схема: Error

  • code · integer · обязательно

    Error code

    Формат: int32

  • message · string · обязательно

    Error