Welcome to Knowage Q&A, where you can ask questions and receive answers from other members of the community.
0 votes
1 view

I'm trying to download a document as PDF file using RESTful API.

For RESTful API to get document content,   for example ,  https://private-anon-d655540b4a-knowage.apiary-mock.com/knowage/restful-services/2.0/documents/document_label/content  ,

But I cannot understand the parameters.

[
  {
    "id": "1",
    "label": "Country",
    "type": "string",
    "urlName": "country",
    "values": [
      "Italy",
      "USA"
    ]
  }
]

for parameter 'urlname' and 'values', it says they are madatory.  Not understand what it stands for.

Can anyone provide an example how to use this API? Thanks very much

in API and SDK by (120 points)

1 Answer

0 votes

urlname and values refer to the document's parameters.

If you don't have any parameters, you can just simply do not sent any body payload.

If you want to know more about document's parameters, analytical drivers, and behavioural model, please have a look at the available documentation.

by (15.2k points)
OK. Understood.   But I still failed and get below message.  I login as admin still no permission to execute the document.  Any idea?

{"service":"","errors":[{"message":"User [Administrator] has no rights to execute document with label [agent_kpi_demo]"}]}

Btw,  I just want to export document automatically, Any suggestion?  Thanks!
I tried to do it according to your description but ran out of exception.

ex:
{"service":"","errors":[{"message":"User [Admin] has no rights to execute document with label [monitor_operation]"}]}
I have the same error (but I'm sure the user HAS the rights to execute the document: i can successfully execute it by the knowage web application).

Is this a bug in the API?
...