Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Need better consistency in URLs #67

Open
rossjones opened this issue Sep 16, 2016 · 2 comments
Open

Need better consistency in URLs #67

rossjones opened this issue Sep 16, 2016 · 2 comments

Comments

@rossjones
Copy link
Contributor

rossjones commented Sep 16, 2016

GPs = /organisation_name?organisation_name=
Pharmacies are /name?organisation_name=
Dentists are /name?name=

Let's simplify to /service/health/?name=

Should also be consistent in parameter names so that city means city everywhere in filters.

data.gov.uk/data/api/service/health/?name=
data.gov.uk/data/api/service/health/?city=
data.gov.uk/data/api/service/health/?county=
data.gov.uk/data/api/service/health/?postcode=

This should be mostly fixing ETL to normalise the naming.

@matthew-shaw
Copy link

Couldn't have put it better myself 😉

@rossjones
Copy link
Contributor Author

rossjones commented Oct 24, 2016

Implemented the first part of this (use name= instead of organisation_name=) in datagovuk/api_etl@f000f7a

Did raise the issue on naming though, currently we have

/data/api/service/health/dental_practices/partial_postcode?partial_postcode=M1

and there's really no reason we couldn't instead just go with ..

/data/api/service/health/dental_practices?partial_postcode=M1

It's a lot cleaner and guessable.

Because the tables are auto-generated, we also need...

ALTER TABLE clinics RENAME COLUMN organisation_name TO name;
ALTER TABLE gp_surgeries RENAME COLUMN organisation_name TO name;
ALTER TABLE hospitals RENAME COLUMN organisation_name TO name;
ALTER TABLE pharmacies RENAME COLUMN organisation_name TO name;
ALTER TABLE social_care_locations RENAME COLUMN organisation_name TO name;

Don't deploy yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants