Move sources to a provider's new address
/streams/sources/replace-host/write Change: creates or edits. Scopes
Rewrites the scheme, host and port of every source on from_host to to_base, keeping each path. With dry_run (the default) nothing is written: the answer says what would change. Running streams that are always on restart on the new address; on-demand streams use it from their next start. Movies played from that host move too for accounts that see the whole catalogue.
Body
from_hoststringrequiredHostname the sources point at now, e.g. old-provider.example. Matches http and https and any port; subdomains are not included.
to_basestringrequiredScheme and host to use instead, e.g. https://new-provider.example. Each source keeps its own path.
dry_runbooleanReport what would change and write nothing.
Default:
true
Response
200 OK
from_hoststringrequiredto_basestringrequiredsourcesintegerrequiredSources that change.
streamsintegerrequiredStreams using them.
running_restartedintegerrequiredRunning always-on streams that restart on the new address.
moviesintegerrequiredalready_existingintegerrequiredNew addresses another source already has.
examplesobject[]requiredfromstringrequiredtostringrequired
updated_sourcesintegerReal run only.
updated_moviesintegerReal run only.
restarted_streamsintegerReal run only.
Errors
- 400 Something sent is not valid. Each field that is wrong is named with what is wrong.
- 401 No credential, or one that is wrong, expired or revoked.
- 403 The account, or the key's or app's scopes, may not do this.
- 429 Slow down: wait the seconds in the Retry-After header, then try again.