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

REST API: Store Performance Endpoint #912

Closed
timmyc opened this Issue Nov 23, 2018 · 0 comments

Comments

2 participants
@timmyc
Copy link
Collaborator

timmyc commented Nov 23, 2018

Prior Discussion: p90Yrv-Rv-p2

screen shot 2018-10-25 at 7 56 55 pm

The post linked above, and the design snapshot give a good glimpse into the why/need behind this issue. Essentially the end-goal is to have one REST endpoint that we, and other application developers can use to retrieve all related store performance stats for a given time period.

Thinking the following arguments should be supported:

before: Retrieve performance stats for the dates before this
after: Retrieve stats for dates after this
stats[]: comma-seperated/array of stats to retrieve

The final argument I think might need to include a "namespace" of sorts to tie into the related stat endpoint. I.E. if I wanted to retrieve the stat totals for average order value ( order report ), and total shipping ( revenue report ), I would request something like orders/avg_order_value,revenue/shipping as the stats in the request.

When discussing this at the meetup, we felt that using rest_do_request() to get the stat totals requested from the various endpoints seemed like a reasonable, and extendible way to build this out - but I'm absolutely open to other suggestions and approaches.

The other idea was that an OPTIONS request to this endpoint would return all the associated "totals" / performance indicators that are supplied in the various /reports/$object/stats endpoints.

/cc @claudiosanches @peterfabian

@timmyc timmyc added this to Project Backlog 🔙 in Isotope Nov 26, 2018

@timmyc timmyc moved this from wc-admin Backlog 🔙 to 🛋Sprint 10 Backlog in Isotope Dec 26, 2018

@justinshreve justinshreve self-assigned this Jan 3, 2019

Isotope automation moved this from 🛋Sprint 10 Backlog to 🛋Sprint 10 Done Jan 9, 2019

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