dmi-tcat icon indicating copy to clipboard operation
dmi-tcat copied to clipboard

The API query manager input format - why not parameters?

Open matnel opened this issue 7 years ago • 2 comments

I was checking the API scripts and observed they used some rewriting rules. I think it would be more consistent with the rest of the project to work via get/post parameters.

However, before making a pull request on this, I want to confirm if there's something I don't know about the API side which I should take into account when making the changes.

matnel avatar Mar 09 '17 10:03 matnel

Hi @matnel

The API has been designed to work with paths up till the point of performaning operations such as exporting data. For example, a request to the base URL: /api/querybin.php/trump/hashtags can contain REQUEST parameters to get the top hashtags during a certain timeframe. So the base URL contains the path to the data source, while the GET/POST parameters contain the requested operation. The API has a CLI counterpart (with a subset of the features of the HTTP mode), so any changes made to its structure shouldn't break it. Additionally, there is a graphical front-end to the API which allows to navigate the mentioned base path, ie. the hierarchy of bin name -> entitity type -> date selection (we need to push some code for this btw. & will do this today).

The final API functions actually do take identical parameters to those the modules under /analysis/ take. With that in mind, I'm curious to your idears.

Cheers,

Emile

dentoir avatar Mar 13 '17 11:03 dentoir

Ping

ErikBorra avatar Sep 18 '17 14:09 ErikBorra