Skip to content
This repository was archived by the owner on Aug 14, 2019. It is now read-only.
This repository was archived by the owner on Aug 14, 2019. It is now read-only.

Maybe find a better name for /site/? #14

@felixarntz

Description

@felixarntz

I'm a bit confused by the name /site/ for that endpoint, since when we talk about sites in WordPress, we usually mean sites of a network (multisite). This will especially become confusing once we get multisite-specific endpoints in (/sites/<id>/ and /networks/<id>/).

A first alternative idea would be /site-options/ or /site-settings/. However I already got a response on Slack that /site-options/ wouldn't be perfect either since there is a database table of that name that denotes network options (yeah, we don't use the site-options terminology there, but still not optimal).

An alternative to finding a new name could be to provide parity with what a specific /sites/<id>/ response could look like later and include the options as an addition.

For example:
Let's say we have a multisite where http://example.com is the main site and there is another site called http://subsite.example.com with site ID 2. When we access http://example.com/wp-json/wp/v2/sites/2, we would get basic data for that site, similar with what a WP_Site object currently contains. To then access more specific details on that site, we would need to call http://subsite.example.com/wp-json/wp/v2/site/. However the latter should also include everything that the MS endpoint includes (like ID, domain, path and network ID), but then additionally include all the settings for the site.

I'm not completely convinced of either solution, but I think we should think about this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions