Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

HTTP Action - POST method download tool

AKPWZ
8 - Asteroid

How can I pass "payload" to the download tool in a POST request?

 

I'm doing something like this but it's not working for me!

AKPWZ_2-1661423482958.png

 

 

AKPWZ_0-1661423445526.png

 

Getting this error:

AKPWZ_3-1661423668135.png

 

 

5 REPLIES 5
Kakuffo
Alteryx
Alteryx

hi @AKPWZ  have you tried entering all of the parameters as seperate entries under the payload section.

Kakuffo_0-1661425551633.jpeg

There should be guidance as part of the API offering to help with this.

AKPWZ
8 - Asteroid

Hi @Kakuffo I have tried it, it's not working for me. :(

patrick_digan
17 - Castor
17 - Castor

@AKPWZ APIs can be really challenging, especially since error messages don't tell you what's wrong! Based on your first screenshot (thanks for including!), it looks like this page details all the requirements for your api call. You'll want to have 3 items in your header (Authorization, Key, Content-Type). Something like this:

patrick_digan_2-1661519927635.png

Assuming you have that sorted out, the payload will need to be one of the 2 bottom boxes (either a field or text written into the download tool):

patrick_digan_0-1661519206979.png

 

I don't think you can use the top 2 boxes since you're giving it JSON. It may be easiest to just start with the bottom box and enter the info. From the example on their help doc page, you would enter something like this into the bottom box of the download tool:

 

{
    "reportingEngine": "OUTBOUND_MESSAGE",
    "report": "OUTBOUND_MESSAGE",
    "startTime": "1569436200000",
    "endTime": "1572028199999",
    "timeZone": "Asia/Kolkata",
    "pageSize": "20",
    "page": "0",
    "groupBys": [
        {
            "heading": "POST_ID",
            "dimensionName": "POST_ID",
            "groupType": "FIELD",
            "details": null
        },
        {
            "heading": "CAMPAIGN_ID",
            "dimensionName": "CAMPAIGN_ID",
            "groupType": "FIELD",
            "details": null
        },
        {
            "heading": "ACCOUNT_ID",
            "dimensionName": "ACCOUNT_ID",
            "groupType": "FIELD",
            "details": null
        }
    ],
    "projections": [
        {
            "heading": "TOTAL_ENGAGEMENT",
            "measurementName": "TOTAL_ENGAGEMENT",
            "aggregateFunction": "SUM"
        }
    ],
    "filters": [
        {
            "filterType": "IN",
            "dimensionName": "CLIENT_ID",
            "values": [
                5,
                19,
                14,
                34,
                6,
                27,
                7,
                2,
                8,
                23,
                4,
                20,
                1,
                3,
                9,
                "-1",
                "-1"
            ],
            "details": {
                "accessible": true
            }
        },
        {
            "filterType": "IN",
            "dimensionName": "ACCOUNT_ID",
            "values": [
                999998,
                999988,
                600001371,
                600001518,
                600001103,
                600001111,
                600001522,
                600001701,
                600001376,
                600002030,
                600001112,
                "978657890",
                "999998",
                "999999",
                "-65537",
                "-10",
                "978657890"
            ],
            "details": {
                "accessible": true
            }
        }
    ],
    "additional":{
        "RESOLVER_SKIP_FIELDS":"POST_ID"
    },
    "jsonResponse":true
}

 

 

Here is what the payload tab of the download tool would look like:

patrick_digan_1-1661519768555.png

 

 Most of the above is listed as required. You'll obviously have to swap in your info to replace the info in the example. Hopefully that helps get you past the error! 

AKPWZ
8 - Asteroid

Hi @patrick_digan thank you so much for your response.

I have tried the same thing and this is what I'm getting as an output. 
Don't know what to do

AKPWZ_0-1661752524095.png

AKPWZ_1-1661752866094.png

 

 

patrick_digan
17 - Castor
17 - Castor

@AKPWZ bummer! The only thing I can think of is that something with your JSON is just a little off.

Labels
Top Solution Authors