Skip to content

Confirm and create demo data

POST
/api/v1/projects/{projectId}/demo-data/confirm
curl --request POST \
--url https://localhost:10001/api/v1/projects/1/demo-data/confirm \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "sessionId": "example" }'

Confirms a previewed session and creates all records from the uploaded CSV (step 2 of 2)

projectId
required
integer

Project ID

Session ID

Media type application/json
object
sessionId
string
Example generated
{
"sessionId": "example"
}

Result of created records

Media type application/json
object
details
object
processingTime
string
uploadId
string
uploadedAt
string
uploadedBy
string
success
boolean
summary
object
declarationsCreated
integer
errors
integer
processingTime
string
reviewsCreated
integer
totalRows
integer
validationErrors
Array<object>
object
column
string
message
string
row
integer
severity
string
warnings
integer
uploadId
string
Example generated
{
"details": {
"processingTime": "example",
"uploadId": "example",
"uploadedAt": "example",
"uploadedBy": "example"
},
"success": true,
"summary": {
"declarationsCreated": 1,
"errors": 1,
"processingTime": "example",
"reviewsCreated": 1,
"totalRows": 1,
"validationErrors": [
{
"column": "example",
"message": "example",
"row": 1,
"severity": "example"
}
],
"warnings": 1
},
"uploadId": "example"
}

Bad request - Invalid project ID, body, or expired session

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

Internal server error

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