GET /api/compliance/policies
List Policies

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

Validations:

  • Must be a Integer

search
Optional

filter resultaten

Validations:

  • Must be a String

order
Optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
Optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
Optional

Number of results per page to return

Validations:

  • Must be a number.

Search fields

Field name Type Possible values
content
location
location_id
name
organization
organization_id
profile
tailoring_file
tailoring_file_profile

GET /api/compliance/policies/:id
Show a Policy

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
Required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/compliance/policies
Create a Policy

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

Validations:

  • Must be a Integer

policy
Required

Validations:

  • Must be a Hash

policy[name]
Required

Policy name

Validations:

  • Must be a String

policy[description]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Policy description

Validations:

  • Must be a String

policy[scap_content_id]
Required

Policy SCAP content ID

Validations:

  • Must be a Integer

policy[scap_content_profile_id]
Required

Policy SCAP content profile ID

Validations:

  • Must be a Integer

policy[period]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Policy schedule period (weekly, monthly, custom)

Validations:

  • Must be a String

policy[weekday]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Policy schedule weekday (only if period == “weekly”)

Validations:

  • Must be a String

policy[day_of_month]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Policy schedule day of month (only if period == “monthly”)

Validations:

  • Must be a Integer

policy[cron_line]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Policy schedule cron line (only if period == “custom”)

Validations:

  • Must be a String

policy[hostgroup_ids]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Apply policy to host groups

Validations:

  • Must be an array of any type

policy[host_ids]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Apply policy to hosts

Validations:

  • Must be an array of any type

policy[tailoring_file_id]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Tailoring file ID

Validations:

  • Must be a Integer

policy[tailoring_file_profile_id]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Tailoring file profile ID

Validations:

  • Must be a Integer

policy[deploy_by]
Required

How the policy should be deployed

Validations:

  • Must be one of: puppet, ansible, manual.

policy[location_ids]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Vervang locaties met de opgegeven ids

Validations:

  • Must be an array of any type

policy[organization_ids]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Vervang organisaties met de opgegeven ids.

Validations:

  • Must be an array of any type


PUT /api/compliance/policies/:id
Update a Policy

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
Required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

policy
Required

Validations:

  • Must be a Hash

policy[name]
Optional

Policy name

Validations:

  • Must be a String

policy[description]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Policy description

Validations:

  • Must be a String

policy[scap_content_id]
Optional

Policy SCAP content ID

Validations:

  • Must be a Integer

policy[scap_content_profile_id]
Optional

Policy SCAP content profile ID

Validations:

  • Must be a Integer

policy[period]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Policy schedule period (weekly, monthly, custom)

Validations:

  • Must be a String

policy[weekday]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Policy schedule weekday (only if period == “weekly”)

Validations:

  • Must be a String

policy[day_of_month]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Policy schedule day of month (only if period == “monthly”)

Validations:

  • Must be a Integer

policy[cron_line]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Policy schedule cron line (only if period == “custom”)

Validations:

  • Must be a String

policy[hostgroup_ids]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Apply policy to host groups

Validations:

  • Must be an array of any type

policy[host_ids]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Apply policy to hosts

Validations:

  • Must be an array of any type

policy[tailoring_file_id]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Tailoring file ID

Validations:

  • Must be a Integer

policy[tailoring_file_profile_id]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Tailoring file profile ID

Validations:

  • Must be a Integer

policy[deploy_by]
Optional

How the policy should be deployed

Validations:

  • Must be one of: puppet, ansible, manual.

policy[location_ids]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Vervang locaties met de opgegeven ids

Validations:

  • Must be an array of any type

policy[organization_ids]
Optional , <span class="translation_missing" title="translation missing: nl-NL.apipie.nil_allowed">Nil Allowed</span>

Vervang organisaties met de opgegeven ids.

Validations:

  • Must be an array of any type


DELETE /api/compliance/policies/:id
Delete a Policy

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
Required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


GET /api/compliance/policies/:id/content
Show a policy's SCAP content

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
Required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


GET /api/compliance/policies/:id/tailoring
Show a policy's Tailoring file

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
Required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.