data.gov icon indicating copy to clipboard operation
data.gov copied to clipboard

Implement Routes from design

Open rshewitt opened this issue 1 year ago • 3 comments

User Story

In order to have an app which facilitates the creation, updating, reading, and deleting of records in our harvest database,datagov wants take the outcome from our route design session and implement them in our existing flask app.

  • Planning documentation: https://docs.google.com/document/d/1XzfTrPxu-asJ_55GoeZ2UOJsie9CuCegStS28BAL_40/
  • Flask app route documentation: https://docs.google.com/document/d/1XQFmHDtpCEPwM1JsvgOmeKKmxcUwr7EvP4EWowWnq6U

Acceptance Criteria

[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]

  • [ ] GIVEN a route design session has been completed
    AND a list of routes have been decided to be implemented
    AND the business logic of the routes are complete WHEN a given route is interacted with
    THEN the response reflects the business logic.

Background

parent ticket #4634 deleted route in flask app #4644

Security Considerations (required)

[Any security concerns that might be implicated in the change. "None" is OK, just be explicit here!]

Sketch

  • [ ] get a route from the list and add it to the flask app
  • [ ] update the db interface as necessary

rshewitt avatar Mar 13 '24 17:03 rshewitt

Here are the three routes to get the harvest_source:

returns a list of all harvest sources /harvest_source

get all harvest sources of an organization /harvest_source/?organization_id={org_id}

return a single harvest source /harvest_source/{source_id}

Tested examples:

curl -L "https://harvester-dev-datagov.app.cloud.gov/harvest_source/?organization_id=e1301d69-d747-4040-9e31-bba7c9508fb9"

curl -L "https://harvester-dev-datagov.app.cloud.gov/harvest_source/0e22cdb1-c2ce-4bf7-9187-9ab105f2efda"

@btylerburton Please let me know if there is any issue when calling from your UI.

Jin-Sun-tts avatar Mar 25 '24 20:03 Jin-Sun-tts

The following routes (with blue color) are done, you may check and test them on https://harvester-dev-datagov.app.cloud.gov/

Image

Jin-Sun-tts avatar Apr 02 '24 17:04 Jin-Sun-tts

Added related routes for harvest_record.

Marked all Implemented routes in this doc https://docs.google.com/document/d/1XQFmHDtpCEPwM1JsvgOmeKKmxcUwr7EvP4EWowWnq6U/edit

The basic delete cascade route are here, but need to add ckan api calls to delete children datasets. Will finish it in #4644

Jin-Sun-tts avatar Apr 03 '24 16:04 Jin-Sun-tts