-
Notifications
You must be signed in to change notification settings - Fork 16
Sources support in job API #166
Comments
I'll add a separate ticket about API authorization (user tokens) |
@roll I think this will actually take less than 1 day but just in case. Let me know what you think. @brew Would that fit your use case? Note that the create job endpoint would return an id that allows you to check the status of the job and the report once finished. Eventually I want to add supports for webhooks as well |
@amercader For example adding new source. What does it mean for non github/s3 random files? There should be designed new taxonomy of this source types and/or special format for storing source configurations. Or something like this. Also even base task description requires some user authentication system - to get user source list etc. Without it not sure how to regulate access to sources. So based on our initial discussion not sure why just don't repair We need only a few hours to make it work again and restrict access by api_access_key for example. |
@roll sorry, perhaps I wasn't clear on my original description of the issue. I think there should not be any special taxonomy or model for API sources, you can validate web accessible files passing a job configuration. There is no path computation, so paths in Jobs created via
Yes, all these endpoints require authorization even listings or object details. This will be done via an API token that must be included in a header on all requests ( We don't bother about UI for these sources for now (the job reports will be available if you navigate to them directly, we can restrict access by default to all users except the one who created the source. This seems pretty straight-forward to me, perhaps not 1 day of work if we include authorization but nothing too complicated if we stick to a simple use case for the first iteration. In any case don't work on this quite yet because GODI doesn't need it immediately so you can pick other beta tasks. |
@amercader Still not sure why we need such mechanism for Beta but it sounds promising as the general mechanism for random jobs if you prefer it over just providing access to |
@amercader I'm having trouble following between this and #168 which @roll links to as a possibility that already works, and the above comment from @roll that says "If not - just close #168 and we're good to go to serve GODI jobs anyway." I need a tl;dr: can GODI hit an endpoint on gt.io to validate data, and then extract the report, and if so, how, and if not, when. |
Tl;DR:
So GODI can start using the endpoint now, but eventually will have to change the requests slightly when #166 is implemented. |
thanks @amercader and cc @brew |
So possible actions:
So based on our situation 1 or 2 should be easy choice (with backlogging #166). |
We'll do 2, 3 is backlogged but a requirement for whenever we want to make the API public (which will require proper auth anyway) |
We currently have the following endpoints:
GET /api/job
- Job listGET /api/job/<id>
- Job detailsPOST /api/job
- Create jobTo allow third party apps to create validation jobs we need to enforce that jobs created via the API have a Source (and provide a way to create sources). This is important to aggregate the jobs conceptually. For instance a source could be a single app (eg the Global Open Data Index) or a single dataset within an app (eg each of the tabular resources in a CKAN instance)
We need to add:
GET /api/source
- (Your) Sources listGET /api/source/<id>
- Source detailsPOST /api/source
- Create source(optionally)
POST /api/source/<id>
- Update source (or PUT)DELETE /api/source/<id>
- Delete source (but this needs thought, eg what happens to existing jobs, other users)Then, to create a job we have two options:
POST /api/job
and enforce asource_id
input parameterPOST /api/source/<id>/job
2 seems more RESTful but I don't mind it that much.
The text was updated successfully, but these errors were encountered: