maximumentropy 23 Posted March 29, 2021 Share Posted March 29, 2021 Hi, I'm putting the finishing touches on an Ansible playbook to create and install a letsencrypt TLS certificate for my Emby server. Since the server doesn't seem to recognize the updated certificate file until restarted, when the cert has changed I'm using the /System/Restart API mentioned in this thread: First of all, the API is really great and made implementing this restart really simple. I have a question about the response codes from this API call. The Swagger documentation only specifies one successful response: 200 Operation successful. Response content unknown. What I'm getting back from the server is instead a 204 code. This seems entirely reasonable, as this apparently means there is no content returned for my request: https://httpstatuses.com/204 Is the 204 response expected, or does it indicate that I'm doing something odd in my API call? If this response is expected, should it be mentioned in the Swagger documentation? I've allowed either 200 or 204 in my playbook task, which now seems to be working perfectly. Thanks! Link to comment Share on other sites More sharing options...
Luke 37118 Posted March 29, 2021 Share Posted March 29, 2021 Hi, yes, 204 is a normal and expected status code for some operations. 1 Link to comment Share on other sites More sharing options...
maximumentropy 23 Posted April 3, 2021 Author Share Posted April 3, 2021 On 3/29/2021 at 12:51 PM, Luke said: Hi, yes, 204 is a normal and expected status code for some operations. Thanks. Will it be added to the Swagger documentation? Link to comment Share on other sites More sharing options...
Luke 37118 Posted April 3, 2021 Share Posted April 3, 2021 It would make sense to add that, yes. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now