Skip to content

Preview demo data CSV upload

POST
/api/v1/projects/{projectId}/demo-data/preview
curl --request POST \
--url https://localhost:10001/api/v1/projects/1/demo-data/preview \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: multipart/form-data' \
--form file=@file

Validates and previews an uploaded CSV before creating records (step 1 of 2)

projectId
required
integer

Project ID

file
required
file

CSV file

Preview of records to be created

Media type application/json
object
expiresAt
string
preview
object
declarations
Array<object>
object
actor
string
actorDID
string
controlCode
string
controlId
integer
controlTitle
string
projectPolicyId
integer
readyForReview
boolean
rowNumber
integer
statement
string
subjectLine
string
submittedBy
string
reviews
Array<object>
object
actor
string
actorDID
string
commentType
string
controlCode
string
controlId
integer
controlTitle
string
outcome
string
projectPolicyId
integer
rowNumber
integer
statement
string
subjectLine
string
submittedBy
string
sessionId
string
success
boolean
summary
object
declarationsToCreate
integer
errors
integer
reviewsToCreate
integer
totalRows
integer
validationErrors
Array<object>
object
column
string
message
string
row
integer
severity
string
warnings
integer
validationErrors
Array<object>
object
column
string
message
string
row
integer
severity
string
Example generated
{
"expiresAt": "example",
"preview": {
"declarations": [
{
"actor": "example",
"actorDID": "example",
"controlCode": "example",
"controlId": 1,
"controlTitle": "example",
"projectPolicyId": 1,
"readyForReview": true,
"rowNumber": 1,
"statement": "example",
"subjectLine": "example",
"submittedBy": "example"
}
],
"reviews": [
{
"actor": "example",
"actorDID": "example",
"commentType": "example",
"controlCode": "example",
"controlId": 1,
"controlTitle": "example",
"outcome": "example",
"projectPolicyId": 1,
"rowNumber": 1,
"statement": "example",
"subjectLine": "example",
"submittedBy": "example"
}
]
},
"sessionId": "example",
"success": true,
"summary": {
"declarationsToCreate": 1,
"errors": 1,
"reviewsToCreate": 1,
"totalRows": 1,
"validationErrors": [
{
"column": "example",
"message": "example",
"row": 1,
"severity": "example"
}
],
"warnings": 1
},
"validationErrors": [
{
"column": "example",
"message": "example",
"row": 1,
"severity": "example"
}
]
}

Bad request - Invalid project ID, missing file, or invalid CSV

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

Unauthorized - User context or auth token missing

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

Forbidden - Insufficient permissions for project

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

Payload too large - File size exceeds 10 MB

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