(Sql View) Replace IDs with UIDs in Sql view execution

Registered by jason.p.pickering on 2012-08-29

A typical automation workflow might be to retrieve some data from the WebAPI through an SQL View. You might have a situation where you would run the datamart, wait for the process to complete, and then start to retrieve data from pre-defined SQL views. There is currently no way to get the internal ID of the SQL view. For instance, http://apps.dhis2.org/dev/api/sqlViews/dI68mLkP1wN will give us the UID. If we need to execute the view with curl, we might use something like curl "http://apps.dhis2.org/dev/
dhis-web-maintenance-dataadmin/
executeSqlViewQuery.action?id=1150154". Problem is, this internal ID paramater is not available. It would be good to have a seperate paramter uid available, so that we could execute something like curl "http://apps.dhis2.org/dev/
dhis-web-maintenance-dataadmin/
executeSqlViewQuery.action?uid=dI68mLkP1wN

Alternatively, in this particular use case, the internal ID would be sufficient. But, there seems to maybe be other reasons why one might want the stable UID.

Blueprint information

Status:
Complete
Approver:
Lars Helge Øverland
Priority:
Undefined
Drafter:
jason.p.pickering
Direction:
Needs approval
Assignee:
Lars Helge Øverland
Definition:
Approved
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
milestone icon 2.10
Started by
Lars Helge Øverland on 2012-08-29
Completed by
Lars Helge Øverland on 2012-08-29

Related branches

Sprints

Whiteboard

Sql views can now be created through the Web API with a POST request e.g. to

/api/sqlViews/dI68mLkP1wN/execute

Will return 201 if OK, 409 if the sql view could not be created and
404 if the uid is not referring to an existing sql view.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.