Zum Hauptinhalt springen

Entwurf eines entfernten Scanner-Pools erstellen

POST /api/v1/remote-scanner-pools

Eine requestId ist für denselben Administrator und exakt dieselbe Richtlinie idempotent. Nur literale IP-/CIDR-Bereiche; Ausschlüsse haben Vorrang. Der Genehmigungsablauf muss im nächsten Jahr liegen. Das Erstellen eines Pools aktiviert keine Agents und plant keine Arbeit.

Zulässige Rollen: admin.

Authentifizierung​

Die folgenden OpenAPI-Alternativen beschreiben die akzeptierte Authentifizierung. Änderungen über den Browser erfordern außerdem den kanonischen Origin-Header.

[
{
"organizationCredential": []
},
{
"browserSession": []
}
]

Parameter​

[]

Anfrageinhalt​

{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"requestId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"policy": {
"type": "object",
"properties": {
"sshHostKeyInventory": {
"type": "boolean"
},
"sshHostCertificateInventory": {
"type": "boolean"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"zoneId": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"
},
"allow": {
"maxItems": 256,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 70
}
},
"exclude": {
"maxItems": 256,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 70
}
},
"services": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"protocol": {
"type": "string",
"enum": [
"tls",
"ssh",
"quic"
]
},
"port": {
"type": "integer",
"minimum": 1,
"maximum": 65535
}
},
"required": [
"protocol",
"port"
],
"additionalProperties": false
}
},
"limits": {
"type": "object",
"properties": {
"maximumTargets": {
"default": 256,
"type": "integer",
"minimum": 1,
"maximum": 4096
},
"concurrency": {
"default": 1,
"type": "integer",
"minimum": 1,
"maximum": 8
},
"minimumIntervalMs": {
"default": 1000,
"type": "integer",
"minimum": 100,
"maximum": 60000
}
},
"additionalProperties": false
},
"expiresAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"securityContact": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"changeReference": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"name",
"zoneId",
"allow",
"services",
"limits",
"expiresAt",
"securityContact",
"changeReference"
],
"additionalProperties": false
}
},
"required": [
"requestId",
"policy"
],
"additionalProperties": false
}
}
}
}

Antworten​

{
"201": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RemoteScannerPool"
}
}
}
},
"400": {
"description": "Validation error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Missing/expired/revoked credential",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Insufficient role",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "State or idempotency conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"413": {
"description": "Body too large",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"415": {
"description": "Unsupported media type",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Request budget exhausted; respect Retry-After",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"Retry-After": {
"schema": {
"type": "integer",
"minimum": 1
},
"description": "Seconds until sufficient budget is expected; concurrent traffic may consume replenished capacity."
}
}
},
"500": {
"description": "Internal error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"503": {
"description": "Not configured",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}

Referenzen wie #/components/schemas/Asset werden in den gemeinsamen Schemas aufgelöst. Lade den OpenAPI-Vertrag zur Clientgenerierung herunter. Diese Seite wird generiert; sie beschreibt die implementierte Entwicklungs-API, keine geplanten Endpunkte.