Billing



[tags: DMA,RPRM]

Resource Root

https://localhost:8443/api/rest/billing

Summary


Resources Methods
https://localhost:8443/api/rest/billing

GET  This method is deprecated.

https://localhost:8443/api/rest/billing/generate-cdrs

POST  Initiates the process to generate CDRs matching the input search filter parameters.

https://localhost:8443/api/rest/billing/status

GET Retrieves CDRs generation status.

https://localhost:8443/api/rest/billing/download-cdrs

GET Downloads CDR file [tags: DMA] Note 1: ETag is currently passed back to the user as a UNIX timestamp.

Resources


https://localhost:8443/api/rest/billing


Methods

GET


This method is deprecated. API users are highly recommended to use /billing/generate-cdrs and /billing/download-cdrs instead.

Retrieves a list of CDRs matching the input search filter parameters. The list as three files
inside one zipped file, which is streamed to the user. The three files will separately list
calls, conference, and call counts as CSV lists.

Note 1: This method's default search will return all CDRs from midnight of the current day to the
current time when search criteria are not provided.

Note 2: Datetime format is [-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]. Examples include:
2001-10-26T21:32:52, 2001-10-26T21:32:52+02:00, 2001-10-26T19:32:52Z, 2001-10-26T19:32:52+00:00,
-2001-10-26T21:32:52, or 2001-10-26T21:32:52.12679

[tags: DMA,RPRM]

Request

Query Parameters

Name Type Description
from-date xs:dateTime
Return only CDRs that start on or after this datetime. If not included, from-date is set to
midnight of the current day.
to-date xs:dateTime
Return only CDRs that start on or before this datetime. If not included, to-date is set to
current date and time.

Response

Status Representation Description
200 application/zip
CDR information successfully retrieved.
403 application/vnd.plcm.plcm-error+xml
application/vnd.plcm.plcm-error+json
Current user does not have permission to request information. DMA roles required: administrator, provisioner, auditor.
409 application/vnd.plcm.plcm-error+xml
application/vnd.plcm.plcm-error+json
Date format incorrect or date range invalid.
429 application/vnd.plcm.plcm-error+xml
application/vnd.plcm.plcm-error+json
Too many requests. Maximum number of concurrent requests in progress. Try back later.
The maximum number of concurrent requests is one

https://localhost:8443/api/rest/billing/generate-cdrs


Methods

POST


Initiates the process to generate CDRs matching the input search filter parameters. A URL
to check the status of the task will be returned in the location header.

Note 1: This method's default search will generate all CDRs from midnight of the current day to the
current time when search criteria is not provided.

Note 2: Datetime format is [-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]. Examples include:
2001-10-26T21:32:52, 2001-10-26T21:32:52+02:00, 2001-10-26T19:32:52Z, 2001-10-26T19:32:52+00:00,
-2001-10-26T21:32:52, or 2001-10-26T21:32:52.12679

[tags: DMA,RPRM]

Request

Query Parameters

Name Type Description
from-date xs:dateTime
Generate only CDRs that start on or after this datetime. If not included, from-date is set to
midnight of the current day.
to-date xs:dateTime
Generate only CDRs that start on or before this datetime. If not included, to-date is set to
current date and time.

Response

Status Representation Description
202 CDR generation successfully started.
403 application/vnd.plcm.plcm-error+xml
application/vnd.plcm.plcm-error+json
Current user does not have permission to request information. DMA roles required: administrator, provisioner, auditor.
409 application/vnd.plcm.plcm-error+xml
application/vnd.plcm.plcm-error+json
Date format incorrect or date range invalid.
416 application/vnd.plcm.plcm-error+xml
application/vnd.plcm.plcm-error+json
Range Not Satisfiable - Date range returned too many results.
429 application/vnd.plcm.plcm-error+xml
application/vnd.plcm.plcm-error+json
Too many requests. Maximum number of concurrent requests in progress. Try back later.
The maximum number of concurrent requests is one

https://localhost:8443/api/rest/billing/status


Methods

GET

Retrieves CDRs generation status. [tags: DMA]

Request

Response

Status Representation Description
200 application/vnd.plcm.plcm-billing-status+xml
application/vnd.plcm.plcm-billing-status+json
Information successfully retrieved
304
CDRs generations status has not
changed since the
last search.

Note: The API
client must provide the
"plcm-billing-status"
representation's
ETag value in the
"If-None-Match" HTTP header to
ensure conditional
retrieval.
This will improve
network performance
by reducing bandwidth
consumption.

If the API
client chooses to exclude an ETag value from a
previous,
identical
search in the "If-None-Match"
header,
then the HTTP response will contain the
search results in the message body.

The
"plcm-billing-status" ETag can be
accessed
from the initial
search
result's HTTP
response
header.
403 application/vnd.plcm.plcm-error+xml
User does not have the correct permission to retrieve the billing status.

https://localhost:8443/api/rest/billing/download-cdrs


Methods

GET

Downloads CDR file [tags: DMA]

Note 1: ETag is currently passed back to the user as a UNIX timestamp. It is not truly an "ETag", but is
a placeholder for more correct implementation when billing can be returned as a XML package rather
than a set of CSV's. Until then, it is still included as a useful piece of information about
when the API got the billing results to the user's query.

Request

Query Parameters

Name Type Description
cdr-identifier xs:string
Downloads CDR with unique identifier of the CDR file

Response

Status Representation Description
200 application/zip
Cdrs successfully downloaded.
403 application/vnd.plcm.plcm-error+xml
application/vnd.plcm.plcm-error+json
Unable to get permission. User roles required: administrator, auditor
404 application/vnd.plcm.plcm-error+xml
application/vnd.plcm.plcm-error+json
No such CDR file
429 application/vnd.plcm.plcm-error+xml
application/vnd.plcm.plcm-error+json
Too many requests. Maximum number of concurrent requests in progress. Try back later.