Posts: 81
Joined: Fri Jan 06, 2017 12:50 pm

Postby awasu.user » Thu Jul 27, 2017 6:36 pm

Calling API:

http://localhost:2604/reports/create?fo ... &token=xxx

I try create report, but I get

Code: Select all

"errorMsg": "Missing request data."

In doc is

Code: Select all

<dataSource type="channelFolders" markItemsAsRead="yes" groupByChannel="yes" includeItems="all" includeSubFolders="no">
    <channelFolder id="..."> ... </channelFolder>

but how pass it by post in URL? I know how make post in python, but I can't how it should be look in URL?
datasource@type=channelFolder&datasource@markitemsread=yes ?

User avatar
Site Admin
Posts: 3021
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia

Postby support » Thu Jul 27, 2017 10:40 pm

You have to send an HTTP POST request; if you embed the parameters in the URL, it will be sent as an HTTP GET.

For example:

Code: Select all

import urllib.request

data = b"""<channelReport>
    <name> My New Report </name>
    <dataSource type="channelFilter">
        <channelFilterName> All </channelFilterName>

url = "http://localhost:2604/reports/create"
req = urllib.request.urlopen( url , data=data )
print( )

Return to “Awasu - Extensions”

Who is online

Users browsing this forum: No registered users and 2 guests