GET /api/report_templates
List all report templates

GET /api/locations/:location_id/report_templates
List all report templates per location

GET /api/organizations/:organization_id/report_templates
List all report templates per organization

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

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

paginer les résultats

Validations:

  • Must be a String

per_page
optionel

nombre d'entrées par requête

Validations:

  • Must be a String

Rechercher les champs

Nom du champ Type Valeurs possibles
default true, false
location string
location_id integer
locked true, false
name string
organization string
organization_id integer
snippet true, false
template text

GET /api/report_templates/:id
Show a report template

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

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/report_templates
Create a report template

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

report_template
requis

Validations:

  • Must be a Hash

report_template[name]
requis

Validations:

  • Must be a String

report_template[template]
requis

Validations:

  • Must be a String

report_template[snippet]
optionel , nil autorisé

Validations:

  • Must be one of: true, false, 1, 0

report_template[audit_comment]
optionel , nil autorisé

Validations:

  • Must be a String

report_template[locked]
optionel , nil autorisé

Indique si le modèle peut être modifié

Validations:

  • Must be one of: true, false, 1, 0

report_template[default]
optionel , nil autorisé

Whether or not the template is added automatically to new organizations and locations

Validations:

  • Must be one of: true, false, 1, 0

report_template[location_ids]
optionel , nil autorisé

REMPLACER les emplacements par les id donnés

Validations:

  • Must be an array of any type

report_template[organization_ids]
optionel , nil autorisé

REMPLACER les organisations qui ont les ID suivants

Validations:

  • Must be an array of any type


POST /api/report_templates/import
Import a report template

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

report_template
requis

Validations:

  • Must be a Hash

report_template[name]
optionel

Nom de modèle

Validations:

  • Must be a String

report_template[template]
optionel

contenu du modèle, notamment les métadonnées

Validations:

  • Must be a String

report_template[location_ids]
optionel , nil autorisé

REMPLACER les emplacements par les id donnés

Validations:

  • Must be an array of any type

report_template[organization_ids]
optionel , nil autorisé

REMPLACER les organisations qui ont les ID suivants

Validations:

  • Must be an array of any type

options
optionel

Validations:

  • Must be a Hash

options[force]
optionel , nil autorisé

à utiliser si vous voulez mettre à jour les modèles verrouillés

Validations:

  • Must be one of: true, false, 1, 0

options[associate]
optionel , nil autorisé

détermine quand le modèle doit associer des objets en fonction de métadonnées, 'nouveau' signifie uniquement lors de la création d'un nouveau modèle, 'toujours' signifie à la fois pour les modèles nouveaux et existants en cours de mise à jour, 'jamais' ignore les métadonnées

Validations:

  • Must be one of: new, always, never.

options[lock]
optionel , nil autorisé

lock imported templates (false by default)

Validations:

  • Must be one of: true, false, 1, 0

options[default]
optionel , nil autorisé

Définit le modèle par défaut, signifiant qu'il sera automatiquement associé aux nouvelles organisations et nouveaux emplacements (faux par défaut)

Validations:

  • Must be one of: true, false, 1, 0


GET /api/report_templates/revision

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

version
optionel

version de modèle

Validations:

  • Must be a String


PUT /api/report_templates/:id
Update a report template

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

id
requis

Validations:

  • Must be a String

report_template
requis

Validations:

  • Must be a Hash

report_template[name]
optionel

Validations:

  • Must be a String

report_template[template]
optionel

Validations:

  • Must be a String

report_template[snippet]
optionel , nil autorisé

Validations:

  • Must be one of: true, false, 1, 0

report_template[audit_comment]
optionel , nil autorisé

Validations:

  • Must be a String

report_template[locked]
optionel , nil autorisé

Indique si le modèle peut être modifié

Validations:

  • Must be one of: true, false, 1, 0

report_template[default]
optionel , nil autorisé

Whether or not the template is added automatically to new organizations and locations

Validations:

  • Must be one of: true, false, 1, 0

report_template[location_ids]
optionel , nil autorisé

REMPLACER les emplacements par les id donnés

Validations:

  • Must be an array of any type

report_template[organization_ids]
optionel , nil autorisé

REMPLACER les organisations qui ont les ID suivants

Validations:

  • Must be an array of any type


DELETE /api/report_templates/:id
Delete a report template

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

id
requis

Validations:

  • Must be a String


POST /api/report_templates/:id/clone
Cloner un modèle

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

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.

report_template
requis

Validations:

  • Must be a Hash

report_template[name]
requis

Nom de modèle

Validations:

  • Must be a String


GET /api/report_templates/:id/export
Export a report template to ERB

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

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/report_templates/:id/generate
Generate a report template

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

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.

input_values
optionel

Hash of input values where key is the name of input, value is the value for this input

Validations:

  • Must be a Hash