Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

POST Requests using the REST API connector?

Accepted answer
42
Views
4
Comments

Has anyone had success creating API calls using the POST method in OAC's REST API connector? It seems to handle GET requests since they only require a single URL string. However, a POST request that requires some parameters will not connect for me. I tried uploading a JSON file that included the parameters and I've tried a simple JSON file with just the URL, but every way I have tried I get an error (Invalid Connection Details).

Can this connector handle POST requests?

Tagged:

Best Answer

  • Hi,

    The "Rest API" connection type is still flagged as "preview". I believe it only does GET "by design".

    By default, an API, expects POST when creating an entity, while to read something GET is used. Therefore supporting only GET isn't shocking I would say (my opinion of course). That's why the screen doesn't mention anywhere the method, it does just send a GET.

    Have you checked in https://community.oracle.com/products/oracleanalytics/categories/idealab-oracle-analytics-cloud-server if there is maybe an idea requesting to support POST? If you find it, up-vote it and maybe post a comment supporting it (that will also bring the idea back on top of list, giving it more visibility for others to up-vote).

    If there isn't an idea yet about this, create one.

    While I imagine a majority of users are fine with GET, it could be interesting to let the user choose the HTTP method. That would also open the door to some "out of the box" usages of that connector, using it as trigger to initiate other processes by doing a POST request as result of something else, or maybe even do UPDATE and DELETE and that kind of things.

Answers

  • Micah Johnson
    Micah Johnson Rank 3 - Community Apprentice

    Hi,

    Thank you for your reply. I will explore the idea lab and post an idea if there isn't one yet.

    In addition to creating entries, POST requests also allow for complex request bodies and filtering structures. Some large datasets that will require scripts to cycle through multiple pages require POST requests.

    It's along these lines that having the REST connector be able to handle POST requests would be really helpful bringing in more complex datasets.

    Thanks again, and I'll post the idea.

    Micah

  • Once you found or created the idea, post back the link in here: it could drive some extra up-votes :)

  • Micah Johnson
    Micah Johnson Rank 3 - Community Apprentice

    I did not find an existing idea, so I posted a new one here:

    Add functionality to REST API connector to handle POST requests — Oracle Analytics