Create a repository scan-policy version
PUT
/v1/security/repositories/{repositoryId}/policyHow to call this endpoint
Every ACP API request uses bearer authentication. The examples here show the actual request path, auth header, and body shape that the platform expects.
Path, query, and header parameters
These parameters control which ACP object the endpoint acts on and how the request is processed.
Path parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| repositoryId | path | string | Yes | Monitored security repository ID |
Query parameters
None.
Header parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| X-Computer-Agents-Organization | header | string | No | Active organization context. If omitted, the authenticated user's personal organization is used. |
Body schema
Content type: application/json · Required
| Field | Type | Required | Description |
|---|---|---|---|
| value | object | Yes | — |
| value.schemaVersion | 1 | Yes | — |
| value.defaultBranch | string | Yes | — |
| value.scanMode | full | incremental | Yes | — |
| value.schedule | object | Yes | — |
| value.schedule.enabled | boolean | Yes | — |
| value.schedule.cron | string | Yes | — |
| value.schedule.timezone | string | Yes | — |
| value.pullRequests | object | Yes | — |
| value.pullRequests.enabled | boolean | Yes | — |
| value.pullRequests.branches | string[] | Yes | — |
| value.pullRequests.pathIncludes | string[] | Yes | — |
| value.pullRequests.pathExcludes | string[] | Yes | — |
| value.pullRequests.scanForksReadOnly | true | Yes | — |
| value.push | object | Yes | — |
| value.push.enabled | boolean | Yes | — |
| value.push.branches | string[] | Yes | — |
| value.scanners | string[] | Yes | — |
| value.remediation | object | Yes | — |
| value.remediation.mode | disabled | approval_required | Yes | — |
| value.remediation.minimumSeverity | critical | high | medium | low | informational | Yes | — |
| value.remediation.draftPullRequestsOnly | true | Yes | — |
| value.remediation.allowWorkflowChanges | false | Yes | — |
| value.remediation.maximumChangedFiles | integer | Yes | — |
| value.remediation.maximumPatchBytes | integer | Yes | — |
| changeSummary | string | No | — |
What the API returns
Each response code below includes the documented payload shape for the ACP API.
200New immutable policy versionapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Unique identifier. |
| version | integer | Yes | — |
| value | object | Yes | — |
| value.schemaVersion | 1 | Yes | — |
| value.defaultBranch | string | Yes | — |
| value.scanMode | full | incremental | Yes | — |
| value.schedule | object | Yes | — |
| value.schedule.enabled | boolean | Yes | — |
| value.schedule.cron | string | Yes | — |
| value.schedule.timezone | string | Yes | — |
| value.pullRequests | object | Yes | — |
| value.pullRequests.enabled | boolean | Yes | — |
| value.pullRequests.branches | string[] | Yes | — |
| value.pullRequests.pathIncludes | string[] | Yes | — |
| value.pullRequests.pathExcludes | string[] | Yes | — |
| value.pullRequests.scanForksReadOnly | true | Yes | — |
| value.push | object | Yes | — |
| value.push.enabled | boolean | Yes | — |
| value.push.branches | string[] | Yes | — |
| value.scanners | string[] | Yes | — |
| value.remediation | object | Yes | — |
| value.remediation.mode | disabled | approval_required | Yes | — |
| value.remediation.minimumSeverity | critical | high | medium | low | informational | Yes | — |
| value.remediation.draftPullRequestsOnly | true | Yes | — |
| value.remediation.allowWorkflowChanges | false | Yes | — |
| value.remediation.maximumChangedFiles | integer | Yes | — |
| value.remediation.maximumPatchBytes | integer | Yes | — |
| changeSummary | string | Yes | — |
| createdAt | string | Yes | ISO 8601 timestamp. |
404Resource not foundapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| error | string | No | — |
Create a repository scan-policy version
Loading...
Response 200
Loading...