GET /api/report_templates
レポートテンプレートをすべて表示

GET /api/locations/:location_id/report_templates
ロケーションごとのレポートテンプレートをすべて表示

GET /api/organizations/:organization_id/report_templates
組織ごとのレポートテンプレートをすべて表示

パラメーター

パラメーター名 記述
location_id
任意

ロケーション別のスコープ

Validations:

  • Must be a Integer

organization_id
任意

組織別のスコープ

Validations:

  • Must be a Integer

search
任意

結果のフィルター

Validations:

  • Must be a String

order
任意

フィールドと順序のソート (例: ‘id DESC’)

Validations:

  • Must be a String

page
任意

1 から始まるページ番号

Validations:

  • Must be a number.

per_page
任意

戻されるページごとの結果数

Validations:

  • Must be a number.

検索フィールド

フィールド名 タイプ 設定可能な値
default true, false
location
location_id
locked true, false
name
organization
organization_id
snippet true, false
template

GET /api/report_templates/:id
レポートテンプレートの表示

パラメーター

パラメーター名 記述
location_id
任意

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
任意

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必須

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
レポートテンプレートの作成

パラメーター

パラメーター名 記述
location_id
任意

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
任意

Set the current organization context for the request

Validations:

  • Must be a Integer

report_template
必須

Validations:

  • Must be a Hash

report_template[name]
必須

Validations:

  • Must be a String

report_template[description]
任意 , nil可

Validations:

  • Must be a String

report_template[template]
必須

Validations:

  • Must be a String

report_template[snippet]
任意 , nil可

Validations:

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

report_template[audit_comment]
任意 , nil可

Validations:

  • Must be a String

report_template[locked]
任意 , nil可

テンプレートを編集用にロックするかどうか

Validations:

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

report_template[default]
任意 , nil可

テンプレートが自動的に新規組織およびロケーションに追加されるかどうか

Validations:

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

report_template[location_ids]
任意 , nil可

ロケーションを指定された ID に置き換えます

Validations:

  • Must be an array of any type

report_template[organization_ids]
任意 , nil可

組織を指定された ID に置き換えます。

Validations:

  • Must be an array of any type


POST /api/report_templates/import
レポートテンプレートのインポート

パラメーター

パラメーター名 記述
location_id
任意

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
任意

Set the current organization context for the request

Validations:

  • Must be a Integer

report_template
必須

Validations:

  • Must be a Hash

report_template[name]
任意

テンプレート名

Validations:

  • Must be a String

report_template[template]
任意

メタデータを含むテンプレートコンテンツ

Validations:

  • Must be a String

report_template[location_ids]
任意 , nil可

ロケーションを指定された ID に置き換えます

Validations:

  • Must be an array of any type

report_template[organization_ids]
任意 , nil可

組織を指定された ID に置き換えます。

Validations:

  • Must be an array of any type

options
任意

Validations:

  • Must be a Hash

options[force]
任意 , nil可

ロックしたテンプレートを更新したい場合に使用

Validations:

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

options[associate]
任意 , nil可

テンプレートがオブジェクトをメタデータに基づいて関連付ける場合を決定します。new は新規テンプレートが作成中であることを意味します。always は、新規および更新中の既存のテンプレートを意味します。never はメタデータを無視します

Validations:

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

options[lock]
任意 , nil可

インポートされたテンプレートをロックします (デフォルトは false)

Validations:

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

options[default]
任意 , nil可

テンプレートにデフォルトで意味付けし、新たに作成された組織と場所に自動的に関連付けます (デフォルトは false)

Validations:

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


GET /api/report_templates/revision

パラメーター

パラメーター名 記述
location_id
任意

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
任意

Set the current organization context for the request

Validations:

  • Must be a Integer

version
任意

テンプレートのバージョン

Validations:

  • Must be a String


PUT /api/report_templates/:id
レポートテンプレートの更新

パラメーター

パラメーター名 記述
location_id
任意

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
任意

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必須

Validations:

  • Must be a String

report_template
必須

Validations:

  • Must be a Hash

report_template[name]
任意

Validations:

  • Must be a String

report_template[description]
任意 , nil可

Validations:

  • Must be a String

report_template[template]
任意

Validations:

  • Must be a String

report_template[snippet]
任意 , nil可

Validations:

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

report_template[audit_comment]
任意 , nil可

Validations:

  • Must be a String

report_template[locked]
任意 , nil可

テンプレートを編集用にロックするかどうか

Validations:

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

report_template[default]
任意 , nil可

テンプレートが自動的に新規組織およびロケーションに追加されるかどうか

Validations:

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

report_template[location_ids]
任意 , nil可

ロケーションを指定された ID に置き換えます

Validations:

  • Must be an array of any type

report_template[organization_ids]
任意 , nil可

組織を指定された ID に置き換えます。

Validations:

  • Must be an array of any type


DELETE /api/report_templates/:id
レポートテンプレートの削除

パラメーター

パラメーター名 記述
location_id
任意

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
任意

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必須

Validations:

  • Must be a String


POST /api/report_templates/:id/clone
テンプレートのクローン

パラメーター

パラメーター名 記述
location_id
任意

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
任意

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必須

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
必須

Validations:

  • Must be a Hash

report_template[name]
必須

テンプレート名

Validations:

  • Must be a String


GET /api/report_templates/:id/export
レポートテンプレートの ERB へのエクスポート

パラメーター

パラメーター名 記述
location_id
任意

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
任意

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必須

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 report from a template

パラメーター

パラメーター名 記述
location_id
任意

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
任意

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必須

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
任意

入力値のハッシュ。キーは入力名で、値はこの入力の値です。

Validations:

  • Must be a Hash

gzip
任意

Compress the report uzing gzip

Validations:

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

report_format
任意

Report format, defaults to 'csv'

Validations:

  • Must be one of: csv, json, yaml, html.


POST /api/report_templates/:id/schedule_report
Schedule generating of a report

The reports are generated asynchronously. If mail_to is not given, action returns an url to get resulting report from (see report_data).

POST /api/report_templates/:id/schedule_report/
200
{
  "job_id": UNIQUE-REPORT-GENERATING-JOB-UUID
  "data_url": "/api/v2/report_templates/1/report_data/UNIQUE-REPORT-GENERATING-JOB-UUID"
}

パラメーター

パラメーター名 記述
location_id
任意

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
任意

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必須

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
任意

入力値のハッシュ。キーは入力名で、値はこの入力の値です。

Validations:

  • Must be a Hash

gzip
任意

Compress the report using gzip

Validations:

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

mail_to
任意

If set, scheduled report will be delivered via e-mail. Use ',' to separate multiple email addresses.

Validations:

  • Must be a String

generate_at
任意

UTC time to generate report at

Validations:

  • Must be a String

report_format
任意

Report format, defaults to 'csv'

Validations:

  • Must be one of: csv, json, yaml, html.


GET /api/report_templates/:id/report_data/:job_id
Downloads a generated report

Returns the report data as a raw response. In case the report hasn't been generated yet, it will return an empty response with http status 204 - NoContent.

パラメーター

パラメーター名 記述
location_id
任意

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
任意

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必須

Validations:

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

job_id
必須

ID assigned to generating job by the schedule command

Validations:

  • Must be a String