Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use https://github.com/interagent/http-api-design to create list of API design improvements #6158

Closed
diosmosis opened this issue Sep 8, 2014 · 1 comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. duplicate For issues that already existed in our issue tracker and were reported previously. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@diosmosis
Copy link
Member

The link in the title is a list of HTTP API guidelines used by Heroku. It may have many useful ideas that can be implemented in Piwik.

https://github.com/interagent/http-api-design

Foundations
    Require TLS
    Version with Accepts header
    Support caching with Etags
    Trace requests with Request-Ids
    Paginate with ranges
Requests
    Return appropriate status codes
    Provide full resources where available
    Accept serialized JSON in request bodies
    Use consistent path formats
    Downcase paths and attributes
    Support non-id dereferencing for convenience
    Minimize path nesting
Responses
    Provide resource (UU)IDs
    Provide standard timestamps
    Use UTC times formatted in ISO8601
    Nest foreign key relations
    Generate structured errors
    Show rate limit status
    Keep JSON minified in all responses
Artifacts
    Provide machine-readable JSON schema
    Provide human-readable docs
    Provide executable examples
    Describe stability
@mattab mattab added this to the Mid term milestone Sep 8, 2014
@mattab mattab added the Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. label Sep 8, 2014
@mattab mattab modified the milestones: Long term, Mid term Oct 11, 2014
@mattab mattab added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. labels Oct 11, 2014
@mattab mattab modified the milestones: Long term, Mid term Dec 23, 2015
@mattab
Copy link
Member

mattab commented May 6, 2016

Refs Build a RESTful API for Piwik #6000

@mattab mattab closed this as completed Jul 8, 2016
@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label Jul 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. duplicate For issues that already existed in our issue tracker and were reported previously. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

2 participants