API for Requests only returns 404 Not Found

Jonatan

Gold Partner
Joined
Dec 15, 2020
Messages
3
Reaction score
0
We are currently using 3CX version 20, and when attempting to access the endpoint /xapi/v1/ReportCallLogData/Pbx.DownloadCallLog, we are receiving a 404 error.

We have tried including all the required parameters.

Below is an example of what we have been testing:

url = "https://3CX_FQDN/xapi/v1/ReportCallLogData/Pbx.DownloadCallLog"

params = {
"periodFrom": "2024-10-18T00:00:00Z", # Example: "2023-01-01T00:00:00Z"
"periodTo": "2024-10-28T00:00:00Z", # Example: "2023-01-31T23:59:59Z"
"sourceType": "extension", # Example: "extension", "trunk"
"sourceFilter": "", # Source filter
"destinationType": "extension", # Example: "extension", "trunk"
"destinationFilter": "9001", # Destination filter
"callsType": "all", # Example: "all", "missed"
"callTimeFilterType": "all", # Call time filter type
"callTimeFilterFrom": "", # Start time of the time filter
"callTimeFilterTo": "", # End time of the time filter
"hidePcalls": False, # Hide missed calls
"clientTimeZone": "UTC" # Example: "UTC"
}

Final url

Request example: curl -v --location 'https://3CX_FQDN/xapi/v1/ReportCallLogData/Pbx.GetCallLogData(periodFrom=2024-10-18T00:00:00Z,periodTo=2024-10-28T00:00:00Z,sourceType=extension,sourceFilter="",destinationType=extension,destinationFilter=9001,callsType=all,callTimeFilterType=all,callTimeFilterFrom="",callTimeFilterTo="",hidePcalls=false)?$top=50&$skip=0&$count=true' --header 'Accept: application/json' --header 'Authorization: Bearer api_token'
 
Periods are strings, enclose them in ' '
 
Hello again,

I tried to put the '', like this:

'https://xxx.xxxxxxxx.xx/xapi/v1/Rep...hidePcalls=false)?$top=50&$skip=0&$count=true'

But again error 404.

I've checked the .yaml that have the decripion of all the parameters type and requirements and there are some integer like sourceType and destinationType.

So the url transforms into this:

'https://xxx.xxxxxxx.xx/xapi/v1/Repo...hidePcalls=false)?$top=50&$skip=0&$count=true'

But same, error 404. Any ideas?

Thanks in advance
Probably missing other stuff or properties/arguments are not valid.
 
  • Like
Reactions: NatalyS_3CX