Jump to content

API questions


maximumentropy

Recommended Posts

maximumentropy

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

maximumentropy
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...