Update CDR Export Preference

Saves the CDR export preferences of the current user.

Request URL

POST {base_url}/uc-creport/api/v1/cdr/export/preference

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String The access token used for authentication.

Format: Bearer {access_token}.

x-tenant-code Yes String The tenant name.
Note: You can obtain tenant name using the Query Tenants interface.
Body parameters
Parameter Required Type Description
viewType No String

The range of the CDR data to export.

Valid value:

  • list_only: The main records only.
  • leg_only: The call leg records only.
  • list_and_leg: Both the main records and the call leg records.
durationFormat No String

The format of the duration in the exported file.

Valid value:

  • seconds
  • hhmmss
exportFields No String

The range of the fields to export.

Valid value:

  • all: All fields.
  • selected: The selected fields.
format No String

The format of the exported file.

Valid value:

  • csv
  • xls
  • pdf
  • html

Response parameters

Parameter Type Description
requestId String The unique ID of the request, which can be used to quickly locate the request.
code String The HTTP status code of the request.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
message String The status message of the request.
detailMessage String The detailed error information.

When the request is successful, this parameter returns empty.

result Object The result of the operation. An empty result is returned when the operation succeeds.

Example

Request example

POST /uc-creport/api/v1/cdr/export/preference HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIxMDAwQGNvbG9ydGVzdDIiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJ1c2VyX25hbWUiOiIxMDAwQGNvbG9ydGVzdDIiLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiXSwiY2xpZW50X2V4dCI6eyJkZXNjcmlwdGlvbiI6IueuoeeQhuWQjuWPsFdlYuW6lOeUqCIsInBsYXRmb3JtIjoid2ViIn0sImV4cCI6MTc5MzM1NTUwMiwiaWF0IjoxNzkzMzMzOTAyLCJqdGkiOiIxMGQwNGYwYy0yMTIxLTRiMzktYjFlZC1kNDY5MDY0ODlhODQiLCJjbGllbnRfaWQiOiJub3ZvLWFkbWluLXdlYiIsInNpZCI6IjlkMTg5NjI3LTZhZTAtNDYxMC04ZTFhLWNiZWJmYzdlYTdmZiIsInVzZXJfZXh0Ijp7InJvbGVJZHMiOlsxMDJdLCJwdWlkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJ0ZW5hbnRJZCI6MjA3OTUwNDIwNTMwOTE5NDI0MSwicGFyZW50VWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5NiwidGVuYW50Q29kZSI6ImNvbG9ydGVzdDIiLCJ0eXBlIjoiVF9VU0VSIiwidXNlcklkIjoyMDc5NzQ2OTE1Mzg4MDc2MDMzLCJlbWFpbCI6Imxlb0BzYW1wbGUuY29tIiwidXNlcm5hbWUiOiIxMDAwQGNvbG9ydGVzdDIiLCJ1Y0lkIjozMDc2OTEzNjQ0ODkwODMyODk2fX0.cpY9aTg-Twaa1itEHREfJRX2RaYmalfGeof0An6DYSYBl9moSYvsjsZwImpId5xKb1qsPsec0KSXTmASV9kMgonf1uv6AtNRw702SroZxYTHwA9_lwxM8TY66aOAyoeiewHhA0sCDtg-ZGiDaatHxSitiLMi4MMr8qyzvuXF_44bcucYSaf8Z7Iokiud9cM67Z4dAFdxQ_SSbmFtAmTa78VuSPA0R7fFyq86Fn-p6Xk767i0AXJI8a7H7GNKMPwuc5NJ3BtWcbWx8M_DKKNVO58wMO2d9_Q13-qjlmX44h0ml_GqtqSqkZS7wz3Bg2jPT3Q2yc7Ijm9rxqr1UvbGLg
x-tenant-code: jint
Content-Type: application/json
{
  "viewType": "list_only",
  "durationFormat": "seconds",
  "exportFields": "all",
  "format": "csv"
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "8619135f0189ecf1c6c9c401b26c281e",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "result": {}
}