Is it possible to edit the default stream (all messages) via the rest api?

No, that’s not possible.

But it’s possible to add outputs to the “All messages” stream via the Graylog REST API.

You can also manage outputs in the Graylog web interface via Streams/Manage outputs.