Thanks for using the TrueNAS Community Edition issue tracker! TrueNAS Enterprise users receive direct support for their reports from our support portal.

GET /api/v2.0/system/general/ui_restart fails with 405: Method Not Allowed

Description

See:

https://github.com/danb35/deploy-freenas/issues/38

https://www.truenas.com/community/threads/lets-encrypt-with-freenas-11-1-and-later.61156/page-8#post-640691

My script to deploy certs (from Let's Encrypt or otherwise) reloads the UI (starting at line 225 of the script) with GET /api/v2.0/system/general/ui_restart. According to the docs , this method should work. But two users on TN 12.0-U3 are reporting (at the links above) that the API is returning a 405 error.

Problem/Justification

None

Impact

None

SmartDraw Connector

Katalon Manual Tests (BETA)

Activity

Show:

Bug Clerk April 26, 2021 at 7:51 PM

Bug Clerk April 22, 2021 at 5:56 PM

Dan Brown April 21, 2021 at 8:32 PM

Yes, it seems to work with POST.  Now to figure out how to special-case 12.0-U3 in my script...

William Gryzbowski April 21, 2021 at 1:19 PM

Yes, I agree it should not have happened, but it did, unfortunately.

 

The API docs in documentation hub is a static copy, it may eventually get out of sync, which we need to fix.

Its a copy of the real documentation that is generated dynamically from a running TrueNAS.

 

So, to conclude this matter and I can close this ticket, does it work with POST or not?

 

We can probably change it back to GET, but it seems it would get people even more unhappy if we make another breaking change and U3 being an exception.

Dan Brown April 21, 2021 at 12:37 PM

> Have you tried to using POST instead of GET?

No, because I trusted the docs, because POST didn't work as recently as -U2.1, and because I didn't expect the devs would introduce a breaking change to the API in a maintenance release.  It's pretty hard to use the API when it keeps changing in incompatible ways.

> The accurate docs is in http://truenas/api/docs

So I should not trust the docs on your own documentation hub?  I gave the link above, and as of about 5 minutes ago, it still says to use GET.

Complete

Details

Assignee

Reporter

Labels

Impact

Medium

Components

Affects versions

Priority

More fields

Katalon Platform

Created April 17, 2021 at 10:42 PM
Updated July 1, 2022 at 5:25 PM
Resolved May 6, 2021 at 2:44 PM

Flag notifications