Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Nprinting experts
I'm using the Qlik NPrinting CLI Powershell module
My requirement is to call the API and set the value of a numeric filter
In this example the value I want to set is 12
the ID of the filter is 5af39708-f25f-4f58-91de-bcb8ceffa80b
My Connect-NPrinting command works so dont think there is issue there
However the rest of the command comes back with "bad request"
I think the syntax is completly wrong but I'm not sure where the error is
looking for someone who has maybe done this via powershell and can share some code
appreciate that QlikNPrinting-CLI is not fully supported by Qlik but thought I ask
Connect-NPrinting -Computer https://servername -TrustAllCerts
$DataJSON = '12' |ConvertTo-Json
Invoke-NPRequest -method Put 'filters/5af39708-f25f-4f58-91de-bcb8ceffa80b' -Data $DataJSON
thanks
Paul
Hi,
Example of a valid body for the POST request /filters:
{
"appId": "your app Id",
"enabled": true,
"name": "Created via API",
"description": "Example of a filter created via API Postman",
"fields": [
{
"connectionId": "your connection Id",
"name": "Fiscal Year",
"overrideValues": false,
"selectExcluded": false,
"values": [
{
"value": "2013",
"type": "number"
}
]
}
],
"variables": []
}
Best Regards,
Ruggero
Hi,
Example of a valid body for the POST request /filters:
{
"appId": "your app Id",
"enabled": true,
"name": "Created via API",
"description": "Example of a filter created via API Postman",
"fields": [
{
"connectionId": "your connection Id",
"name": "Fiscal Year",
"overrideValues": false,
"selectExcluded": false,
"values": [
{
"value": "2013",
"type": "number"
}
]
}
],
"variables": []
}
Best Regards,
Ruggero