Convert policy Excel to JSON
POST
/api/v1/policies/convert
const url = 'https://localhost:10001/api/v1/policies/convert';const form = new FormData();form.append('file', 'file');
const options = {method: 'POST', headers: {Authorization: '<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: <Authorization>' \ --header 'Content-Type: multipart/form-data' \ --form file=@fileParses 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 ”Converted policy data
Media type application/json
object
key
additional properties
any
Example generated
{}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"}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"}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"}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"}