Skip to main content

getCustomerMonthlyUsageReport

DocumentBuilderTaskWrapper getCustomerMonthlyUsageReport()

GET /api/2.0/portal/payment/customer/usage/monthly/report

Get the monthly usage report status

Returns the state of the xlsx monthly usage report this user started with POST api/2.0/portal/payment/customer/usage/monthly/report: percentage while it is being built, isCompleted when it is done, resultFileId, resultFileName and resultFileUrl pointing at the file in the caller's My documents, and error when the build failed. The portal needs a billing customer and the caller has to be a DocSpace administrator; the call is read-only and is the one to poll. The task is kept per user and per report kind, so it reports neither another administrator's report nor the operations and service usage ones, which have their own status operations. An empty result means this user has no monthly usage report at all - none was started, or the finished one was already picked up or terminated. A completed task is dropped as soon as the next report is started, so read the file link out of the same answer that first reports isCompleted.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200The state of this user's monthly usage report, or an empty result when there is noneDocumentBuilderTaskWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller is not a DocSpace administrator, or the portal has no billing service configured--
404This portal has no billing customer yet--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

DocumentBuilderTaskWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json