arazzo: 1.0.1
info:
title: Sysdig Create Policy and Verify
summary: Create a runtime security policy then read it back to confirm it persisted.
description: >-
A write-then-verify flow for Sysdig Secure runtime policies. It creates a
new policy from the supplied definition, captures the generated policy id,
and reads the policy back to confirm it persisted with the expected name and
enabled flag. Every step spells out its request inline so the flow can be
read and executed without opening the underlying OpenAPI description.
version: 1.0.0
x-realizes-capability-ids:
- BC-620
x-capability-derivation:
method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
min_confidence: 0.7
sources:
- capability_id: BC-620
capability_name: Cybersecurity Management
spec: sysdig-policies-api-openapi.yml
confidence: 0.75
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: policiesApi
url: ../openapi/sysdig-policies-api-openapi.yml
type: openapi
workflows:
- workflowId: create-policy-and-verify
summary: Create a runtime security policy and confirm it by id.
description: >-
Creates a policy with the supplied name, severity, type, and rule names,
then fetches it back by the returned id to verify persistence.
inputs:
type: object
required:
- bearerToken
- name
- type
properties:
bearerToken:
type: string
description: Sysdig API bearer token used for Authorization.
name:
type: string
description: Human-readable policy name.
description:
type: string
description: Optional policy description.
severity:
type: integer
description: Policy severity from 0 (highest) to 7.
default: 4
type:
type: string
description: Policy type (falco, list, awscloudtrail, or k8s_audit).
ruleNames:
type: array
description: Names of the rules attached to the policy.
items:
type: string
steps:
- stepId: createPolicy
description: Create the runtime security policy from the supplied definition.
operationId: createPolicy
parameters:
- name: Authorization
in: header
value: Bearer $inputs.bearerToken
requestBody:
contentType: application/json
payload:
policy:
name: $inputs.name
description: $inputs.description
severity: $inputs.severity
enabled: true
type: $inputs.type
ruleNames: $inputs.ruleNames
successCriteria:
- condition: $statusCode == 201
outputs:
policyId: $response.body#/policy/id
policyName: $response.body#/policy/name
- stepId: verifyPolicy
description: Read the policy back by id to confirm it persisted.
operationId: getPolicy
parameters:
- name: Authorization
in: header
value: Bearer $inputs.bearerToken
- name: policyId
in: path
value: $steps.createPolicy.outputs.policyId
successCriteria:
- condition: $statusCode == 200
- condition: $response.body#/policy/enabled == true
outputs:
policyId: $response.body#/policy/id
enabled: $response.body#/policy/enabled
outputs:
policyId: $steps.verifyPolicy.outputs.policyId
enabled: $steps.verifyPolicy.outputs.enabled
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.