Importers managed through the API should have basic functionality #153
carlosthe19916
started this conversation in
General
Replies: 2 comments 4 replies
-
|
We already have that partially, I think it makes sense to check what's there. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Somewhat a tangent, but how do we feel about singular-vs-plural? Should we PUT to Should we GET from |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Current status
/api/v1/importer/{name}Questions:
Proposal
In my opinion there are 2 abstractions that should be decoupled:
Importer: contains the configuration of where and how files should be fetched. e.g. serverUrl, credentials, etc. No other info should be there.TaskorExecution: contains information about a single execution of animporterThe idea is that a single importer can be executed multiple times. Otherwise we will need to create a new importer every time we need to import data.
Here are more details:
POST /importers:{ "source": "http://myurl.com", }POST /tasks{ "importerId": 1, // This is the id of the importer we want to execute }POST /tasks{ "importerId": 1, // This is the id of the importer we want to execute "cron": "0 0 1 * *"For monitoring the status a task we can do:
GET /tasks?status=scheduled|runningThis should return a list of tasks running in the system. Note that multiple tasks could be running at the same time
For canceling a task we can do
PUT /task/{taskId}{ "id": 1, "status": "cancel" }Beta Was this translation helpful? Give feedback.
All reactions