You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs say that if I want to update a Collection's visibility - to, say, public - I need to send {"visibility": 1} to the /api/collections/{alias} endpoint in a POST request.
However, that doesn't work.
Steps to reproduce
❯ curl -s "http://localhost:9080/api/collections/algernon" \
-H "content-type: application/json" \
-H "Authorization: Token ${TOKEN}" \
-X POST -d '{"visibility":1}'
{"code":400,"error_msg":"Supply some properties to update."}
Workaround
Digging around in the source, I discovered that I need to use the public property for this. That works.
Expected behaviour
However, when retrieving a collection's info, public is serialized as a bool, so I have no way of knowing whether the blog is unlisted, private, or password protected. The only state I can be sure of is if public: true, then the collection is public. If it is false, it can be either of the three.
It would be nice if the API matched the documentation, and that if visibility would be included in the collection properties in response to a GET request to /api/collections/{alias}. Keeping public there too, for compatibility is fine too. I just wish I could both retrieve the full range of visibility settings, and set them consistently: with the same key, and same type as they are retrieved.
The text was updated successfully, but these errors were encountered:
The docs say that if I want to update a Collection's visibility - to, say, public - I need to send
{"visibility": 1}
to the/api/collections/{alias}
endpoint in aPOST
request.However, that doesn't work.
Steps to reproduce
Workaround
Digging around in the source, I discovered that I need to use the
public
property for this. That works.Expected behaviour
However, when retrieving a collection's info,
public
is serialized as a bool, so I have no way of knowing whether the blog is unlisted, private, or password protected. The only state I can be sure of is ifpublic: true
, then the collection is public. If it is false, it can be either of the three.It would be nice if the API matched the documentation, and that if
visibility
would be included in the collection properties in response to aGET
request to/api/collections/{alias}
. Keepingpublic
there too, for compatibility is fine too. I just wish I could both retrieve the full range of visibility settings, and set them consistently: with the same key, and same type as they are retrieved.The text was updated successfully, but these errors were encountered: