Create declaration on a control
POST
/api/v1/projects/{projectId}/policies/{projectPolicyId}/controls/{projectPolicyControlId}/declarations
const url = 'https://localhost:10001/api/v1/projects/example/policies/example/controls/example/declarations';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"attachmentCid":["example"],"cid":"example","createdAt":"example","extra":{"additionalProperty":"example"},"fileAttachments":[{"contentType":"example","declarationId":1,"description":"example","fileName":"example","id":1,"isPublic":true,"retentionExpires":"example","reviewId":1,"sizeBytes":1,"storagePath":"example","uploadedAt":"example","uploadedBy":"example"}],"id":1,"isAutomated":true,"isReadyForReview":true,"projectPolicyControlId":1,"statement":"example","subjectLine":"example","submittedAt":"example","submittedBy":"example","updatedAt":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://localhost:10001/api/v1/projects/example/policies/example/controls/example/declarations \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "attachmentCid": [ "example" ], "cid": "example", "createdAt": "example", "extra": { "additionalProperty": "example" }, "fileAttachments": [ { "contentType": "example", "declarationId": 1, "description": "example", "fileName": "example", "id": 1, "isPublic": true, "retentionExpires": "example", "reviewId": 1, "sizeBytes": 1, "storagePath": "example", "uploadedAt": "example", "uploadedBy": "example" } ], "id": 1, "isAutomated": true, "isReadyForReview": true, "projectPolicyControlId": 1, "statement": "example", "subjectLine": "example", "submittedAt": "example", "submittedBy": "example", "updatedAt": "example" }'Create a declaration for a specific control and return the persisted record
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” projectId
required
string
Project ID or UUID
projectPolicyId
required
string
Project Policy ID or slug:
projectPolicyControlId
required
string
Project Policy Control ID or code:
Request Body
Section titled “Request Body ”Declaration data
Media type application/json
object
attachmentCid
Array<string>
cid
string
createdAt
string
extra
object
key
additional properties
string
fileAttachments
Array<object>
object
contentType
string
declarationId
integer
description
string
fileName
string
id
integer
isPublic
boolean
retentionExpires
string
reviewId
integer
sizeBytes
integer
storagePath
string
uploadedAt
string
uploadedBy
string
id
integer
isAutomated
boolean
isReadyForReview
boolean
projectPolicyControlId
integer
statement
string
subjectLine
string
submittedAt
string
submittedBy
string
updatedAt
string
Example generated
{ "attachmentCid": [ "example" ], "cid": "example", "createdAt": "example", "extra": { "additionalProperty": "example" }, "fileAttachments": [ { "contentType": "example", "declarationId": 1, "description": "example", "fileName": "example", "id": 1, "isPublic": true, "retentionExpires": "example", "reviewId": 1, "sizeBytes": 1, "storagePath": "example", "uploadedAt": "example", "uploadedBy": "example" } ], "id": 1, "isAutomated": true, "isReadyForReview": true, "projectPolicyControlId": 1, "statement": "example", "subjectLine": "example", "submittedAt": "example", "submittedBy": "example", "updatedAt": "example"}Responses
Section titled “ Responses ”Created declaration
Media type application/json
object
attachmentCid
Array<string>
cid
string
createdAt
string
extra
object
key
additional properties
string
fileAttachments
Array<object>
object
contentType
string
declarationId
integer
description
string
fileName
string
id
integer
isPublic
boolean
retentionExpires
string
reviewId
integer
sizeBytes
integer
storagePath
string
uploadedAt
string
uploadedBy
string
id
integer
isAutomated
boolean
isReadyForReview
boolean
projectPolicyControlId
integer
statement
string
subjectLine
string
submittedAt
string
submittedBy
string
updatedAt
string
Example generated
{ "attachmentCid": [ "example" ], "cid": "example", "createdAt": "example", "extra": { "additionalProperty": "example" }, "fileAttachments": [ { "contentType": "example", "declarationId": 1, "description": "example", "fileName": "example", "id": 1, "isPublic": true, "retentionExpires": "example", "reviewId": 1, "sizeBytes": 1, "storagePath": "example", "uploadedAt": "example", "uploadedBy": "example" } ], "id": 1, "isAutomated": true, "isReadyForReview": true, "projectPolicyControlId": 1, "statement": "example", "subjectLine": "example", "submittedAt": "example", "submittedBy": "example", "updatedAt": "example"}Bad request - Invalid IDs or request body
Media type application/json
object
key
additional properties
string
Example generated
{ "additionalProperty": "example"}Unauthorized - Authentication required
Media type application/json
object
key
additional properties
string
Example generated
{ "additionalProperty": "example"}Forbidden - Insufficient permissions to create declarations
Media type application/json
object
key
additional properties
string
Example generated
{ "additionalProperty": "example"}Not found - Unknown or mismatched identifier
Media type application/json
object
key
additional properties
string
Example generated
{ "additionalProperty": "example"}Internal server error
Media type application/json
object
key
additional properties
string
Example generated
{ "additionalProperty": "example"}