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

Export policy JSON to Excel

POST /api/v1/policies/export Select code sample Fetch cURL
const url = 'https://localhost:10001/api/v1/policies/export';const options = {  method: 'POST',  headers: {Authorization: '
  
   ', 'Content-Type': 'application/json'}, body: '{"controls":[{"citations":[{"title":"example","url":"example"}],"controlCode":"example","createdAt":"example","description":"example","id":1,"policyId":1,"title":"example","updatedAt":"example"}],"createdAt":"example","description":"example","iconUrl":"example","id":1,"name":"example","organizationId":1,"slug":"example","type":"Risk Management","updatedAt":"example","version":"example"}'}; 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/export \  --header 'Authorization: 
  
   ' \ --header 'Content-Type: application/json' \ --data '{ "controls": [ { "citations": [ { "title": "example", "url": "example" } ], "controlCode": "example", "createdAt": "example", "description": "example", "id": 1, "policyId": 1, "title": "example", "updatedAt": "example" } ], "createdAt": "example", "description": "example", "iconUrl": "example", "id": 1, "name": "example", "organizationId": 1, "slug": "example", "type": "Risk Management", "updatedAt": "example", "version": "example" }'
  

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

Authorizations

Section titled “Authorizations ”

Request Body

Section titled “Request Body ”

Policy data

Media type application/json object controls

Controls within the policy, omitted but populated in list operations

Array object citations Array object title string url string controlCode string createdAt string description string id integer policyId integer title string updatedAt string createdAt string description string iconUrl string id integer name string organizationId integer slug string type

Risk Management, Internal, Regulatory, Custom

stringAllowed values: Risk Management Internal Regulatory Custom updatedAt string version string

Responses

Section titled “ Responses ”

200

Section titled “200 ”

Excel file

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

400

Section titled “400 ”

Bad request - Invalid policy JSON

Media type application/vnd.openxmlformats-officedocument.spreadsheetml.sheet object code string
Example
INVALID_REQUEST
details string
Example
unexpected end of JSON input
message string
Example
Invalid request body

401

Section titled “401 ”

Unauthorized - Authentication required

Media type application/vnd.openxmlformats-officedocument.spreadsheetml.sheet object code string
Example
INVALID_REQUEST
details string
Example
unexpected end of JSON input
message string
Example
Invalid request body

403

Section titled “403 ”

Forbidden - Insufficient permissions

Media type application/vnd.openxmlformats-officedocument.spreadsheetml.sheet object code string
Example
INVALID_REQUEST
details string
Example
unexpected end of JSON input
message string
Example
Invalid request body

500

Section titled “500 ”

Internal server error

Media type application/vnd.openxmlformats-officedocument.spreadsheetml.sheet object code string
Example
INVALID_REQUEST
details string
Example
unexpected end of JSON input
message string
Example
Invalid request body
Previous
Convert policy Excel to JSON
Next
List controls for a policy