Skip to content

Latest commit

 

History

History
154 lines (90 loc) · 3.98 KB

api_urls_draft.md

File metadata and controls

154 lines (90 loc) · 3.98 KB

API endpoints

Language used as GET parameter anywhere

/notifications

  • send #26

/account

  • register #9
  • update user info #11

Hearings

/api/v1/hearing/

List hearings, get detail. Anonymous access.

  • get next closing hearings #1 /api/v1/hearing/[hearingID]/?nextclosing
  • list all #4 /api/v1/hearing/
  • search/filter #5 /api/v1/hearing/[hearingID]/?filter=foo&search=bar
  • order #6 /api/v1/hearing/?orderby=[foo]
  • get location #7 /api/v1/hearing/[hearingID]/
  • get detail #8 /api/v1/hearing/[hearingID]/
  • top hearings #2 /api/v1/hearing/?newest=N

List comments, introductions, scenarios, images.

  • list all comments added to hearing #28 /api/v1/hearing/[hearingID]/comments/
  • list all introductions added to hearing #25 /api/v1/hearing/[hearingID]/introductions/
  • list all images added to hearing #37 /api/v1/hearing/[hearingID]/images/
  • list all scenarios added to hearing #21 /api/v1/[hearingID]/scenarios

Add comment, introduction, scenario, image.

  • add comment to hearing #28 /api/v1/hearing/[hearingID]/comment/
  • add introduction to hearing #25 /api/v1/hearing/[hearingID]/introduction/
  • add scenario to hearing #21 /api/v1/hearing/[hearingID]/scenario/
  • add image to hearing #18 /api/v1/hearing/[hearingID]/image/

Follow hearing. User is authenticated.

  • add follower to a hearing #10 /api/v1/hearing/[hearingID]/follow/

/api/v1/hearing/

List hearings. Get detail. Create, update, delete. Authenticated user at /api/v1/hearing/[hearingID]/ :

  • list all by owner #15 /api/v1/hearing/?createdby=[userID]
  • CRUD #15
  • disable/enable comments #16
  • set map #17
  • set commenting options #22

Reports

/api/v1/reports/

List reports. Get detail.

  • top reports /api/v1/reports/?newest=N
  • get report #24 /api/v1/reports/[hearingID]

Images

/api/v1/images/

Or move to /api/v1/hearing/[hearingID]/image/[imageID]/

Get detail. Update, delete.

  • Get detail. Update, delete #18 /api/v1/images/[imageID]

Scenarios

/api/v1/scenario/

Or move to /api/v1/hearing/[hearingID]/scenario/[scenarioID]/

Get detail. Update, delete.

  • get detail about scenario #21 /api/v1/scenario/[scenarioID]
  • update and delete scenario #25 /api/v1/scenario/[scenarioID]

List images, comments.

  • list all added to scenario /api/v1/scenario/[scenarioID]/images/
  • list comments of a scenario #27 /api/v1/scenario/[scenarioID]/comments/

Add image, comment.

  • add image to scenario #40 /api/v1/scenario/[scenarioID]/image/
  • add comment to scenario #27 /api/v1/scenario/[scenarioID]/comment/

Introductions

/api/v1/introduction/

Or move to /api/v1/hearing/[hearingID]/introduction/[introductionID]/

Get detail. Update, delete.

  • get detail about introduction #25 /api/v1/introduction/[introductionID]
  • update and delete introduction #25 /api/v1/introduction/[introductionID]

List images.

  • list all added to introduction /api/v1/introduction/[introductionID]/images/

Add image.

  • add image to introduction #40 /api/v1/introduction/[introductionID]/image/

Comments

/api/v1/comments/

Or move to /api/v1/hearing/[hearingID]/comment/[commentID]/

Vote. Update or delete.

  • add a vote #31 /api/v1/comments/[commentID]/vote/?voter=[userID]
  • get detail (with number of comments) /api/v1/comments/[commentID]
  • Update, delete /api/v1/comments/[commentID]

Follow comment. User is authenticated.

  • add follower #10 /api/v1/comments/[commentID]/follow/

TODO:

/hearing/processing

/hearing/processing/step

  • list #20
  • get detail #20

/comment/hearing/top

  • top actively commented hearings #3

/comment/service

  • add comments about service itself #35

/api/v1/labels/

List labels. Get detail. Create, update.

  • list /api/v1/labels/?hearing=[hearingID]
  • CRUD #23 /api/v1/labels/[labelID]