{"components":{"responses":{"4XX_Client_Error_Response":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalErrorResponse"}}},"description":"error response for all http error codes in range 4XX"},"5XX_Server_Error_Response":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalErrorResponse"}}},"description":"error response for all http error codes in range 5XX"}},"schemas":{"CreateScheduledReportRequest":{"description":"Request body to create or update a scheduled report","properties":{"reportConfig":{"$ref":"#/components/schemas/ReportConfigDto"},"scheduleConfig":{"$ref":"#/components/schemas/ScheduledReportConfigDto"}},"required":["reportConfig","scheduleConfig"],"type":"object"},"GlobalErrorResponse":{"description":"error response providing details about the error occurred","properties":{"errors":{"description":"optional list of multiple errors occurred","items":{"type":"object"},"nullable":true,"type":"array"},"message":{"description":"message describing the error","nullable":true,"type":"string"},"path":{"description":"URL path where the error occurred","nullable":true,"type":"string"},"status":{"description":"textual representation of http status code, e.g. 'BAD_REQUEST' for status code 400","type":"string"},"timestamp":{"description":"timestamp in UTC when the error occurred","format":"date-time","type":"string"},"uuid":{"description":"UUID generated by the server to identify the error occurred, should be stated in case of any inquiries","format":"uuid","nullable":true,"type":"string"}},"required":["status","timestamp"],"type":"object"},"MultipartFileSchema":{"properties":{"file":{"description":"File to upload. Allowed file extensions (.csv, .json, .pdf, .txt, .xls, .xlsx, .xml).\nMust not be blank.","format":"binary","minLength":1,"type":"string"}},"required":["file"],"type":"object"},"PageInfo":{"description":"Meta data about the current page and query.","properties":{"number":{"description":"Page number of total pages available.","format":"int32","type":"integer"},"size":{"description":"Size of the page as specified by the query.","format":"int32","type":"integer"},"totalElements":{"description":"Total count of all elements available for the query.","format":"int64","type":"integer"},"totalPages":{"description":"Total count of all pages available for the query.","format":"int32","type":"integer"}},"required":["number","size","totalElements","totalPages"],"type":"object"},"PagedResponseReportDto":{"description":"List of result elements with paging metadata.","properties":{"_embedded":{"description":"Result list.","items":{"$ref":"#/components/schemas/ReportDto"},"type":"array"},"page":{"$ref":"#/components/schemas/PageInfo"}},"required":["_embedded","page"],"type":"object"},"PagedResponseScheduledReportDto":{"description":"List of result elements with paging metadata.","properties":{"_embedded":{"description":"Result list.","items":{"$ref":"#/components/schemas/ScheduledReportDto"},"type":"array"},"page":{"$ref":"#/components/schemas/PageInfo"}},"required":["_embedded","page"],"type":"object"},"PropertyDto":{"description":"Report properties","properties":{"key":{"description":"Key of the property.\nMust not be blank.\nSize must be between 0 and 255.","maxLength":255,"type":"string"},"value":{"description":"Value of the property.\nMust not be null.\nSize must be between 0 and 255.","maxLength":255,"type":"string"}},"required":["key","value"],"type":"object"},"ReportColumnDto":{"description":"Column selection entry for a report","properties":{"displayName":{"description":"Optional CSV header override for the selected column","example":"Document Number","nullable":true,"type":"string"},"fieldName":{"description":"Stable field name of the column in the data-area CSV schema.\nMust not be blank.","example":"documentNumber","minLength":1,"type":"string"}},"required":["fieldName"],"type":"object"},"ReportConfigDto":{"description":"Configuration of the report that should be generated by a schedule","properties":{"columns":{"description":"Optional CSV column selection. Null requests all configured columns; an empty array requests an empty CSV.","items":{"$ref":"#/components/schemas/ReportColumnDto"},"nullable":true,"type":"array"},"dataArea":{"description":"Data area to report on.\nMust not be null.\nMust be one of:\n|          |\n| -------- |\n| DOCUMENT |","example":"DOCUMENT","type":"string"},"reportPeriod":{"$ref":"#/components/schemas/ReportPeriodConfigDto"}},"required":["dataArea","reportPeriod"],"type":"object"},"ReportCreatedEvent":{"properties":{"eventId":{"description":"Must not be null.","format":"uuid","type":"string"},"eventType":{"description":"Must not be null.","enum":["REPORT_CREATED","REPORT_REQUESTED"],"type":"string"},"payload":{"$ref":"#/components/schemas/ReportCreatedEventPayload"}},"required":["eventId","eventType","payload"],"type":"object"},"ReportCreatedEventPayload":{"properties":{"category":{"nullable":true,"type":"string"},"creationDate":{"description":"Must not be null.","format":"date-time","type":"string"},"filename":{"description":"Must not be null.","type":"string"},"ident":{"description":"Must not be null.","type":"string"},"period":{"description":"Must not be null.","type":"string"},"properties":{"description":"Must not be null.","items":{"$ref":"#/components/schemas/PropertyDto"},"type":"array"},"tenantId":{"description":"Must not be null.","format":"int64","type":"integer"}},"required":["creationDate","filename","ident","period","properties","tenantId"],"type":"object"},"ReportDto":{"description":"Report with period and report filename.","properties":{"category":{"description":"Optional category the report belongs to","nullable":true,"type":"string"},"creationDate":{"description":"Server-side creation date of the report file (upload date).\nMust not be null.","format":"date-time","type":"string"},"dataArea":{"description":"Data area of the report","nullable":true,"type":"string"},"filename":{"description":"Name of the report file.\nMust not be blank.","minLength":1,"type":"string"},"ident":{"description":"Ident of the report file.\nMust not be blank.","minLength":1,"type":"string"},"lastModifiedAt":{"description":"Timestamp when the report entry was modified the last time.\nMust not be null.","format":"date-time","type":"string"},"period":{"description":"Associated period.\nMust not be blank.","minLength":1,"type":"string"},"properties":{"description":"Report properties.\nMust not be null.","items":{"$ref":"#/components/schemas/PropertyDto"},"type":"array"},"status":{"description":"Lifecycle status of the report.\nMust not be null.","type":"string"}},"required":["creationDate","filename","ident","lastModifiedAt","period","properties","status"],"type":"object"},"ReportPeriodConfigDto":{"description":"Report period calculation strategy","properties":{"days":{"description":"Number of complete previous days to include. Required only for PREVIOUS_DAYS.\nMust be greater than or equal to 1.","example":7,"format":"int32","minimum":1,"nullable":true,"type":"integer"},"strategy":{"description":"Strategy used to calculate the report start and end date.\nMust not be null.\nMust be one of:\n|                |\n| -------------- |\n| PREVIOUS_DAY   |\n| PREVIOUS_DAYS  |\n| PREVIOUS_WEEK  |\n| PREVIOUS_MONTH |","example":"PREVIOUS_WEEK","type":"string"}},"required":["strategy"],"type":"object"},"ScheduledReportConfigDto":{"description":"Configuration that defines when recurring report occurrences are generated","properties":{"enabled":{"default":true,"description":"Whether the schedule is active","nullable":true,"type":"boolean"},"executionDelayMinutes":{"default":0,"description":"Delay in minutes after the report period has ended before the report may be generated.\nMust be greater than or equal to 0.\nMust be less than or equal to 10080.","format":"int32","maximum":10080,"minimum":0,"nullable":true,"type":"integer"}},"type":"object"},"ScheduledReportDto":{"description":"Scheduled report configuration","properties":{"creationDate":{"description":"Creation timestamp.\nMust not be null.","format":"date-time","type":"string"},"ident":{"description":"Scheduled report identifier.\nMust not be null.","example":"f54c6d79-8b75-4b15-b8db-cf038f028f88","type":"string"},"lastModifiedAt":{"description":"Last modification timestamp.\nMust not be null.","format":"date-time","type":"string"},"lastSuccessfulOccurrenceAt":{"description":"Timestamp of the last successfully processed occurrence","format":"date-time","nullable":true,"type":"string"},"lastSuccessfulOccurrenceKey":{"description":"Unique key of the last successfully processed occurrence","nullable":true,"type":"string"},"reportConfig":{"$ref":"#/components/schemas/ReportConfigDto"},"scheduleConfig":{"$ref":"#/components/schemas/ScheduledReportConfigDto"}},"required":["creationDate","ident","lastModifiedAt","reportConfig","scheduleConfig"],"type":"object"},"TriggerStandardReportRequest":{"description":"Request body to trigger asynchronous standard report generation","properties":{"columns":{"description":"Optional CSV column selection. Null requests all configured columns; an empty array requests an empty CSV.","items":{"$ref":"#/components/schemas/ReportColumnDto"},"nullable":true,"type":"array"},"dataArea":{"description":"Data area to report on.\nMust not be null.\nMust be one of:\n|          |\n| -------- |\n| DOCUMENT |","example":"DOCUMENT","type":"string"},"endDate":{"description":"Inclusive range end (ISO date).\nMust not be null.","example":"2024-01-31","format":"date","type":"string"},"startDate":{"description":"Inclusive range start (ISO date).\nMust not be null.","example":"2024-01-01","format":"date","type":"string"}},"required":["dataArea","endDate","startDate"],"type":"object"},"UpdateUsageRecordConfigRequest":{"description":"Request body to update a usage record export configuration. At least one column is required.","properties":{"columns":{"description":"Selected columns in export order.\nMust not be null.","items":{"$ref":"#/components/schemas/ReportColumnDto"},"type":"array"},"fileName":{"description":"File name template; only the {DocumentIdent} placeholder is supported, e.g. EVN_{DocumentIdent}_PAG.\nMust not be null.","example":"usage_record.csv","type":"string"}},"required":["columns","fileName"],"type":"object"},"UsageRecordConfigResponse":{"description":"Usage record export configuration for a billing group. An empty columns list means no export configuration exists yet.","properties":{"columns":{"description":"Selected columns in export order.\nMust not be null.","items":{"$ref":"#/components/schemas/ReportColumnDto"},"type":"array"},"fileName":{"description":"File name template; only the {DocumentIdent} placeholder is supported, e.g. EVN_{DocumentIdent}_PAG.\nMust not be null.","example":"usage_record.csv","type":"string"}},"required":["columns","fileName"],"type":"object"}},"securitySchemes":{"oauth2":{"flows":{"clientCredentials":{"scopes":{"report-management-read":"Scope report-management-read","report-management-write":"Scope report-management-write","tenant-management-read":"Scope tenant-management-read","tenant-management-write":"Scope tenant-management-write"},"tokenUrl":"https://api.instellix.io/<tenant_short>/oauth2/token"}},"type":"oauth2"}}},"info":{"description":"API Description for reports access","license":{"name":"Proprietary"},"title":"Report API","version":"v2-2.2.0"},"openapi":"3.0.1","paths":{"/v2/report-files":{"get":{"description":"Get a paged result list of reports. To reduce the result set, please use the RSQL query or use the endpoint to request reports by period only.","operationId":"queryReports","parameters":[{"description":"Use RSQL query language. Intro here: https://aboullaite.me/rsql/.\n","example":"category==customers","in":"query","name":"search","schema":{"type":"string"}},{"description":"Zero-based page index (0..n). Default is 0.","in":"query","name":"page","schema":{"default":0,"type":"integer"}},{"description":"Size of the page to be returned. Max page size allowed is 100, default is 10.","in":"query","name":"size","schema":{"default":10,"type":"integer"}},{"description":"A list of one or more sorting criteria each in the format 'property(,asc|desc)' with direction being case-insensitive.\nIf sorting direction is not provided, default direction is 'asc'.\nDefault sorting criteria: 'category'.","in":"query","name":"sort","schema":{"default":["category"],"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseReportDto"}}},"description":"Standard response for successful HTTP requests."},"4XX":{"$ref":"#/components/responses/4XX_Client_Error_Response"},"5XX":{"$ref":"#/components/responses/5XX_Server_Error_Response"}},"security":[{"oauth2":["report-management-read"]}],"summary":"Query reports","tags":["Report Files"]}},"/v2/report-files/periods/{period}":{"delete":{"description":"Delete all report files of a period.","operationId":"deletePeriod","parameters":[{"description":"Period in format YYYY-MM","example":"2023-02","in":"path","name":"period","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The server successfully processed the request, and is not returning any content."},"4XX":{"$ref":"#/components/responses/4XX_Client_Error_Response"},"5XX":{"$ref":"#/components/responses/5XX_Server_Error_Response"}},"security":[{"oauth2":["report-management-write"]}],"summary":"Delete reports of period","tags":["Report Files"]},"get":{"description":"Get a paged result list of reports for the given period.","operationId":"queryReportsByPeriod","parameters":[{"description":"Use RSQL query language. Intro here: https://aboullaite.me/rsql/.\n","example":"category==customers","in":"query","name":"search","schema":{"type":"string"}},{"description":"Period in format YYYY-MM","example":"2023-02","in":"path","name":"period","required":true,"schema":{"type":"string"}},{"description":"Zero-based page index (0..n). Default is 0.","in":"query","name":"page","schema":{"default":0,"type":"integer"}},{"description":"Size of the page to be returned. Max page size allowed is 100, default is 10.","in":"query","name":"size","schema":{"default":10,"type":"integer"}},{"description":"A list of one or more sorting criteria each in the format 'property(,asc|desc)' with direction being case-insensitive.\nIf sorting direction is not provided, default direction is 'asc'.\nDefault sorting criteria: 'category'.","in":"query","name":"sort","schema":{"default":["category"],"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseReportDto"}}},"description":"Standard response for successful HTTP requests."},"4XX":{"$ref":"#/components/responses/4XX_Client_Error_Response"},"5XX":{"$ref":"#/components/responses/5XX_Server_Error_Response"}},"security":[{"oauth2":["report-management-read"]}],"summary":"Query reports for period","tags":["Report Files"]}},"/v2/report-files/periods/{period}/{filename}":{"delete":{"description":"Delete a report file attached to a period.","operationId":"deleteReport","parameters":[{"description":"Period in format YYYY-MM","example":"2023-02","in":"path","name":"period","required":true,"schema":{"type":"string"}},{"description":"Filename selected for download","example":"customers.pdf","in":"path","name":"filename","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The server successfully processed the request, and is not returning any content."},"4XX":{"$ref":"#/components/responses/4XX_Client_Error_Response"},"5XX":{"$ref":"#/components/responses/5XX_Server_Error_Response"}},"security":[{"oauth2":["report-management-write"]}],"summary":"Delete report","tags":["Report Files"]},"get":{"description":"Download a report file attached to a period.","operationId":"downloadReport","parameters":[{"description":"Period in format YYYY-MM","example":"2023-02","in":"path","name":"period","required":true,"schema":{"type":"string"}},{"description":"Filename selected for download","example":"customers.pdf","in":"path","name":"filename","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"Standard response for successful HTTP requests."},"4XX":{"$ref":"#/components/responses/4XX_Client_Error_Response"},"5XX":{"$ref":"#/components/responses/5XX_Server_Error_Response"}},"security":[{"oauth2":["report-management-read"]}],"summary":"Download report","tags":["Report Files"]}},"/v2/reports":{"get":{"description":"Get a paged result list of reports. To reduce the result set, please use the RSQL query or use the endpoint to request reports by period only.","operationId":"queryReportsViaReports","parameters":[{"description":"Use RSQL query language. Intro here: https://aboullaite.me/rsql/.\n","example":"period==2026-04","in":"query","name":"search","schema":{"type":"string"}},{"description":"Zero-based page index (0..n). Default is 0.","in":"query","name":"page","schema":{"default":0,"type":"integer"}},{"description":"Size of the page to be returned. Max page size allowed is 100, default is 10.","in":"query","name":"size","schema":{"default":10,"type":"integer"}},{"description":"A list of one or more sorting criteria each in the format 'property(,asc|desc)' with direction being case-insensitive.\nIf sorting direction is not provided, default direction is 'asc'.\nDefault sorting criteria: 'creationDate'.","in":"query","name":"sort","schema":{"default":["creationDate"],"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseReportDto"}}},"description":"Standard response for successful HTTP requests."},"4XX":{"$ref":"#/components/responses/4XX_Client_Error_Response"},"5XX":{"$ref":"#/components/responses/5XX_Server_Error_Response"}},"security":[{"oauth2":["report-management-read"]}],"summary":"Query reports","tags":["Reports"]},"post":{"description":"Creates a pending report entry and publishes a reportRequested event for asynchronous processing.","operationId":"requestStandardReport","parameters":[{"description":"Replace an existing report with the same tenant, period (month of end date), and filename","in":"query","name":"force","schema":{"default":false,"description":"Replace an existing report with the same tenant, period (month of end date), and filename","type":"boolean"}},{"in":"header","name":"tenantId","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerStandardReportRequest"}}},"required":true},"responses":{"202":{"description":"The request has been accepted for processing, but the processing has not been completed."},"4XX":{"$ref":"#/components/responses/4XX_Client_Error_Response"},"5XX":{"$ref":"#/components/responses/5XX_Server_Error_Response"}},"security":[{"oauth2":["report-management-write"]}],"summary":"Request standard report generation","tags":["Reports"]}},"/v2/reports/{ident}/file":{"get":{"description":"Download a report file by report ident.","operationId":"downloadReportByIdent","parameters":[{"description":"Ident selected for download.\nMust have size between 1 and 100 and match with the regular expression '[a-zA-Z0-9_.~-]{1,100}'.","example":"f54c6d79-8b75-4b15-b8db-cf038f028f88","in":"path","name":"ident","required":true,"schema":{"maxLength":100,"minLength":1,"pattern":"[a-zA-Z0-9_.~-]{1,100}","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"format":"binary","type":"string"}}},"description":"Standard response for successful HTTP requests."},"4XX":{"$ref":"#/components/responses/4XX_Client_Error_Response"},"5XX":{"$ref":"#/components/responses/5XX_Server_Error_Response"}},"security":[{"oauth2":["report-management-read"]}],"summary":"Download report by ident","tags":["Reports"]}},"/v2/scheduled-reports":{"get":{"description":"Get a paged result list of scheduled report configurations.","operationId":"queryScheduledReports","parameters":[{"description":"Use RSQL query language. Intro here: https://aboullaite.me/rsql/.\n","example":"enabled==true","in":"query","name":"search","schema":{"type":"string"}},{"description":"Zero-based page index (0..n). Default is 0.","in":"query","name":"page","schema":{"default":0,"type":"integer"}},{"description":"Size of the page to be returned. Max page size allowed is 100, default is 10.","in":"query","name":"size","schema":{"default":10,"type":"integer"}},{"description":"A list of one or more sorting criteria each in the format 'property(,asc|desc)' with direction being case-insensitive.\nIf sorting direction is not provided, default direction is 'asc'.\nDefault sorting criteria: 'creationDate'.","in":"query","name":"sort","schema":{"default":["creationDate"],"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseScheduledReportDto"}}},"description":"Standard response for successful HTTP requests."},"4XX":{"$ref":"#/components/responses/4XX_Client_Error_Response"},"5XX":{"$ref":"#/components/responses/5XX_Server_Error_Response"}},"security":[{"oauth2":["report-management-read"]}],"summary":"Query scheduled reports","tags":["Scheduled Reports"]},"post":{"description":"Create a recurring standard report configuration.","operationId":"createScheduledReport","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduledReportRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledReportDto"}}},"description":"The request has been fulfilled, resulting in the creation of a new resource."},"4XX":{"$ref":"#/components/responses/4XX_Client_Error_Response"},"5XX":{"$ref":"#/components/responses/5XX_Server_Error_Response"}},"security":[{"oauth2":["report-management-write"]}],"summary":"Create scheduled report","tags":["Scheduled Reports"]}},"/v2/scheduled-reports/process-due":{"post":{"description":"Manually trigger processing for due scheduled report occurrences of the current tenant.","operationId":"processDueScheduledReports","responses":{"204":{"description":"The server successfully processed the request, and is not returning any content."},"4XX":{"$ref":"#/components/responses/4XX_Client_Error_Response"},"5XX":{"$ref":"#/components/responses/5XX_Server_Error_Response"}},"security":[{"oauth2":["report-management-write"]}],"summary":"Process due scheduled reports","tags":["Scheduled Reports"]}},"/v2/scheduled-reports/{ident}":{"delete":{"description":"Delete a scheduled report configuration.","operationId":"deleteScheduledReport","parameters":[{"description":"Scheduled report ident.\nMust have size between 1 and 100 and match with the regular expression '[a-zA-Z0-9_.~-]{1,100}'.","in":"path","name":"ident","required":true,"schema":{"maxLength":100,"minLength":1,"pattern":"[a-zA-Z0-9_.~-]{1,100}","type":"string"}}],"responses":{"204":{"description":"The server successfully processed the request, and is not returning any content."},"4XX":{"$ref":"#/components/responses/4XX_Client_Error_Response"},"5XX":{"$ref":"#/components/responses/5XX_Server_Error_Response"}},"security":[{"oauth2":["report-management-write"]}],"summary":"Delete scheduled report","tags":["Scheduled Reports"]},"get":{"description":"Get a scheduled report configuration by ident.","operationId":"getScheduledReport","parameters":[{"description":"Scheduled report ident.\nMust have size between 1 and 100 and match with the regular expression '[a-zA-Z0-9_.~-]{1,100}'.","in":"path","name":"ident","required":true,"schema":{"maxLength":100,"minLength":1,"pattern":"[a-zA-Z0-9_.~-]{1,100}","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledReportDto"}}},"description":"Standard response for successful HTTP requests."},"4XX":{"$ref":"#/components/responses/4XX_Client_Error_Response"},"5XX":{"$ref":"#/components/responses/5XX_Server_Error_Response"}},"security":[{"oauth2":["report-management-read"]}],"summary":"Get scheduled report","tags":["Scheduled Reports"]},"put":{"description":"Replace a scheduled report configuration.","operationId":"updateScheduledReport","parameters":[{"description":"Scheduled report ident.\nMust have size between 1 and 100 and match with the regular expression '[a-zA-Z0-9_.~-]{1,100}'.","in":"path","name":"ident","required":true,"schema":{"maxLength":100,"minLength":1,"pattern":"[a-zA-Z0-9_.~-]{1,100}","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduledReportRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledReportDto"}}},"description":"Standard response for successful HTTP requests."},"4XX":{"$ref":"#/components/responses/4XX_Client_Error_Response"},"5XX":{"$ref":"#/components/responses/5XX_Server_Error_Response"}},"security":[{"oauth2":["report-management-write"]}],"summary":"Update scheduled report","tags":["Scheduled Reports"]}}},"security":[{"oauth2":[]}],"servers":[{"description":"Instellix Production","url":"https://api.instellix.io"}],"x-readme":{"explorer-enabled":false,"proxy-enabled":true}}