Why can't I stop a Jibri service using HTTP API

So I’m trying to figure out a way of monitoring Jibri services as I described here: Jicofo debug access - #4 by damencho

I finally some result from the HTTP API when I entered the running container of one of Jibri’s instances.
But it’s not running in port 5222, it’s running in port 2222 has netstat shown:

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:2222 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:3333 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.11:43269 0.0.0.0:* LISTEN -
tcp 0 0 172.21.0.2:47560 161.148.200.163:5222 ESTABLISHED -
udp 0 0 127.0.0.11:47981 0.0.0.0:* -

So I did http://localhost:2222/jibri/api/v1.0/health and it correctly returned a json:

{“status”:{“busyStatus”:“IDLE”,“health”:{“healthStatus”:“HEALTHY”,“details”:{}}}}

but when I try to use stop and start API methods I got " Method Not Allowed" error.
So I thought maybe Jibri’s wasn’t created with the right permissions. The permissions on docker-compose are these:

        - XMPP_AUTH_DOMAIN=<auth-server-domain>
        - XMPP_INTERNAL_MUC_DOMAIN=<internal-muc-domain>
        - XMPP_RECORDER_DOMAIN=<recorder-domain>
        - XMPP_SERVER=<xmpp-server domain>
        - XMPP_DOMAIN=<xmpp-domain>
        - JIBRI_XMPP_USER=jibri
        - JIBRI_XMPP_PASSWORD=<xmpp-password>
        - JIBRI_BREWERY_MUC=jibribrewery
        - JIBRI_RECORDER_USER=recorder
        - JIBRI_RECORDER_PASSWORD=<recorder-password>
        - JIBRI_RECORDING_DIR=/config/recordings
        - JIBRI_FINALIZE_RECORDING_SCRIPT_PATH=/config/finalize.sh
        - JIBRI_STRIP_DOMAIN_JID=muc
        - JIBRI_LOGS_DIR=/config/logs
        - DISPLAY=:0
        - TZ=America/Fortaleza

Do I have to add any ? Also I couln’t find the list of possible environment vars. Where can I find it ?

How can I stop the server ?

TCP/5222 is for Prosody. Jibri uses TCP/2222 and TCP/3333 by default if you don’t explicitly set them in your jibri.conf

Method Not Allowed should be related with HTTP request. For example, if you use GET instead of POST

Are you talking about to stop the container?

I need to check if the Jibri is ok and if it isn´t I need to restart it. What’s best: to check via api/health and use stop/start service or to restart the container ? I tried to use stopService, but it didn’t return any response and jibri’s log hasn’t given any indication something has happened.
Then when I tried to restart service I need to send a body with some data that I still don’t understand how it works. There is some example on how I can do this ?

service jibri restart?

It’s dockerized. I coudn’t find any service named Jibri in the Jibri server nor inside the container. Am I doing something wrong ? AFAIU if it’s a docker installation the service is provided by the container, not by a service installed in the server. Is that it ?
So the best would be just restart the container instead of using start/stopService using http API ?