Enterprise Policy

APIs to Esper Compliance Policy

List all policies in enterprise

Returns Policies list

SecurityapiKey
Request
path Parameters
enterprise_id
required
string <uuid>

ID of the enterprise

query Parameters
name
string

filter by policy name

is_active
boolean

filter by Active policies

limit
integer
Default: 20

Number of results to return per page.

offset
integer
Default: 0

Return results from this index.

Responses
200

successful operation

401

Authorization information is missing or invalid.

404

Not Found.

500

Internal server error

get/enterprise/{enterprise_id}/policy/
Request samples
Response samples
application/json
{
  • "count": 0,
  • "next": "string",
  • "previous": "string",
  • "results": [
    ]
}

Create a new Enterprise Policy

API to create a new Enterprise Policy

SecurityapiKey
Request
path Parameters
enterprise_id
required
string <uuid>

ID of the enterprise

Request Body schema: */*
required

The request body to create an Enteprise Policy

enterprise
required
string <url> (Enterprise url)

Url of the enterprise resource

name
required
string (Policy Name)

Name of the Policy

description
string (Policy Description)

Details regarding the Policy

required
object (Policy Data)
is_active
boolean (Policy Active status)

Is this policy currently active

Responses
201

command request successfully created

400

Bad request

401

Authorization information is missing or invalid.

403

Forbidden, no permission to perform this action.

500

Internal server error

post/enterprise/{enterprise_id}/policy/
Request samples
Response samples
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "enterprise": "string",
  • "url": "string",
  • "name": "string",
  • "description": "string",
  • "device_count": 0,
  • "google_policy_id": "string",
  • "policy": {
    },
  • "updated_on": "2019-08-24T14:15:22Z",
  • "created_on": "2019-08-24T14:15:22Z",
  • "is_active": true
}

Get Enterprise Policy

Returns EnterprisePolicy instance

SecurityapiKey
Request
path Parameters
policy_id
required
integer

An integer identifying this enterprise policy.

enterprise_id
required
string

A UUID string identifying enterprise.

Responses
200

successful operation

401

Authorization information is missing or invalid.

404

Not Found.

500

Internal server error

get/enterprise/{enterprise_id}/policy/{policy_id}/
Request samples
Response samples
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "enterprise": "string",
  • "url": "string",
  • "name": "string",
  • "description": "string",
  • "device_count": 0,
  • "google_policy_id": "string",
  • "policy": {
    },
  • "updated_on": "2019-08-24T14:15:22Z",
  • "created_on": "2019-08-24T14:15:22Z",
  • "is_active": true
}

Update Enterprise Policy

Returns Enterprise Policy instance

SecurityapiKey
Request
path Parameters
policy_id
required
integer

An integer identifying this enterprise policy.

enterprise_id
required
string

A UUID string identifying enterprise.

Request Body schema: */*
required
enterprise
required
string <url> (Enterprise url)

Url of the enterprise resource

name
required
string (Policy Name)

Name of the Policy

description
string (Policy Description)

Details regarding the Policy

required
object (Policy Data)
is_active
boolean (Policy Active status)

Is this policy currently active

Responses
200

successful operation

400

User update error

401

Authorization information is missing or invalid

404

Not Found

500

Internal server error

put/enterprise/{enterprise_id}/policy/{policy_id}/
Request samples
Response samples
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "enterprise": "string",
  • "url": "string",
  • "name": "string",
  • "description": "string",
  • "device_count": 0,
  • "google_policy_id": "string",
  • "policy": {
    },
  • "updated_on": "2019-08-24T14:15:22Z",
  • "created_on": "2019-08-24T14:15:22Z",
  • "is_active": true
}

Delete a Enterprise Policy

Emtpy response

SecurityapiKey
Request
path Parameters
policy_id
required
integer

An integer identifying this enterprise policy.

enterprise_id
required
string

A UUID string identifying enterprise.

Responses
204

The resource was deleted successfully.

400

Invalid request.

401

Authorization information is missing or invalid.

403

Forbidden, no permission to perform this action.

404

Not Found.

500

Internal server error

delete/enterprise/{enterprise_id}/policy/{policy_id}/
Request samples
Response samples
application/json
{
  • "errors": [
    ],
  • "message": "string",
  • "status": 0
}

Partial update EnterprisePolicy

Returns EnterprisePolicy instance

SecurityapiKey
Request
path Parameters
policy_id
required
integer

An integer identifying this enterprise policy.

enterprise_id
required
string

A UUID string identifying enterprise.

Request Body schema: */*
required
enterprise
string <url> (Enterprise url)

Url of the enterprise resource

name
string (Policy Name)

Name of the Policy

description
string (Policy Description)

Details regarding the Policy

object (Policy Data)
is_active
boolean (Policy Active status)

Is this policy currently active

Responses
200

successful operation

400

Bad request

401

Authorization information is missing or invalid.

403

Forbidden, no permission to perform this action.

404

Not Found.

500

Internal server error

patch/enterprise/{enterprise_id}/policy/{policy_id}/
Request samples
Response samples
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "enterprise": "string",
  • "url": "string",
  • "name": "string",
  • "description": "string",
  • "device_count": 0,
  • "google_policy_id": "string",
  • "policy": {
    },
  • "updated_on": "2019-08-24T14:15:22Z",
  • "created_on": "2019-08-24T14:15:22Z",
  • "is_active": true
}