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

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

search
opcional

filtrar resultados

Validations:

  • Must be a String

order
opcional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
opcional

paginar resultados

Validations:

  • Must be a String

per_page
opcional

número de entradas por solicitud

Validations:

  • Must be a String

Campos de búsqueda

Nombre del campo Tipo Valores posibles
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

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

id
requerido

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

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

report_template
requerido

Validations:

  • Must be a Hash

report_template[name]
requerido

Validations:

  • Must be a String

report_template[template]
requerido

Validations:

  • Must be a String

report_template[snippet]
opcional , nil permitido

Validations:

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

report_template[audit_comment]
opcional , nil permitido

Validations:

  • Must be a String

report_template[locked]
opcional , nil permitido

Si la plantilla está bloqueada o no para edición

Validations:

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

report_template[location_ids]
opcional , nil permitido

REMPLAZAR ubicaciones con ID dadas

Validations:

  • Must be an array of any type

report_template[organization_ids]
opcional , nil permitido

REMPLAZAR organizaciones con ID dadas.

Validations:

  • Must be an array of any type


POST /api/report_templates/import
Import a report template

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

report_template
requerido

Validations:

  • Must be a Hash

report_template[name]
opcional

nombre de plantilla

Validations:

  • Must be a String

report_template[template]
opcional

contenidos de plantillas incluidos los metadatos

Validations:

  • Must be a String

report_template[location_ids]
opcional , nil permitido

REMPLAZAR ubicaciones con ID dadas

Validations:

  • Must be an array of any type

report_template[organization_ids]
opcional , nil permitido

REMPLAZAR organizaciones con ID dadas.

Validations:

  • Must be an array of any type

options
opcional

Validations:

  • Must be a Hash

options[force]
opcional , nil permitido

utilizar si desea actualizar las plantillas bloqueadas

Validations:

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

options[associate]
opcional , nil permitido

determina los casos en que la plantilla debería asociar objetos en función de los metadatos, nuevo se aplica solo a los casos de plantilla nueva que se está creando, siempre se aplica tanto a plantilla nueva como existente que solo se están actualizando, nunca ignora los metadatos

Validations:

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

options[lock]
opcional , nil permitido

lock imported templates (false by default)

Validations:

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

options[default]
opcional , nil permitido

makes the template default meaning it will be automatically associated with newly created organizations and locations (false by default)

Validations:

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


GET /api/report_templates/revision

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

version
opcional

versión de plantilla

Validations:

  • Must be a String


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

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

id
requerido

Validations:

  • Must be a String

report_template
requerido

Validations:

  • Must be a Hash

report_template[name]
opcional

Validations:

  • Must be a String

report_template[template]
opcional

Validations:

  • Must be a String

report_template[snippet]
opcional , nil permitido

Validations:

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

report_template[audit_comment]
opcional , nil permitido

Validations:

  • Must be a String

report_template[locked]
opcional , nil permitido

Si la plantilla está bloqueada o no para edición

Validations:

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

report_template[location_ids]
opcional , nil permitido

REMPLAZAR ubicaciones con ID dadas

Validations:

  • Must be an array of any type

report_template[organization_ids]
opcional , nil permitido

REMPLAZAR organizaciones con ID dadas.

Validations:

  • Must be an array of any type


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

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

id
requerido

Validations:

  • Must be a String


POST /api/report_templates/:id/clone
Clonar una plantilla

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

id
requerido

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
requerido

Validations:

  • Must be a Hash

report_template[name]
requerido

nombre de plantilla

Validations:

  • Must be a String


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

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

id
requerido

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

Parámetros

Nombre del parámetro Descripción
location_id
opcional

Alcance por ubicación

Validations:

  • Must be a Integer

organization_id
opcional

Alcance por organización

Validations:

  • Must be a Integer

id
requerido

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
opcional

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

Validations:

  • Must be a Hash