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âmentros

Nome parâmetro Descrição
location_id
opcional

Escopo de localizações

Validations:

  • Must be a Integer

organization_id
opcional

Escopo de organização

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 requisições

Validations:

  • Must be a String

Pesquisar campos

Nome do campo Tipo Valores possíveis
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âmentros

Nome parâmetro Descrição
location_id
opcional

Escopo de localizações

Validations:

  • Must be a Integer

organization_id
opcional

Escopo de organização

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âmentros

Nome parâmetro Descrição
location_id
opcional

Escopo de localizações

Validations:

  • Must be a Integer

organization_id
opcional

Escopo de organização

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 , nulo permitido

Validations:

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

report_template[audit_comment]
opcional , nulo permitido

Validations:

  • Must be a String

report_template[locked]
opcional , nulo permitido

Se deve ou não o template está bloqueado para edição

Validations:

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

report_template[default]
opcional , nulo permitido

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]
opcional , nulo permitido

SUBSTITUIR localizações dadas com ids

Validations:

  • Must be an array of any type

report_template[organization_ids]
opcional , nulo permitido

SUBSTITUIR organizações dadas com ids

Validations:

  • Must be an array of any type


POST /api/report_templates/import
Import a report template

Parâmentros

Nome parâmetro Descrição
location_id
opcional

Escopo de localizações

Validations:

  • Must be a Integer

organization_id
opcional

Escopo de organização

Validations:

  • Must be a Integer

report_template
requerido

Validations:

  • Must be a Hash

report_template[name]
opcional

nome do modelo

Validations:

  • Must be a String

report_template[template]
opcional

conteúdos do modelo incluindo metadados

Validations:

  • Must be a String

report_template[location_ids]
opcional , nulo permitido

SUBSTITUIR localizações dadas com ids

Validations:

  • Must be an array of any type

report_template[organization_ids]
opcional , nulo permitido

SUBSTITUIR organizações dadas com ids

Validations:

  • Must be an array of any type

options
opcional

Validations:

  • Must be a Hash

options[force]
opcional , nulo permitido

use se você deseja atualizar modelos bloquados

Validations:

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

options[associate]
opcional , nulo permitido

determina quando o modelo deve associar objetos com base nos metadados. Novo significa somente quando um novo modelo está sendo criado; Sempre é para modelos novos e existentes que somente estão sendo atualizados; nunca ignora os metadados.

Validations:

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

options[lock]
opcional , nulo permitido

lock imported templates (false by default)

Validations:

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

options[default]
opcional , nulo 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âmentros

Nome parâmetro Descrição
location_id
opcional

Escopo de localizações

Validations:

  • Must be a Integer

organization_id
opcional

Escopo de organização

Validations:

  • Must be a Integer

version
opcional

versão do modelo

Validations:

  • Must be a String


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

Parâmentros

Nome parâmetro Descrição
location_id
opcional

Escopo de localizações

Validations:

  • Must be a Integer

organization_id
opcional

Escopo de organização

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 , nulo permitido

Validations:

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

report_template[audit_comment]
opcional , nulo permitido

Validations:

  • Must be a String

report_template[locked]
opcional , nulo permitido

Se deve ou não o template está bloqueado para edição

Validations:

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

report_template[default]
opcional , nulo permitido

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]
opcional , nulo permitido

SUBSTITUIR localizações dadas com ids

Validations:

  • Must be an array of any type

report_template[organization_ids]
opcional , nulo permitido

SUBSTITUIR organizações dadas com ids

Validations:

  • Must be an array of any type


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

Parâmentros

Nome parâmetro Descrição
location_id
opcional

Escopo de localizações

Validations:

  • Must be a Integer

organization_id
opcional

Escopo de organização

Validations:

  • Must be a Integer

id
requerido

Validations:

  • Must be a String


POST /api/report_templates/:id/clone
Clonar um template

Parâmentros

Nome parâmetro Descrição
location_id
opcional

Escopo de localizações

Validations:

  • Must be a Integer

organization_id
opcional

Escopo de organização

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

nome do modelo

Validations:

  • Must be a String


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

Parâmentros

Nome parâmetro Descrição
location_id
opcional

Escopo de localizações

Validations:

  • Must be a Integer

organization_id
opcional

Escopo de organização

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âmentros

Nome parâmetro Descrição
location_id
opcional

Escopo de localizações

Validations:

  • Must be a Integer

organization_id
opcional

Escopo de organização

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