devguard

PoliciesId

Update a policy by id.

PATCH
/policies/{id}/

Authorization

Authorization
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

title?string
Length2 <= length <= 255
slug?string
Match^[a-z0-9-]+$
Length1 <= length
order?integer
Range-9007199254740991 <= value <= 9007199254740991
organizationId?string
approverId?string
content?unknown
currentVersion?|
lastApprovedAt?|
lastApprovedBy?|
createdAt?string
updatedAt?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://app.devguard.ch/api/policies/string/" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "string",
  "title": "string",
  "slug": "string",
  "order": -9007199254740991,
  "categoryId": "string",
  "organizationId": "string",
  "approverId": "string",
  "status": "DRAFT",
  "content": null,
  "currentVersion": "string",
  "lastApprovedAt": "string",
  "lastApprovedBy": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

How is this guide?