Skip to content

Instantly share code, notes, and snippets.

@wookiehangover
Created April 13, 2012 16:11
Show Gist options
  • Save wookiehangover/2378003 to your computer and use it in GitHub Desktop.
Save wookiehangover/2378003 to your computer and use it in GitHub Desktop.
Reports/Modules CRUD

Reports CRUD

{

  project_id: 1234,

  title: "Foobar",

  description: "...",

  query: "?param=value",

  modules: [ ... ]

}

GET /reports

GET /reports/[report-id]

POST /reports

(the google doc specifies the route as /reports/[project-id]/new, which is OK too, but let's talk more on this detail)

PUT /reports/[report-id]

DELETE /reports/[report-id]

NB: returning all report modules as a JSON array seems like the best way to go for now.

RPC Style endpoints:

GET /project/[project-id]/reports

GET /reports/[report-id]/modules

Modules CRUD

GET /modules/[module-id]

POST /modules

PUT /modules/[module-id]

DELETE /modules/[module-id]

@wookiehangover
Copy link
Author

PUT and DELETE might need to be POST's with a _method parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment