Create and Restore Backups

The examples in this section are not meant to be used without modification. Please modify the examples to match the requirements of your site before using them.

Retrieve the Organization Declarative Layout

The following example returns all the entities associated with the organization that is specified in the hostname of the call and stores the output in a JSON file named organization-layout.json:

curl -H "Authorization: Bearer $API_TOKEN" \
  -X GET \
  $HOST_URL/api/v1/layout/organization > organization-layout.json

Restore or Modify the Organization Declarative Layout

The following example uses the previously retrieved declarative layout from a call to the /api/v1/layout/organization endpoint to restore the organization to the state defined within the file:

curl -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -X PUT \
  $HOST_URL/api/v1/layout/organization -d @organization-layout.json