LogoLogo
  • About
  • Installation
  • Update & migration
  • Configuration
    • Hostname
    • TLS / HTTPS
    • Database
    • Logging
    • API Security
    • Storage
      • Disk
      • In-memory
      • S3
    • RTMP
    • SRT
    • FFmpeg
    • Sessions
    • Metrics
    • Router
    • Debug
  • API Swagger-Documentation
  • API Clients
  • Web-Interface
  • Guides
    • Beginner
    • RTMP
    • SRT
    • Filesystems
  • General
    • Prometheus metrics
  • API
    • Login
    • Config
    • Log
    • Filesystem
      • Disk
      • In-memory
      • S3
    • Metrics
    • Sessions
    • Profiling
    • Ping
  • API / FFmpeg
    • Process
      • Command
      • Metadata
      • State
      • Probe
      • Report
    • Skills
    • Widget (Website)
  • API / RTMP
    • RTMP
  • API / SRT
    • SRT
  • Development
    • Architecture
    • Coding
    • Custom Docker images
    • Benchmark
    • Support
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. API / FFmpeg
  2. Process

Command

Send a command to a process

PreviousProcessNextMetadata

Last updated 2 years ago

Was this helpful?

There are basically two commands you can give to a process: start or stop. This is the order for the process.

Additionally to these two commands are the commands restart which is sending a stop followed by a start command packed in one command, and reload which is the same as if you would update the process config with itself, e.g. in order to update references to another process.

  • start the process. If the process is already started, this won't have any effect.

  • stop the process. If the process is already stopped, this won't have any effect.

  • restart the process. If the process is not running, this won't have any effect.

  • reload the process. If the process was running, the reloaded process will start automatically.

Example:

curl http://127.0.0.1:8080/api/v3/process/test \
   -H 'accept: application/json' \
   -H 'Content-Type: application/json' \
   -X PUT \
   -d '{
         "command": "stop"
      }'
from core_client import Client

client = Client(
    base_url="http://127.0.0.1:8080"
)
client.login()

client.v3_process_put_command(
    id="test",
    command="stop"
)
import (
    "github.com/datarhei/core-client-go/v16"
)

client, _ := coreclient.New(coreclient.Config{
    Address: "https://127.0.0.1:8080",
})

err := client.ProcessCommand("test", "stop")
if err != nil {
    ...
}

Description:

Issue a command to a process

put

Issue a command to a process: start, stop, reload, restart

Authorizations
Path parameters
idstringRequired

Process ID

Body
commandstring ยท enumRequiredPossible values:
Responses
200
OK
application/json
Responsestring
400
Bad Request
application/json
404
Not Found
application/json
put
PUT /v3/process/{id}/command HTTP/1.1
Host: api
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "command": "start"
}
text