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

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Zakres w zależności od lokalizacji

Validations:

  • Must be a Integer

organization_id
opcjonalny

Zakres w zależności od organizacji

Validations:

  • Must be a Integer

search
opcjonalny

rezultat filtrowania

Validations:

  • Must be a String

order
opcjonalny

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
opcjonalny

rezultat paginacji

Validations:

  • Must be a String

per_page
opcjonalny

Liczba wpisów na jedno żądanie

Validations:

  • Must be a String

Search fields

Field name Typ Possible values
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

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Zakres w zależności od lokalizacji

Validations:

  • Must be a Integer

organization_id
opcjonalny

Zakres w zależności od organizacji

Validations:

  • Must be a Integer

id
wymagany

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

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Zakres w zależności od lokalizacji

Validations:

  • Must be a Integer

organization_id
opcjonalny

Zakres w zależności od organizacji

Validations:

  • Must be a Integer

report_template
wymagany

Validations:

  • Must be a Hash

report_template[name]
wymagany

Validations:

  • Must be a String

report_template[template]
wymagany

Validations:

  • Must be a String

report_template[snippet]
opcjonalny , nil dopuszczalny

Validations:

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

report_template[audit_comment]
opcjonalny , nil dopuszczalny

Validations:

  • Must be a String

report_template[locked]
opcjonalny , nil dopuszczalny

Czy szablon jest zablokowany do edycji

Validations:

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

report_template[default]
opcjonalny , nil dopuszczalny

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]
opcjonalny , nil dopuszczalny

ZMIEŃ lokalizacje o podanym id

Validations:

  • Must be an array of any type

report_template[organization_ids]
opcjonalny , nil dopuszczalny

ZMIEŃ organizacje o podanym id

Validations:

  • Must be an array of any type


POST /api/report_templates/import
Import a report template

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Zakres w zależności od lokalizacji

Validations:

  • Must be a Integer

organization_id
opcjonalny

Zakres w zależności od organizacji

Validations:

  • Must be a Integer

report_template
wymagany

Validations:

  • Must be a Hash

report_template[name]
opcjonalny

nazwa szablonu

Validations:

  • Must be a String

report_template[template]
opcjonalny

template contents including metadata

Validations:

  • Must be a String

report_template[location_ids]
opcjonalny , nil dopuszczalny

ZMIEŃ lokalizacje o podanym id

Validations:

  • Must be an array of any type

report_template[organization_ids]
opcjonalny , nil dopuszczalny

ZMIEŃ organizacje o podanym id

Validations:

  • Must be an array of any type

options
opcjonalny

Validations:

  • Must be a Hash

options[force]
opcjonalny , nil dopuszczalny

use if you want update locked templates

Validations:

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

options[associate]
opcjonalny , nil dopuszczalny

determines when the template should associate objects based on metadata, new means only when new template is being created, always means both for new and existing template which is only being updated, never ignores metadata

Validations:

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

options[lock]
opcjonalny , nil dopuszczalny

lock imported templates (false by default)

Validations:

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

options[default]
opcjonalny , nil dopuszczalny

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

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Zakres w zależności od lokalizacji

Validations:

  • Must be a Integer

organization_id
opcjonalny

Zakres w zależności od organizacji

Validations:

  • Must be a Integer

version
opcjonalny

wersja szablonu

Validations:

  • Must be a String


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

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Zakres w zależności od lokalizacji

Validations:

  • Must be a Integer

organization_id
opcjonalny

Zakres w zależności od organizacji

Validations:

  • Must be a Integer

id
wymagany

Validations:

  • Must be a String

report_template
wymagany

Validations:

  • Must be a Hash

report_template[name]
opcjonalny

Validations:

  • Must be a String

report_template[template]
opcjonalny

Validations:

  • Must be a String

report_template[snippet]
opcjonalny , nil dopuszczalny

Validations:

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

report_template[audit_comment]
opcjonalny , nil dopuszczalny

Validations:

  • Must be a String

report_template[locked]
opcjonalny , nil dopuszczalny

Czy szablon jest zablokowany do edycji

Validations:

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

report_template[default]
opcjonalny , nil dopuszczalny

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]
opcjonalny , nil dopuszczalny

ZMIEŃ lokalizacje o podanym id

Validations:

  • Must be an array of any type

report_template[organization_ids]
opcjonalny , nil dopuszczalny

ZMIEŃ organizacje o podanym id

Validations:

  • Must be an array of any type


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

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Zakres w zależności od lokalizacji

Validations:

  • Must be a Integer

organization_id
opcjonalny

Zakres w zależności od organizacji

Validations:

  • Must be a Integer

id
wymagany

Validations:

  • Must be a String


POST /api/report_templates/:id/clone
Sklonuj szablon

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Zakres w zależności od lokalizacji

Validations:

  • Must be a Integer

organization_id
opcjonalny

Zakres w zależności od organizacji

Validations:

  • Must be a Integer

id
wymagany

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
wymagany

Validations:

  • Must be a Hash

report_template[name]
wymagany

nazwa szablonu

Validations:

  • Must be a String


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

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Zakres w zależności od lokalizacji

Validations:

  • Must be a Integer

organization_id
opcjonalny

Zakres w zależności od organizacji

Validations:

  • Must be a Integer

id
wymagany

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

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Zakres w zależności od lokalizacji

Validations:

  • Must be a Integer

organization_id
opcjonalny

Zakres w zależności od organizacji

Validations:

  • Must be a Integer

id
wymagany

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
opcjonalny

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

Validations:

  • Must be a Hash