Policies
Create a new policy.
Authorization
Authorization AuthorizationBearer <token>
In: header
Request Body
application/json
title*string
Length
2 <= length <= 255slug*string
Match
^[a-z0-9-]+$Length
1 <= lengthcategoryId*string
organizationId*string
approverId*string
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://app.devguard.ch/api/policies/" \ -H "Content-Type: application/json" \ -d '{ "title": "string", "slug": "string", "categoryId": "string", "organizationId": "string", "approverId": "string" }'{
"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": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}How is this guide?