Ghost: Content API V2: change /users to /authors

Created on 25 Oct 2018  ·  7Comments  ·  Source: TryGhost/Ghost

_(refs #9866)_

This is a change for API v2 only.
The Content API should change /users/ to /authors/.

This implicitly makes this possible in V2:

routes.yaml

routes:
  /test/:
    data: author.slug

theme helper

{{#get "authors"}}
api server / core

Most helpful comment

There's a subtle difference to the intention of this change, which I think got lost in my documentation - sorry. The intention is that instead of having users available from the Content API, we will have authors.

The definition of authors is "users who have written at least one post".

So we also want to change the endpoints to be /authors/.

All 7 comments

@kirrg001 I think there is _another_ use case besides the Content API…

I'm a fairly new Ghost(Pro) user and submitted today a support request where I asked if it was possible to not list authors with no posts in the XML sitemap:

[…] I'd like to know if Ghost(Pro) developers team would consider modifying the current behavior and make suitable changes so that some authors (e.g., admins) would not be listed in the "https://yourdomain.example/sitemap-authors.xml" file?

I really don't want to be indexed as a potential author by robots, you know. One way I can think of would be to skip authors who haven't authored a single post yet. Is this doable?

I guess this all happens here.

🐛 The title should read "Content API V2: Don’t return authors or tags with no posts"

There's a subtle difference to the intention of this change, which I think got lost in my documentation - sorry. The intention is that instead of having users available from the Content API, we will have authors.

The definition of authors is "users who have written at least one post".

So we also want to change the endpoints to be /authors/.

So we also want to change the endpoints to be /authors/.

Makes sense. These two changes belong together 👍

Prio 1: /authors/
Prio 2: Don't return tags/authors with no posts

don't return tags/authors with no posts

That is not easy to fix, because filter=count.posts:>0 does not work.

We've created a new issue for "do not return authors/tags without posts" - see. This has a much bigger underlying architecture problem now that we support multiple api versions. Have a read.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PaszaVonPomiot picture PaszaVonPomiot  ·  3Comments

kirrg001 picture kirrg001  ·  3Comments

ss4344 picture ss4344  ·  4Comments

mattferderer picture mattferderer  ·  4Comments

albizures picture albizures  ·  3Comments