Skip to content

Convert policy Excel to JSON

POST
/api/v1/policies/convert
curl --request POST \
--url https://localhost:10001/api/v1/policies/convert \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: multipart/form-data' \
--form file=@file

Parses an uploaded Excel workbook and returns structured JSON policy data

file
required
file

Excel file (.xlsx or .xls)

Converted policy data

Media type application/json

A policy parsed from an uploaded workbook, shaped to post to the create-policy endpoint

object
controls
Array<object>
object
citations

Empty unless the workbook has a Citations 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"
}

Bad request - Invalid or malformed Excel file

Media type application/json

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

object
code
string
details
string
message
string
Example
{
"code": "INVALID_REQUEST",
"details": "unexpected end of JSON input",
"message": "Invalid request body"
}

Unauthorized - Authentication required

Media type application/json

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

object
code
string
details
string
message
string
Example
{
"code": "INVALID_REQUEST",
"details": "unexpected end of JSON input",
"message": "Invalid request body"
}

Forbidden - Insufficient permissions

Media type application/json

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

object
code
string
details
string
message
string
Example
{
"code": "INVALID_REQUEST",
"details": "unexpected end of JSON input",
"message": "Invalid request body"
}

Internal server error

Media type application/json

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

object
code
string
details
string
message
string
Example
{
"code": "INVALID_REQUEST",
"details": "unexpected end of JSON input",
"message": "Invalid request body"
}