跳转到主要内容
POST
Create project

请求头

X-Workspace-Id
string

Workspace ID

请求体

application/json
name
string
必填

Name of the project

示例:

"Web Servers"

hexColor
string

Hex color of the project

示例:

"#78716C"

description
string

What the project covers

hostIds
string[]

Asset (host) IDs picked by hand

scopeRules
object[]

Scope rules; matching assets join the project

autoAddAssets
boolean
默认值:true

Add assets found later when they match a rule

template
string

Workflow template (file name of a default workflow) for the pipeline. Ignored when tools are given.

示例:

"vulnerability_scan_basic.yaml"

tools
object[]

Tools of the pipeline, with optional stages

workflowName
string

Name of the pipeline

on
object

When the pipeline runs on its own: schedules and "assets added". Requires a pipeline. Replaces schedule and onAssetsAdded.

schedule
string

Deprecated, use on.schedule. Cron schedule (UTC) of the pipeline, e.g. "0 2 * * 1". Requires a pipeline.

示例:

"0 0 */3 * *"

onAssetsAdded
object

Deprecated, use on.assetsAdded. Run the pipeline on assets as they join the project. Requires a pipeline.

runNow
boolean

Start a run on the whole scope right after creation

响应

200 - application/json
id
string
必填
createdAt
string<date-time>
必填
updatedAt
string<date-time>
必填
name
string
必填
autoAddAssets
boolean
必填
totalAssets
number
必填
hexColor
string
示例:

"#78716C"

description
string | null
archivedAt
string<date-time> | null
projectWorkflows
object[]
lastRunAt
string<date-time> | null