> For the complete documentation index, see [llms.txt](https://docs.datarhei.com/core/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datarhei.com/core/api-ffmpeg/process/command.md).

# Command

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:

{% tabs %}
{% tab title="Curl" %}

```bash
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"
      }'
```

{% endtab %}

{% tab title="PyClient" %}

```python
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"
)
```

{% endtab %}

{% tab title="GoClient" %}

```go
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 {
    ...
}
```

{% endtab %}
{% endtabs %}

Description:

{% openapi src="/files/AUmcih4nC1IX6QuhfO8m" path="/api/v3/process/{id}/command" method="put" %}
[doc.json](https://951110271-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAQRvnKSkK1SsZB0HeYhh%2Fuploads%2F3duUHhkhwH69BGLlHYga%2Fdoc.json?alt=media\&token=dcd2b063-c826-4652-9a98-c265ec41a469)
{% endopenapi %}
