Update Policy
PUT/code/api/v1/policies/:policyId
This endpoint has been deprecated and may be replaced or removed in future versions of the API.
Prisma Cloud Application Security supports policy-as-code capabilities using YAML-based policy definition files to enable attribute and connection checks (composite checks).
For information on defining YAML-based policies, see the Prisma Cloud documentation about the Code Editor and Custom Build Policy Examples. If you are upgraded to Darwin, see Code Editor and Custom Build Policy Examples.
To use the API request, add your token to the header. API supports both YAML and JSON configuration of Prisma Cloud Application Security custom policy schema.
This API request updates an existing Prisma Cloud Application Security custom policy. The API contains the fields to be edited. Any field not included in the request will remain unchanged.
You can use this API request to add fields that were previously not configured. The output will be the id of updated policy. Use the given examples as a reference for configuring the API request body.
:::info Use the CSPM endpoint Update Policy in place of this endpoint. :::
Request
Path Parameters
- the policy Id to update
- application/json
Body
required
object
Responses
- 200
- 202
- 400
- 422
- 500
Update a policy data
Response Headers
Access-Control-Allow-Headers string
Access-Control-Allow-Methods string
Access-Control-Allow-Origin string
- application/json
- Schema
- Example (from schema)
Schema
- ErrorMessage
- PolicyRes
{}
Operation Accepted
Response Headers
Access-Control-Allow-Headers string
Access-Control-Allow-Methods string
Access-Control-Allow-Origin string
Policy Validation Error
Request arguments validation error
Could not update policy