GET /api/compliance/policies
Répertorier les stratégies

Paramètres

Nom du paramètre Description
location_id
optionel

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optionel

Set the current organization context for the request

Validations:

  • Must be a Integer

search
optionel

filtrer les résultats

Validations:

  • Must be a String

order
optionel

Champ et sens de tri, ex: 'id DESC'

Validations:

  • Must be a String

page
optionel

Numéro de la page, commençant par 1

Validations:

  • Must be a number.

per_page
optionel

Nombre de résultats par page à renvoyer

Validations:

  • Must be a number.

Rechercher les champs

Nom du champ Type Valeurs possibles
content string
location string
location_id integer
name string
organization string
organization_id integer
profile string
tailoring_file string
tailoring_file_profile string

GET /api/compliance/policies/:id
Afficher une stratégie

Paramètres

Nom du paramètre Description
location_id
optionel

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optionel

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requis

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
Créer une stratégie

Paramètres

Nom du paramètre Description
location_id
optionel

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optionel

Set the current organization context for the request

Validations:

  • Must be a Integer

policy
requis

Validations:

  • Must be a Hash

policy[name]
requis

Nom de la stratégie

Validations:

  • Must be a String

policy[description]
optionel , nil autorisé

Description de la stratégie

Validations:

  • Must be a String

policy[scap_content_id]
requis

ID du contenu SCAP de la stratégie

Validations:

  • Must be a Integer

policy[scap_content_profile_id]
requis

ID du profil de contenu SCAP de la stratégie

Validations:

  • Must be a Integer

policy[period]
optionel , nil autorisé

Période de programmation de la stratégie (hebdomadaire, mensuelle, personnalisée)

Validations:

  • Must be a String

policy[weekday]
optionel , nil autorisé

Programmation hebdomadaire de la stratégie (uniquement si période = hebdomadaire)

Validations:

  • Must be a String

policy[day_of_month]
optionel , nil autorisé

Jour de programmation mensuelle de la stratégie (uniquement si période = mensuelle)

Validations:

  • Must be a Integer

policy[cron_line]
optionel , nil autorisé

Ligne cron de programmation de la stratégie (uniquement si période = personnalisée)

Validations:

  • Must be a String

policy[hostgroup_ids]
optionel , nil autorisé

Appliquer Groupes hôtes de la stratégie

Validations:

  • Must be an array of any type

policy[host_ids]
optionel , nil autorisé

Appliquer la politique aux hôtes

Validations:

  • Must be an array of any type

policy[tailoring_file_id]
optionel , nil autorisé

ID du fichier de personnalisation

Validations:

  • Must be a Integer

policy[tailoring_file_profile_id]
optionel , nil autorisé

ID du profil de fichier de personnalisation

Validations:

  • Must be a Integer

policy[deploy_by]
requis

How the policy should be deployed

Validations:

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

policy[location_ids]
optionel , nil autorisé

REMPLACER les emplacements par les id donnés

Validations:

  • Must be an array of any type

policy[organization_ids]
optionel , nil autorisé

REMPLACER les organisations qui ont les ID suivants

Validations:

  • Must be an array of any type


PUT /api/compliance/policies/:id
Mettre à jour une stratégie

Paramètres

Nom du paramètre Description
location_id
optionel

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optionel

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requis

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
requis

Validations:

  • Must be a Hash

policy[name]
optionel

Nom de la stratégie

Validations:

  • Must be a String

policy[description]
optionel , nil autorisé

Description de la stratégie

Validations:

  • Must be a String

policy[scap_content_id]
optionel

ID du contenu SCAP de la stratégie

Validations:

  • Must be a Integer

policy[scap_content_profile_id]
optionel

ID du profil de contenu SCAP de la stratégie

Validations:

  • Must be a Integer

policy[period]
optionel , nil autorisé

Période de programmation de la stratégie (hebdomadaire, mensuelle, personnalisée)

Validations:

  • Must be a String

policy[weekday]
optionel , nil autorisé

Programmation hebdomadaire de la stratégie (uniquement si période = hebdomadaire)

Validations:

  • Must be a String

policy[day_of_month]
optionel , nil autorisé

Jour de programmation mensuelle de la stratégie (uniquement si période = mensuelle)

Validations:

  • Must be a Integer

policy[cron_line]
optionel , nil autorisé

Ligne cron de programmation de la stratégie (uniquement si période = personnalisée)

Validations:

  • Must be a String

policy[hostgroup_ids]
optionel , nil autorisé

Appliquer Groupes hôtes de la stratégie

Validations:

  • Must be an array of any type

policy[host_ids]
optionel , nil autorisé

Appliquer la politique aux hôtes

Validations:

  • Must be an array of any type

policy[tailoring_file_id]
optionel , nil autorisé

ID du fichier de personnalisation

Validations:

  • Must be a Integer

policy[tailoring_file_profile_id]
optionel , nil autorisé

ID du profil de fichier de personnalisation

Validations:

  • Must be a Integer

policy[deploy_by]
optionel

How the policy should be deployed

Validations:

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

policy[location_ids]
optionel , nil autorisé

REMPLACER les emplacements par les id donnés

Validations:

  • Must be an array of any type

policy[organization_ids]
optionel , nil autorisé

REMPLACER les organisations qui ont les ID suivants

Validations:

  • Must be an array of any type


DELETE /api/compliance/policies/:id
Supprimer une Stratégie

Paramètres

Nom du paramètre Description
location_id
optionel

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optionel

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requis

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
Afficher le contenu SCAP d'une stratégie

Paramètres

Nom du paramètre Description
location_id
optionel

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optionel

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requis

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
Afficher le fichier de personnalisation d'une stratégie

Paramètres

Nom du paramètre Description
location_id
optionel

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optionel

Set the current organization context for the request

Validations:

  • Must be a Integer

id
requis

Validations:

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