openapi: 3.0.0
info:
title: Xentral Account Report Usage API
version: v0.1
description: Xentral is an ERP platform.
contact:
name: Xentral
url: https://xentral.com
email: api@xentral.com
servers:
- url: https://{xentralId}.xentral.biz
description: Your Xentral Instance
variables:
xentralId:
default: xentral
- url: https://{domain}
description: Xentral at a custom domain
variables:
domain:
default: xentral.com
security:
- BearerAuth: []
tags:
- name: Report Usage
description: Provide information about your usage in terms of credits spent.
paths:
/api/v1/analytics/reportUsage:
get:
tags:
- Report Usage
operationId: analytics.reportUsage.get
summary: Get report usage
description: Get report usage which shows the history of chargeable requests made within the given timeframe
parameters:
- in: query
name: filter
style: deepObject
schema:
type: object
additionalProperties: false
properties:
start:
type: string
format: date
description: Start date of the usage records
example: '2024-01-01'
end:
type: string
format: date
description: End date of the usage records
example: '2024-01-31'
responses:
'200':
description: Shows all records of chargeable requests made within the given timeframe
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- data
example:
data:
- id: 1
endpoint: report/123/export
timestamp: '2024-01-01T00:00:00+00:00'
identifier: My Report
query: SELECT * FROM table
properties:
data:
type: array
nullable: true
items:
type: object
additionalProperties: false
required:
- id
- endpoint
- timestamp
- identifier
- query
properties:
id:
type: number
example: 1
description: Unique identifier of the record
endpoint:
type: string
example: report/123/export
description: Endpoint of the request
timestamp:
type: string
example: '2024-01-01T00:00:00+00:00'
format: date-time
description: Timestamp of the request
identifier:
type: string
example: My Report
description: Identifier of the item, which is the report name or 'Custom Query' for queries
query:
type: string
example: SELECT * FROM table
description: SQL query that was executed
'401':
description: Unable to authenticate the client
content:
application/json:
schema:
type: object
properties:
message:
type: string
description: Error message explaining why the request failed.
example: 'Missing required scopes: customer:create.'
example:
message: 'Missing required scopes: customer:create.'
text/html:
schema:
type: string
example: Unauthorized
'403':
description: Unable to authorize the client
'415':
description: Resource representation send in the request is not supported.
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: Bearer token obtained in POST /tokens endpoint or pregenerated in the system.
x-readme:
samples-languages: []