Skip to content

Create declaration with attachment

POST
/api/v1/projects/{projectId}/policies/{projectPolicyId}/controls/{projectPolicyControlId}/declarations/with-file
curl --request POST \
--url https://localhost:10001/api/v1/projects/1/policies/1/controls/1/declarations/with-file \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: multipart/form-data' \
--form declaration=example

Create a declaration on a control with file attachment(s) and return the declaration with stored attachments

projectId
required
integer

Project ID

projectPolicyId
required
integer

Project Policy ID

projectPolicyControlId
required
integer

Project Policy Control ID

declaration
required
string

Declaration JSON string

files
file

Attachment files

description
string

Attachment description

isPublic
string

Whether the file is public

retentionPeriod
string

Retention policy

Created declaration with attachments

Media type application/json
object
key
additional properties
any
Example generated
{}

Bad request - Invalid IDs or declaration data

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