Skip to content

Export policy JSON to Excel

POST
/api/v1/policies/export
curl --request POST \
--url https://localhost:10001/api/v1/policies/export \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "controls": [ { "citations": [ { "title": "example", "url": "example" } ], "controlCode": "example", "description": "example", "title": "example" } ], "description": "example", "iconUrl": "example", "name": "example", "type": "example", "version": "example" }'

Accepts structured policy JSON and returns a downloadable Excel (.xlsx) workbook

Policy data

Media type application/json
object
controls

Rendered into the Controls sheet

Array<object>
object
citations

Title/URL pairs in the sheet

Array<object>
object
title
string
url
string
controlCode
string
description
string
title
string
description
string
iconUrl
string
name
string
type
string
version
string
Example generated
{
"controls": [
{
"citations": [
{
"title": "example",
"url": "example"
}
],
"controlCode": "example",
"description": "example",
"title": "example"
}
],
"description": "example",
"iconUrl": "example",
"name": "example",
"type": "example",
"version": "example"
}

Excel file

Media type application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
file

Bad request - Invalid policy JSON

Media type application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Error body for the policy conversion, policy export, and event ingestion endpoints, carrying a machine-readable code

object
code
string
Example
INVALID_REQUEST
details
string
Example
unexpected end of JSON input
message
string
Example
Invalid request body

Unauthorized - Authentication required

Media type application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Error body for the policy conversion, policy export, and event ingestion endpoints, carrying a machine-readable code

object
code
string
Example
INVALID_REQUEST
details
string
Example
unexpected end of JSON input
message
string
Example
Invalid request body

Forbidden - Insufficient permissions

Media type application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Error body for the policy conversion, policy export, and event ingestion endpoints, carrying a machine-readable code

object
code
string
Example
INVALID_REQUEST
details
string
Example
unexpected end of JSON input
message
string
Example
Invalid request body

Internal server error

Media type application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Error body for the policy conversion, policy export, and event ingestion endpoints, carrying a machine-readable code

object
code
string
Example
INVALID_REQUEST
details
string
Example
unexpected end of JSON input
message
string
Example
Invalid request body