GET /api/report_templates 200 { "total": 1, "subtotal": 1, "page": 1, "per_page": 20, "search": null, "sort": { "by": null, "order": null }, "results": [ { "created_at": "2018-11-16 10:03:38 UTC", "updated_at": "2018-11-16 10:03:38 UTC", "name": "report_template27", "id": 1007981803 } ] }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
search optional |
filter results Validations:
|
order optional |
Sort and order by a searchable field, e.g. '<field> DESC' Validations:
|
page optional |
Page number, starting at 1 Validations:
|
per_page optional |
Number of results per page to return, 'all' to return all results Validations:
|
Field name | Type | Possible values |
---|---|---|
default | true, false | |
id | integer | |
location | string | |
location_id | integer | |
locked | true, false | |
name | string | |
organization | string | |
organization_id | integer | |
snippet | true, false | |
template | text |
GET /api/report_templates/1007981803-report_template8 200 { "template": "template content 8", "default": false, "created_at": "2018-11-16 10:03:37 UTC", "updated_at": "2018-11-16 10:03:37 UTC", "name": "report_template8", "id": 1007981803, "locations": [], "organizations": [] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
POST /api/report_templates { "report_template": { "name": "report_template_test", "template": "iHDkBWUaTCanxIYjwIDiPStehAdtxnDqFsUqUHDsTgLnJIjSTomDcVwjJNdAwcJGKJiCeMxFdGbUNpxvnFxeaklIlaJMXTNHSvwdrNEislSYpVWHWohREuEcOiSshYKpuLQmDRhyzWpSGzpOLDkCQixupKUSPlXanfgXuXIRYauDAWPLmTNwhYgQBTLGqsLBfIfcQvOzGXmwDcxQuCnwPIklWHTxERFzhrehRuCLKduakNEuCDmcitHdoxhtPRcVejuRIxQqLQGekpmUaPpehjssrctmjFDmCzJqTkvcJnDfrMSEFdQVKGrtFVubOqvKyTCCEADNrIVviQEUWOKOydauANzTYOCBwFdlYNwgEiPNBgVUNmFwilMnQqnAPCNMdmyyLduQfjIrHqlTzLzUReRQOfixUnJJhBsLhYNaEOYTOCariPdzWRmspBIwjMIh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yOiOXsfRuJofeCghgScERhvqDfSSxfmHfBjxexNrFjdVoBSimOhcMNaBogFecjBfeTSUUGsfWeIkAodEnfLmPGXlvDVic" } } 201 { "template": "iHDkBWUaTCanxIYjwIDiPStehAdtxnDqFsUqUHDsTgLnJIjSTomDcVwjJNdAwcJGKJiCeMxFdGbUNpxvnFxeaklIlaJMXTNHSvwdrNEislSYpVWHWohREuEcOiSshYKpuLQmDRhyzWpSGzpOLDkCQixupKUSPlXanfgXuXIRYauDAWPLmTNwhYgQBTLGqsLBfIfcQvOzGXmwDcxQuCnwPIklWHTxERFzhrehRuCLKduakNEuCDmcitHdoxhtPRcVejuRIxQqLQGekpmUaPpehjssrctmjFDmCzJqTkvcJnDfrMSEFdQVKGrtFVubOqvKyTCCEADNrIVviQEUWOKOydauANzTYOCBwFdlYNwgEiPNBgVUNmFwilMnQqnAPCNMdmyyLduQfjIrHqlTzLzUReRQOfixUnJJhBsLhYNaEOYTOCariPdzWRmspBIwjMIhpwQVDVadbjNfjrKqbJcNkMIVvbEtllEgbmDGoKyvpTxqHAOhDjsYQQPcJBovoccErdkEhKWEbfCajRXSbRVSEMetcijwJGpxpQENGmtBzjRUjssbwwKGARRzfsWLLqBiUnBduCHihdceEmiqbJmhWlLmtRAhqOPSVkpcOVyaBlxMhYxccFDJHDATMeFNHLwDIscuRHkTtmEliegoEFeRBcYiRaySbxYfhwSyIbmOGWdlqnIidGpSbApaAsgVpGhvSyqdMSwrXpMAocpyhJunaCtfYeyJVeuBdqNIWolyrWVgsJMizQrQEowKjMEhSogHrdHkHGtmsiKcoXNrdiprgwlWwqJRqmReoSsjrHKnbfELfoYsqkhsVzlvNixccNPLHcjVXgrkLXDIqQSAaHqDvnsipHiKwUuuYmlOFazXGQzJstuMkuMGworrrJtgkYkarvLLiEtmSANKGRHhquHamEEbpLNkomCKKWOdAEnAqokbrgAIWOMTraIaBybLePysbYrYYmrANFAnzVXUUAkyHtMSdSKHKLCpSMLPEioTeWltiuVdgADqSCOkhvFi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wspzQyvpXAsioaqJHfAJhpfkeAgyHjVXvwiFMuikwMeGfynRbWVNgEJNMSnSFYSWRJGDBgOSObBkkgeqbKqRBmCLUwgESbhwsmVBpztzkhekXukWLycVxNbQOSeQFuHEsdBjlVefIIXznJoDBGQsYlHqYLSTDnqKROLDMMgXBswSEprJneWxvrGqtjHjzdjTDxMFOvlpxIyIinypgxOOxpaLbsTIuujRepKOyFksTUYdFmLVvnihXiLhAlIWYQhqImDcJfdRvmmUMzemBhiaaSAtPQCWrhhjOQXIeqjjzQaeoxDUFGJLiamKkRgjymAEMINhiccBTARUMnCweiflhRtuBGoSLvLdNHyEjrfcUtfPbadXwEcFmuzWVYAgGwykyUgQFNHzBbocodTHWHzhJXzpQtqHHentYoQPVJoqAPxPFuXHCUFdJWDWsgGuMFGTeUhdMmuGdqPPNXblyismdtxFQdBTDejzgGVPNDAQXOVxxsnTEXSnqWHUmmuTsrIWVAWOvMNfNXQXniVYVEXyqjmWcQIrzpVUBvyOiOXsfRuJofeCghgScERhvqDfSSxfmHfBjxexNrFjdVoBSimOhcMNaBogFecjBfeTSUUGsfWeIkAodEnfLmPGXlvDVic", "default": false, "created_at": "2018-11-16 10:03:37 UTC", "updated_at": "2018-11-16 10:03:37 UTC", "name": "report_template_test", "id": 1007981804, "locations": [], "organizations": [] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
report_template required |
Validations:
|
report_template[name] required |
Validations:
|
report_template[description] optional , nil allowed |
Validations:
|
report_template[template] required |
Validations:
|
report_template[snippet] optional , nil allowed |
Validations:
|
report_template[audit_comment] optional , nil allowed |
Validations:
|
report_template[locked] optional , nil allowed |
Whether or not the template is locked for editing Validations:
|
report_template[default] optional , nil allowed |
Whether or not the template is added automatically to new organizations and locations Validations:
|
report_template[location_ids] optional , nil allowed |
REPLACE locations with given ids Validations:
|
report_template[organization_ids] optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
POST /api/report_templates/import { "report_template": { "name": "report_template10", "template": "b" } } 201 { "template": "b", "name": "report_template10", "id": 1007981804, "snippet": false, "template_kind_id": null, "created_at": "2018-11-16T10:03:37.842Z", "updated_at": "2018-11-16T10:03:37.851Z", "locked": false, "default": false, "vendor": null, "os_family": null }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
report_template required |
Validations:
|
report_template[name] optional |
template name Validations:
|
report_template[template] optional |
template contents including metadata Validations:
|
report_template[location_ids] optional , nil allowed |
REPLACE locations with given ids Validations:
|
report_template[organization_ids] optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
options optional |
Validations:
|
options[force] optional , nil allowed |
use if you want update locked templates Validations:
|
options[associate] optional , nil allowed |
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:
|
options[lock] optional , nil allowed |
lock imported templates (false by default) Validations:
|
options[default] optional , nil allowed |
makes the template default meaning it will be automatically associated with newly created organizations and locations (false by default) Validations:
|
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
version optional |
template version Validations:
|
PUT /api/report_templates/1007981804-report_template18 { "report_template": { "audit_comment": "aha", "template": "tmp" } } 200 { "template": "tmp", "default": false, "created_at": "2018-11-16 10:03:38 UTC", "updated_at": "2018-11-16 10:03:38 UTC", "name": "report_template18", "id": 1007981804, "locations": [], "organizations": [] }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
report_template required |
Validations:
|
report_template[name] optional |
Validations:
|
report_template[description] optional , nil allowed |
Validations:
|
report_template[template] optional |
Validations:
|
report_template[snippet] optional , nil allowed |
Validations:
|
report_template[audit_comment] optional , nil allowed |
Validations:
|
report_template[locked] optional , nil allowed |
Whether or not the template is locked for editing Validations:
|
report_template[default] optional , nil allowed |
Whether or not the template is added automatically to new organizations and locations Validations:
|
report_template[location_ids] optional , nil allowed |
REPLACE locations with given ids Validations:
|
report_template[organization_ids] optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
DELETE /api/report_templates/1007981803-report_template16 { "report_template": {} } 200 { "id": 1007981803, "name": "report_template16", "template": "template content 15", "snippet": false, "template_kind_id": null, "created_at": "2018-11-16T10:03:37.981Z", "updated_at": "2018-11-16T10:03:37.981Z", "locked": false, "default": false, "vendor": null, "os_family": null }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
POST /api/report_templates/1007981804-report_template15/clone { "report_template": { "name": "" } } 422 { "error": { "id": null, "errors": { "name": [ "can't be blank" ] }, "full_messages": [ "Name can't be blank" ] } }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
report_template required |
Validations:
|
report_template[name] required |
template name Validations:
|
GET /api/report_templates/1007981804-report_template25/export 200 template content 24 <%# name: report_template25 snippet: false model: ReportTemplate %>
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
POST /api/report_templates/1007981804/generate { "report_template": {} } 200 2
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
input_values optional |
Hash of input values where key is the name of input, value is the value for this input Validations:
|
gzip optional |
Compress the report uzing gzip Validations:
|
report_format optional |
Report format, defaults to 'csv' Validations:
|
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" }
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
input_values optional |
Hash of input values where key is the name of input, value is the value for this input Validations:
|
gzip optional |
Compress the report using gzip Validations:
|
mail_to optional |
If set, scheduled report will be delivered via e-mail. Use ',' to separate multiple email addresses. Validations:
|
generate_at optional |
UTC time to generate report at Validations:
|
report_format optional |
Report format, defaults to 'csv' Validations:
|
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.
Param name | Description |
---|---|
location_id optional |
Set the current location context for the request Validations:
|
organization_id optional |
Set the current organization context for the request Validations:
|
id required |
Validations:
|
job_id required |
ID assigned to generating job by the schedule command Validations:
|