Skip to content

Create declaration on a control

POST
/api/v1/projects/{projectId}/policies/{projectPolicyId}/controls/{projectPolicyControlId}/declarations
curl --request POST \
--url https://localhost:10001/api/v1/projects/1/policies/1/controls/1/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

projectId
required
integer

Project ID

projectPolicyId
required
integer

Project Policy ID

projectPolicyControlId
required
integer

Project Policy Control ID

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"
}

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"
}

Internal server error

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}