Skip to content
English
  • There are no suggestions because the search field is empty.

Convert policy Excel to JSON

POST /api/v1/policies/convert Select code sample Fetch cURL
const url = 'https://localhost:10001/api/v1/policies/convert';const form = new FormData();form.append('file', 'file');
const options = {method: 'POST', headers: {Authorization: '
  
   '}}; options.body = form; try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}
  
curl --request POST \  --url https://localhost:10001/api/v1/policies/convert \  --header 'Authorization: 
  
   ' \ --header 'Content-Type: multipart/form-data' \ --form file=@file
  

Parses an uploaded Excel workbook and returns structured JSON policy data

Authorizations

Section titled “Authorizations ”

Parameters

Section titled “ Parameters ”

FormData Parameters

Section titled “FormData Parameters ” file required file

Excel file (.xlsx or .xls)

Responses

Section titled “ Responses ”

200

Section titled “200 ”

Converted policy data

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

400

Section titled “400 ”

Bad request - Invalid or malformed Excel file

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

401

Section titled “401 ”

Unauthorized - Authentication required

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

403

Section titled “403 ”

Forbidden - Insufficient permissions

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

500

Section titled “500 ”

Internal server error

Media type application/json object code string details string message string
Example
{  "code": "INVALID_REQUEST",  "details": "unexpected end of JSON input",  "message": "Invalid request body"}
Previous
Get policy
Next
Export policy JSON to Excel