{"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":{"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"},"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"},"ReportCreatedEvent":{"properties":{"eventId":{"description":"Must not be null.","format":"uuid","type":"string"},"eventType":{"description":"Must not be null.","enum":["REPORT_CREATED"],"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"},"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"},"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"}},"required":["creationDate","filename","ident","period","properties"],"type":"object"}},"securitySchemes":{"oauth2":{"flows":{"clientCredentials":{"scopes":{"nbx-report-management-read":"Scope nbx-report-management-read","nbx-report-management-write":"Scope nbx-report-management-write"},"tokenUrl":"https://api.isx-stage-westeurope.instellix.io/<tenant_short>/oauth2/token"}},"type":"oauth2"}}},"info":{"description":"API Description for reports access","title":"Report API","version":"v2-preview-2.1.3"},"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":["nbx-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":["nbx-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":["nbx-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":["nbx-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":["nbx-report-management-read"]}],"summary":"Download report","tags":["Report Files"]}}},"security":[{"oauth2":[]}],"servers":[{"description":"Instellix Stage","url":"https://api.isx-stage-westeurope.instellix.io"}],"x-readme":{"explorer-enabled":false,"proxy-enabled":true}}