diff --git a/.editorconfig b/.editorconfig
index 514cb5dac..d7d4d8ca7 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -2,7 +2,7 @@
root = true
[*]
-indent_style = space
+indent_style = tab
indent_size = 2
tab_width = 2
end_of_line = lf
diff --git a/.github/workflows/docker-nightly-earthly.yaml b/.github/workflows/docker-nightly-earthly.yaml
new file mode 100644
index 000000000..46a647b6d
--- /dev/null
+++ b/.github/workflows/docker-nightly-earthly.yaml
@@ -0,0 +1,40 @@
+# See https://docs.earthly.dev/ci-integration/vendor-specific-guides/gh-actions-integration
+# for details.
+
+name: Build nightly docker
+
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: '0 2 * * *'
+
+jobs:
+ Docker:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: earthly/actions-setup@v1
+ with:
+ version: 'latest' # or pin to an specific version, e.g. "v0.6.10"
+
+ - name: Earthly version
+ run: earthly --version
+
+ - name: Log into GitHub Container Registry
+ env:
+ GH_CR_PAT: ${{ secrets.GH_CR_PAT }}
+ run: echo "${{ secrets.GH_CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
+ if: env.GH_CR_PAT != null
+
+ - name: Set up QEMU
+ id: qemu
+ uses: docker/setup-qemu-action@v1
+ with:
+ image: tonistiigi/binfmt:latest
+ platforms: all
+
+ - uses: actions/checkout@v3
+ - name: Checkout and build
+ if: env.GH_CR_PAT != null
+ env:
+ GH_CR_PAT: ${{ secrets.GH_CR_PAT }}
+ run: cd build/release && ./docker-nightly-earthly.sh
diff --git a/Earthfile b/Earthfile
new file mode 100644
index 000000000..f317c5c34
--- /dev/null
+++ b/Earthfile
@@ -0,0 +1,129 @@
+VERSION --new-platform 0.6
+
+FROM --platform=linux/amd64 alpine:latest
+ARG version=develop
+
+WORKDIR /build
+
+build-all:
+ BUILD --platform=linux/amd64 --platform=linux/386 --platform=linux/arm64 --platform=linux/arm/v7 --platform=darwin/amd64 +build
+
+package-all:
+ BUILD --platform=linux/amd64 --platform=linux/386 --platform=linux/arm64 --platform=linux/arm/v7 --platform=darwin/amd64 +package
+
+docker-all:
+ BUILD --platform=linux/amd64 --platform=linux/386 --platform=linux/arm64 --platform=linux/arm/v7 +docker
+
+crosscompiler:
+ # This image is missing a few platforms, so we'll add them locally
+ FROM --platform=linux/amd64 bdwyertech/go-crosscompile
+ RUN curl -sfL "https://musl.cc/armv7l-linux-musleabihf-cross.tgz" | tar zxf - -C /usr/ --strip-components=1
+ RUN curl -sfL "https://musl.cc/i686-linux-musl-cross.tgz" | tar zxf - -C /usr/ --strip-components=1
+ RUN curl -sfL "https://musl.cc/x86_64-linux-musl-cross.tgz" | tar zxf - -C /usr/ --strip-components=1
+
+code:
+ FROM --platform=linux/amd64 +crosscompiler
+ COPY . /build
+ # GIT CLONE --branch=$version git@github.com:owncast/owncast.git /build
+
+build:
+ ARG EARTHLY_GIT_HASH # provided by Earthly
+ ARG TARGETPLATFORM # provided by Earthly
+ ARG TARGETOS # provided by Earthly
+ ARG TARGETARCH # provided by Earthly
+ ARG GOOS=$TARGETOS
+ ARG GOARCH=$TARGETARCH
+
+ FROM --platform=linux/amd64 +code
+
+ RUN echo $EARTHLY_GIT_HASH
+ RUN echo "Finding CC configuration for $TARGETPLATFORM"
+ IF [ "$TARGETPLATFORM" = "linux/amd64" ]
+ ARG NAME=linux-64bit
+ ARG CC=x86_64-linux-musl-gcc
+ ARG CXX=x86_64-linux-musl-g++
+ ELSE IF [ "$TARGETPLATFORM" = "linux/386" ]
+ ARG NAME=linux-32bit
+ ARG CC=i686-linux-musl-gcc
+ ARG CXX=i686-linux-musl-g++
+ ELSE IF [ "$TARGETPLATFORM" = "linux/arm64" ]
+ ARG NAME=linux-arm64
+ ARG CC=aarch64-linux-musl-gcc
+ ARG CXX=aarch64-linux-musl-g++
+ ELSE IF [ "$TARGETPLATFORM" = "linux/arm/v7" ]
+ ARG NAME=linux-arm7
+ ARG CC=armv7l-linux-musleabihf-gcc
+ ARG CXX=armv7l-linux-musleabihf-g++
+ ARG GOARM=7
+ ELSE IF [ "$TARGETPLATFORM" = "darwin/amd64" ]
+ ARG NAME=macOS-64bit
+ ARG CC=o64-clang
+ ARG CXX=o64-clang++
+ ELSE
+ RUN echo "Failed to find CC configuration for $TARGETPLATFORM"
+ ARG --required CC
+ ARG --required CXX
+ END
+
+ ENV CGO_ENABLED=1
+ ENV GOOS=$GOOS
+ ENV GOARCH=$GOARCH
+ ENV GOARM=$GOARM
+ ENV CC=$CC
+ ENV CXX=$CXX
+
+ WORKDIR /build
+ # MacOSX disallows static executables, so we omit the static flag on this platform
+ RUN go build -a -installsuffix cgo -ldflags "$([ "$GOOS"z != darwinz ] && echo "-linkmode external -extldflags -static ") -s -w -X github.com/owncast/owncast/config.GitCommit=$EARTHLY_GIT_HASH -X github.com/owncast/owncast/config.VersionNumber=$version -X github.com/owncast/owncast/config.BuildPlatform=$NAME" -o owncast main.go
+ COPY +tailwind/prod-tailwind.min.css /build/dist/webroot/js/web_modules/tailwindcss/dist/tailwind.min.css
+
+ SAVE ARTIFACT owncast owncast
+ SAVE ARTIFACT webroot webroot
+ SAVE ARTIFACT README.md README.md
+
+tailwind:
+ FROM +code
+ WORKDIR /build/build/javascript
+ RUN apk add --update --no-cache npm >> /dev/null
+ ENV NODE_ENV=production
+ RUN cd /build/build/javascript && npm install --quiet --no-progress >> /dev/null && npm install -g cssnano postcss postcss-cli --quiet --no-progress --save-dev >> /dev/null && ./node_modules/.bin/tailwind build > /build/tailwind.min.css
+ RUN npx postcss /build/tailwind.min.css > /build/prod-tailwind.min.css
+ SAVE ARTIFACT /build/prod-tailwind.min.css prod-tailwind.min.css
+
+package:
+ RUN apk add --update --no-cache zip >> /dev/null
+
+ ARG TARGETPLATFORM # provided by Earthly
+ IF [ "$TARGETPLATFORM" = "linux/amd64" ]
+ ARG NAME=linux-64bit
+ ELSE IF [ "$TARGETPLATFORM" = "linux/386" ]
+ ARG NAME=linux-32bit
+ ELSE IF [ "$TARGETPLATFORM" = "linux/arm64" ]
+ ARG NAME=linux-arm64
+ ELSE IF [ "$TARGETPLATFORM" = "linux/arm/v7" ]
+ ARG NAME=linux-arm7
+ ELSE IF [ "$TARGETPLATFORM" = "darwin/amd64" ]
+ ARG NAME=macOS-64bit
+ ELSE
+ ARG NAME=custom
+ END
+
+ COPY (+build/webroot --platform $TARGETPLATFORM) /build/dist/webroot
+ COPY (+build/owncast --platform $TARGETPLATFORM) /build/dist/owncast
+ COPY (+build/README.md --platform $TARGETPLATFORM) /build/dist/README.md
+ ENV ZIPNAME owncast-$version-$NAME.zip
+ RUN cd /build/dist && zip -r -q -8 /build/dist/owncast.zip .
+ SAVE ARTIFACT /build/dist/owncast.zip owncast.zip AS LOCAL dist/$ZIPNAME
+
+docker:
+ ARG image=ghcr.io/owncast/owncast
+ ARG tag=develop
+ ARG TARGETPLATFORM
+ FROM --platform=$TARGETPLATFORM alpine:latest
+ RUN apk update && apk add --no-cache ffmpeg ffmpeg-libs ca-certificates unzip && update-ca-certificates
+ WORKDIR /app
+ COPY --platform=$TARGETPLATFORM +package/owncast.zip /app
+ RUN unzip -x owncast.zip && mkdir data
+ ENTRYPOINT ["/app/owncast"]
+ EXPOSE 8080 1935
+ SAVE IMAGE --push $image:$tag
diff --git a/README.md b/README.md
index c4df616cf..5164b53ee 100644
--- a/README.md
+++ b/README.md
@@ -48,7 +48,9 @@ Owncast is an open source, self-hosted, decentralized, single user live video st
-
+
+
+
diff --git a/activitypub/inbox/worker.go b/activitypub/inbox/worker.go
index 2d0fd9403..ef8aef9f3 100644
--- a/activitypub/inbox/worker.go
+++ b/activitypub/inbox/worker.go
@@ -4,6 +4,7 @@ import (
"context"
"crypto/x509"
"encoding/pem"
+ "fmt"
"net/http"
"net/url"
"strings"
@@ -21,7 +22,7 @@ import (
func handle(request apmodels.InboxRequest) {
if verified, err := Verify(request.Request); err != nil {
- log.Debugln("Error in attempting to verify request", err)
+ log.Errorln("Error in attempting to verify request", err)
return
} else if !verified {
log.Debugln("Request failed verification", err)
@@ -35,6 +36,7 @@ func handle(request apmodels.InboxRequest) {
// Verify will Verify the http signature of an inbound request as well as
// check it against the list of blocked domains.
+// nolint: cyclop
func Verify(request *http.Request) (bool, error) {
verifier, err := httpsig.NewVerifier(request)
if err != nil {
@@ -51,6 +53,10 @@ func Verify(request *http.Request) (bool, error) {
}
signature := request.Header.Get("signature")
+ if signature == "" {
+ return false, errors.New("http signature header not found in request")
+ }
+
var algorithmString string
signatureComponents := strings.Split(signature, ",")
for _, component := range signatureComponents {
@@ -66,26 +72,31 @@ func Verify(request *http.Request) (bool, error) {
return false, errors.New("Unable to determine algorithm to verify request")
}
- actor, err := resolvers.GetResolvedActorFromIRI(pubKeyID.String())
+ publicKey, err := resolvers.GetResolvedPublicKeyFromIRI(pubKeyID.String())
if err != nil {
return false, errors.Wrap(err, "failed to resolve actor from IRI to fetch key")
}
- if actor.ActorIri == nil {
- return false, errors.New("actor IRI is empty")
+ var publicKeyActorIRI *url.URL
+ if ownerProp := publicKey.GetW3IDSecurityV1Owner(); ownerProp != nil {
+ publicKeyActorIRI = ownerProp.Get()
+ }
+
+ if publicKeyActorIRI == nil {
+ return false, errors.New("public key owner IRI is empty")
}
// Test to see if the actor is in the list of blocked federated domains.
- if isBlockedDomain(actor.ActorIri.Hostname()) {
+ if isBlockedDomain(publicKeyActorIRI.Hostname()) {
return false, errors.New("domain is blocked")
}
// If actor is specifically blocked, then fail validation.
- if blocked, err := isBlockedActor(actor.ActorIri); err != nil || blocked {
+ if blocked, err := isBlockedActor(publicKeyActorIRI); err != nil || blocked {
return false, err
}
- key := actor.W3IDSecurityV1PublicKey.Begin().Get().GetW3IDSecurityV1PublicKeyPem().Get()
+ key := publicKey.GetW3IDSecurityV1PublicKeyPem().Get()
block, _ := pem.Decode([]byte(key))
if block == nil {
log.Errorln("failed to parse PEM block containing the public key")
@@ -98,15 +109,25 @@ func Verify(request *http.Request) (bool, error) {
return false, errors.Wrap(err, "failed to parse DER encoded public key")
}
- var algorithm httpsig.Algorithm = httpsig.Algorithm(algorithmString)
-
- // The verifier will verify the Digest in addition to the HTTP signature
- if err := verifier.Verify(parsedKey, algorithm); err != nil {
- log.Warnln("verification error for", pubKeyID, err)
- return false, errors.Wrap(err, "verification error: "+pubKeyID.String())
+ algos := []httpsig.Algorithm{
+ httpsig.Algorithm(algorithmString), // try stated algorithm first then other common algorithms
+ httpsig.RSA_SHA256, // <- used by almost all fedi software
+ httpsig.RSA_SHA512,
}
- return true, nil
+ // The verifier will verify the Digest in addition to the HTTP signature
+ triedAlgos := make(map[httpsig.Algorithm]error)
+ for _, algorithm := range algos {
+ if _, tried := triedAlgos[algorithm]; !tried {
+ err := verifier.Verify(parsedKey, algorithm)
+ if err == nil {
+ return true, nil
+ }
+ triedAlgos[algorithm] = err
+ }
+ }
+
+ return false, fmt.Errorf("http signature verification error(s) for: %s: %+v", pubKeyID.String(), triedAlgos)
}
func isBlockedDomain(domain string) bool {
diff --git a/activitypub/resolvers/resolve.go b/activitypub/resolvers/resolve.go
index 060cb217d..522bf136c 100644
--- a/activitypub/resolvers/resolve.go
+++ b/activitypub/resolvers/resolve.go
@@ -122,6 +122,72 @@ func GetResolvedActorFromActorProperty(actor vocab.ActivityStreamsActorProperty)
return apActor, err
}
+// GetResolvedPublicKeyFromIRI will resolve a publicKey IRI string to a vocab.W3IDSecurityV1PublicKey.
+func GetResolvedPublicKeyFromIRI(publicKeyIRI string) (vocab.W3IDSecurityV1PublicKey, error) {
+ var err error
+ var pubkey vocab.W3IDSecurityV1PublicKey
+ resolved := false
+
+ personCallback := func(c context.Context, person vocab.ActivityStreamsPerson) error {
+ if pkProp := person.GetW3IDSecurityV1PublicKey(); pkProp != nil {
+ for iter := pkProp.Begin(); iter != pkProp.End(); iter = iter.Next() {
+ if iter.IsW3IDSecurityV1PublicKey() {
+ pubkey = iter.Get()
+ resolved = true
+ return nil
+ }
+ }
+ }
+ return errors.New("error deriving publickey from activitystreamsperson")
+ }
+
+ serviceCallback := func(c context.Context, service vocab.ActivityStreamsService) error {
+ if pkProp := service.GetW3IDSecurityV1PublicKey(); pkProp != nil {
+ for iter := pkProp.Begin(); iter != pkProp.End(); iter = iter.Next() {
+ if iter.IsW3IDSecurityV1PublicKey() {
+ pubkey = iter.Get()
+ resolved = true
+ return nil
+ }
+ }
+ }
+ return errors.New("error deriving publickey from activitystreamsservice")
+ }
+
+ applicationCallback := func(c context.Context, app vocab.ActivityStreamsApplication) error {
+ if pkProp := app.GetW3IDSecurityV1PublicKey(); pkProp != nil {
+ for iter := pkProp.Begin(); iter != pkProp.End(); iter = iter.Next() {
+ if iter.IsW3IDSecurityV1PublicKey() {
+ pubkey = iter.Get()
+ resolved = true
+ return nil
+ }
+ }
+ }
+ return errors.New("error deriving publickey from activitystreamsapp")
+ }
+
+ pubkeyCallback := func(c context.Context, pk vocab.W3IDSecurityV1PublicKey) error {
+ pubkey = pk
+ resolved = true
+ return nil
+ }
+
+ if e := ResolveIRI(context.Background(), publicKeyIRI, personCallback, serviceCallback, applicationCallback, pubkeyCallback); e != nil {
+ err = e
+ }
+
+ if err != nil {
+ err = errors.Wrap(err, "error resolving publickey from iri")
+ }
+
+ if !resolved {
+ err = errors.New("error resolving publickey from iri")
+ }
+
+ return pubkey, err
+}
+
// GetResolvedActorFromIRI will resolve an IRI string to a fully populated actor.
func GetResolvedActorFromIRI(personOrServiceIRI string) (apmodels.ActivityPubActor, error) {
var err error
diff --git a/auth/indieauth/client.go b/auth/indieauth/client.go
index 6e70f8c92..ac8869927 100644
--- a/auth/indieauth/client.go
+++ b/auth/indieauth/client.go
@@ -68,7 +68,7 @@ func HandleCallbackCode(code, state string) (*Request, *Response, error) {
var response Response
if err := json.Unmarshal(body, &response); err != nil {
- return nil, nil, errors.Wrap(err, "unable to parse IndieAuth response")
+ return nil, nil, errors.Wrap(err, "unable to parse IndieAuth response: "+string(body))
}
if response.Error != "" || response.ErrorDescription != "" {
diff --git a/build/javascript/package-lock.json b/build/javascript/package-lock.json
index f0da8a197..a2e43aa34 100644
--- a/build/javascript/package-lock.json
+++ b/build/javascript/package-lock.json
@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@babel/runtime": {
- "version": "7.17.9",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.9.tgz",
- "integrity": "sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==",
+ "version": "7.18.3",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.3.tgz",
+ "integrity": "sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
@@ -296,7 +296,7 @@
"boolbase": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
- "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
+ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="
},
"brace-expansion": {
"version": "1.1.11",
@@ -358,9 +358,9 @@
}
},
"caniuse-lite": {
- "version": "1.0.30001335",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001335.tgz",
- "integrity": "sha512-ddP1Tgm7z2iIxu6QTtbZUv6HJxSaV/PZeSrWFZtbY4JZ69tOeNhBCl3HyRQgeNZKE5AOn1kpV7fhljigy0Ty3w=="
+ "version": "1.0.30001344",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001344.tgz",
+ "integrity": "sha512-0ZFjnlCaXNOAYcV7i+TtdKBp0L/3XEU2MF/x6Du1lrh+SRX4IfzIVL4HNJg5pB2PmFb8rszIGyOvsZnqqRoc2g=="
},
"chalk": {
"version": "4.1.2",
@@ -454,7 +454,7 @@
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="
},
"color-string": {
"version": "1.9.1",
@@ -479,7 +479,7 @@
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
},
"css-declaration-sorter": {
"version": "6.2.2",
@@ -535,26 +535,26 @@
}
},
"cssnano-preset-default": {
- "version": "5.2.7",
- "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.7.tgz",
- "integrity": "sha512-JiKP38ymZQK+zVKevphPzNSGHSlTI+AOwlasoSRtSVMUU285O7/6uZyd5NbW92ZHp41m0sSHe6JoZosakj63uA==",
+ "version": "5.2.10",
+ "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.10.tgz",
+ "integrity": "sha512-H8TJRhTjBKVOPltp9vr9El9I+IfYsOMhmXdK0LwdvwJcxYX9oWkY7ctacWusgPWAgQq1vt/WO8v+uqpfLnM7QA==",
"dev": true,
"requires": {
"css-declaration-sorter": "^6.2.2",
"cssnano-utils": "^3.1.0",
"postcss-calc": "^8.2.3",
"postcss-colormin": "^5.3.0",
- "postcss-convert-values": "^5.1.0",
- "postcss-discard-comments": "^5.1.1",
+ "postcss-convert-values": "^5.1.2",
+ "postcss-discard-comments": "^5.1.2",
"postcss-discard-duplicates": "^5.1.0",
"postcss-discard-empty": "^5.1.1",
"postcss-discard-overridden": "^5.1.0",
- "postcss-merge-longhand": "^5.1.4",
- "postcss-merge-rules": "^5.1.1",
+ "postcss-merge-longhand": "^5.1.5",
+ "postcss-merge-rules": "^5.1.2",
"postcss-minify-font-values": "^5.1.0",
"postcss-minify-gradients": "^5.1.1",
- "postcss-minify-params": "^5.1.2",
- "postcss-minify-selectors": "^5.2.0",
+ "postcss-minify-params": "^5.1.3",
+ "postcss-minify-selectors": "^5.2.1",
"postcss-normalize-charset": "^5.1.0",
"postcss-normalize-display-values": "^5.1.0",
"postcss-normalize-positions": "^5.1.0",
@@ -589,7 +589,7 @@
"defined": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
- "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM="
+ "integrity": "sha512-Y2caI5+ZwS5c3RiNDJ6u53VhQHv+hHKwhkI1iHvceKUHw9Df6EK2zRLfjejRgMuCuxK7PfSWIMwWecceVvThjQ=="
},
"dependency-graph": {
"version": "0.11.0",
@@ -598,13 +598,13 @@
"dev": true
},
"detective": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz",
- "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==",
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz",
+ "integrity": "sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==",
"requires": {
- "acorn-node": "^1.6.1",
+ "acorn-node": "^1.8.2",
"defined": "^1.0.0",
- "minimist": "^1.1.1"
+ "minimist": "^1.2.6"
}
},
"dir-glob": {
@@ -653,9 +653,9 @@
}
},
"electron-to-chromium": {
- "version": "1.4.129",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.129.tgz",
- "integrity": "sha512-GgtN6bsDtHdtXJtlMYZWGB/uOyjZWjmRDumXTas7dGBaB9zUyCjzHet1DY2KhyHN8R0GLbzZWqm4efeddqqyRQ=="
+ "version": "1.4.141",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.141.tgz",
+ "integrity": "sha512-mfBcbqc0qc6RlxrsIgLG2wCqkiPAjEezHxGTu7p3dHHFOurH4EjS9rFZndX5axC8264rI1Pcbw8uQP39oZckeA=="
},
"emoji-regex": {
"version": "8.0.0",
@@ -676,12 +676,12 @@
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
- "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="
},
"fast-glob": {
"version": "3.2.11",
@@ -736,7 +736,7 @@
"jsonfile": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
- "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
+ "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
"requires": {
"graceful-fs": "^4.1.6"
}
@@ -746,7 +746,7 @@
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
},
"fsevents": {
"version": "2.3.2",
@@ -761,9 +761,9 @@
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"fuzzysort": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/fuzzysort/-/fuzzysort-1.2.1.tgz",
- "integrity": "sha512-egTSF3U6H6T9tXtAhEm5P5guSSDjd96/NUWrbmoGlIu3ATMdXra13gwQdEFRY6ehsFe8xec7UnQz+k34CGWCIg=="
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/fuzzysort/-/fuzzysort-1.9.0.tgz",
+ "integrity": "sha512-MOxCT0qLTwLqmEwc7UtU045RKef7mc8Qz8eR4r2bLNEq9dy/c3ZKMEFp6IEst69otkQdFZ4FfgH2dmZD+ddX1g=="
},
"get-caller-file": {
"version": "2.0.5",
@@ -778,14 +778,14 @@
"dev": true
},
"glob": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
- "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
- "minimatch": "^3.0.4",
+ "minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
@@ -838,7 +838,7 @@
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="
},
"htm": {
"version": "3.1.1",
@@ -872,12 +872,12 @@
"individual": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/individual/-/individual-2.0.0.tgz",
- "integrity": "sha1-gzsJfa0jKU52EXqY+zjg2a1hu5c="
+ "integrity": "sha512-pWt8hBCqJsUWI/HtcfWod7+N9SgAqyPEaF7JQjwzjn5vGrpg6aQ5qeAFQ7dx//UH4J1O+7xqew+gCeeFt6xN/g=="
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"requires": {
"once": "^1.3.0",
"wrappy": "1"
@@ -913,7 +913,7 @@
"is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true
},
"is-fullwidth-code-point": {
@@ -970,13 +970,13 @@
"lodash.memoize": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
- "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
+ "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==",
"dev": true
},
"lodash.uniq": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
- "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=",
+ "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==",
"dev": true
},
"m3u8-parser": {
@@ -1062,9 +1062,9 @@
}
},
"nanoid": {
- "version": "3.3.3",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz",
- "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
+ "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
"dev": true
},
"node-emoji": {
@@ -1076,9 +1076,9 @@
}
},
"node-releases": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.4.tgz",
- "integrity": "sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ=="
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.5.tgz",
+ "integrity": "sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q=="
},
"normalize-path": {
"version": "3.0.0",
@@ -1271,18 +1271,19 @@
}
},
"postcss-convert-values": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.0.tgz",
- "integrity": "sha512-GkyPbZEYJiWtQB0KZ0X6qusqFHUepguBCNFi9t5JJc7I2OTXG7C0twbTLvCfaKOLl3rSXmpAwV7W5txd91V84g==",
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.2.tgz",
+ "integrity": "sha512-c6Hzc4GAv95B7suy4udszX9Zy4ETyMCgFPUDtWjdFTKH1SE9eFY/jEpHSwTH1QPuwxHpWslhckUQWbNRM4ho5g==",
"dev": true,
"requires": {
+ "browserslist": "^4.20.3",
"postcss-value-parser": "^4.2.0"
}
},
"postcss-discard-comments": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.1.tgz",
- "integrity": "sha512-5JscyFmvkUxz/5/+TB3QTTT9Gi9jHkcn8dcmmuN68JQcv3aQg4y88yEHHhwFB52l/NkaJ43O0dbksGMAo49nfQ==",
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz",
+ "integrity": "sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==",
"dev": true
},
"postcss-discard-duplicates": {
@@ -1403,9 +1404,9 @@
}
},
"postcss-merge-longhand": {
- "version": "5.1.4",
- "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.4.tgz",
- "integrity": "sha512-hbqRRqYfmXoGpzYKeW0/NCZhvNyQIlQeWVSao5iKWdyx7skLvCfQFGIUsP9NUs3dSbPac2IC4Go85/zG+7MlmA==",
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.5.tgz",
+ "integrity": "sha512-NOG1grw9wIO+60arKa2YYsrbgvP6tp+jqc7+ZD5/MalIw234ooH2C6KlR6FEn4yle7GqZoBxSK1mLBE9KPur6w==",
"dev": true,
"requires": {
"postcss-value-parser": "^4.2.0",
@@ -1413,9 +1414,9 @@
}
},
"postcss-merge-rules": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.1.tgz",
- "integrity": "sha512-8wv8q2cXjEuCcgpIB1Xx1pIy8/rhMPIQqYKNzEdyx37m6gpq83mQQdCxgIkFgliyEnKvdwJf/C61vN4tQDq4Ww==",
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.2.tgz",
+ "integrity": "sha512-zKMUlnw+zYCWoPN6yhPjtcEdlJaMUZ0WyVcxTAmw3lkkN/NDMRkOkiuctQEoWAOvH7twaxUUdvBWl0d4+hifRQ==",
"dev": true,
"requires": {
"browserslist": "^4.16.6",
@@ -1445,9 +1446,9 @@
}
},
"postcss-minify-params": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.2.tgz",
- "integrity": "sha512-aEP+p71S/urY48HWaRHasyx4WHQJyOYaKpQ6eXl8k0kxg66Wt/30VR6/woh8THgcpRbonJD5IeD+CzNhPi1L8g==",
+ "version": "5.1.3",
+ "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.3.tgz",
+ "integrity": "sha512-bkzpWcjykkqIujNL+EVEPOlLYi/eZ050oImVtHU7b4lFS82jPnsCb44gvC6pxaNt38Els3jWYDHTjHKf0koTgg==",
"dev": true,
"requires": {
"browserslist": "^4.16.6",
@@ -1456,9 +1457,9 @@
}
},
"postcss-minify-selectors": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.2.0.tgz",
- "integrity": "sha512-vYxvHkW+iULstA+ctVNx0VoRAR4THQQRkG77o0oa4/mBS0OzGvvzLIvHDv/nNEM0crzN2WIyFU5X7wZhaUK3RA==",
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.2.1.tgz",
+ "integrity": "sha512-nPJu7OjZJTsVUmPdm2TcaiohIwxP+v8ha9NehQ2ye9szv4orirRU3SDdtUmKH+10nzn0bAyOXZ0UEr7OpvLehg==",
"dev": true,
"requires": {
"postcss-selector-parser": "^6.0.5"
@@ -1975,9 +1976,9 @@
"dev": true
},
"nth-check": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz",
- "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
+ "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==",
"dev": true,
"requires": {
"boolbase": "^1.0.0"
@@ -2185,9 +2186,9 @@
"dev": true
},
"yargs": {
- "version": "17.4.1",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz",
- "integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==",
+ "version": "17.5.1",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz",
+ "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==",
"dev": true,
"requires": {
"cliui": "^7.0.2",
diff --git a/build/release/docker-nightly-earthly.sh b/build/release/docker-nightly-earthly.sh
new file mode 100755
index 000000000..82d00a2d4
--- /dev/null
+++ b/build/release/docker-nightly-earthly.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# Docker build
+# Must authenticate first: https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages#authenticating-to-github-packages
+DOCKER_IMAGE="owncast-earthly"
+DATE=$(date +"%Y%m%d")
+VERSION="${DATE}-nightly"
+
+echo "Building Docker image ${DOCKER_IMAGE}..."
+
+# Change to the root directory of the repository
+cd $(git rev-parse --show-toplevel)
+
+earthly --ci --push +docker-all --image="ghcr.io/owncast/${DOCKER_IMAGE}" --tag=nightly --version="${VERSION}"
diff --git a/controllers/auth/indieauth/server.go b/controllers/auth/indieauth/server.go
index 78c10a367..a994be6eb 100644
--- a/controllers/auth/indieauth/server.go
+++ b/controllers/auth/indieauth/server.go
@@ -6,13 +6,16 @@ import (
ia "github.com/owncast/owncast/auth/indieauth"
"github.com/owncast/owncast/controllers"
+ "github.com/owncast/owncast/router/middleware"
)
// HandleAuthEndpoint will handle the IndieAuth auth endpoint.
func HandleAuthEndpoint(w http.ResponseWriter, r *http.Request) {
if r.Method == http.MethodGet {
// Require the GET request for IndieAuth to be behind admin login.
- handleAuthEndpointGet(w, r)
+ f := middleware.RequireAdminAuth(handleAuthEndpointGet)
+ f(w, r)
+ return
} else if r.Method == http.MethodPost {
handleAuthEndpointPost(w, r)
} else {
diff --git a/core/storageproviders/s3Storage.go b/core/storageproviders/s3Storage.go
index 269dfdecd..09d82f871 100644
--- a/core/storageproviders/s3Storage.go
+++ b/core/storageproviders/s3Storage.go
@@ -3,9 +3,11 @@ package storageproviders
import (
"bufio"
"fmt"
+ "net/http"
"os"
"path/filepath"
"strings"
+ "time"
"github.com/owncast/owncast/core/data"
"github.com/owncast/owncast/core/playlist"
@@ -176,6 +178,14 @@ func (s *S3Storage) Save(filePath string, retryCount int) (string, error) {
}
func (s *S3Storage) connectAWS() *session.Session {
+ t := http.DefaultTransport.(*http.Transport).Clone()
+ t.MaxIdleConnsPerHost = 100
+
+ httpClient := &http.Client{
+ Timeout: 10 * time.Second,
+ Transport: t,
+ }
+
creds := credentials.NewStaticCredentials(s.s3AccessKey, s.s3Secret, "")
_, err := creds.Get()
if err != nil {
@@ -184,6 +194,7 @@ func (s *S3Storage) connectAWS() *session.Session {
sess, err := session.NewSession(
&aws.Config{
+ HTTPClient: httpClient,
Region: aws.String(s.s3Region),
Credentials: creds,
Endpoint: aws.String(s.s3Endpoint),
diff --git a/docs/api/index.html b/docs/api/index.html
index 263c2c20d..5f7ee1bd6 100644
--- a/docs/api/index.html
+++ b/docs/api/index.html
@@ -13,21 +13,27 @@
}
-
Owncast (0.0.11) Download OpenAPI specification:Download
Owncast is a self-hosted live video and web chat server for use with existing popular broadcasting software. The following APIs represent the state in the development branch.
-
AdminBasicAuthThe username for admin basic auth is admin
and the password is the stream key.
-
Security Scheme Type HTTP HTTP Authorization Scheme basic
AccessToken3rd party integration auth where a service user must provide an access token.
-
Security Scheme Type HTTP HTTP Authorization Scheme bearer
UserTokenA standard user must provide a valid access token.
-
Security Scheme Type API Key Query parameter name: accessToken
ModeratorUserTokenA moderator user must provide a valid access token.
-
Security Scheme Type API Key Query parameter name: accessToken
Admin operations requiring authentication.
-
Server status and broadcaster Responses 200 Server status and broadcaster details
- Response samples Content type application/json
Copy
Expand all Collapse all { "broadcaster" :
{ "remoteAddr" : "172.217.164.110" ,
"time" : "2020-10-06T23:20:44.588649-07:00" ,
} , "online" : true ,
"viewerCount" : 3 ,
"overallPeakViewerCount" : 4 ,
"sessionPeakViewerCount" : 4 ,
"versionNumber" : "0.0.3"
}
Disconnect Broadcaster post /api/admin/disconnect Disconnect the active inbound stream, if one exists, and terminate the broadcast.
-
Responses 200 Operation Success/Failure Response
- Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Reset your YP registration key. Used when there is a problem with your registration to the Owncast Directory via the YP APIs. This will reset your local registration key.
-
Responses 200 Operation Success/Failure Response
- Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Return a list of currently connected clients get /api/admin/chat/clients Return a list of currently connected clients with optional geo details.
-
Responses 200 Successful response of an array of clients
- Response samples Content type application/json
Copy
Expand all Collapse all [ { "connectedAt" : "2020-10-06T23:20:44.588649-07:00" ,
"messageCount" : 3 ,
"userAgent" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36" ,
"ipAddress" : "172.217.164.110" ,
"user" :
{ "id" : "yklw5Imng" ,
"displayName" : "awesome-pizza" ,
"displayColor" : 42 ,
"createdAt" : "2021-07-08T20:21:25.303402404-07:00" ,
"previousNames" : "awesome-pizza,coolPerson23"
} } ]
Return a list of currently connected clients get /api/admin/users/disabled
/api/admin/users/disabled
Return a list of currently connected clients with optional geo details.
-
Responses 200 A collection of users.
- Response samples Content type application/json
Copy
Expand all Collapse all [ { "id" : "yklw5Imng" ,
"displayName" : "awesome-pizza" ,
"displayColor" : 42 ,
"createdAt" : "2019-08-24T14:15:22Z" ,
"previousNames" : "awesome-pizza,user42" ,
} ]
Return recent log entries Responses 200 Response of server log entries
- Response samples Content type application/json
Copy
Expand all Collapse all [ { "message" : "RTMP server is listening for incoming stream on port: 1935" ,
"level" : "info" ,
"time" : "2020-10-29T18:35:35.011823-07:00"
} ]
Return recent warning and error logs. get /api/admin/logs/warnings Return recent warning and error logs.
-
Responses 200 Response of server log entries
- Response samples Content type application/json
Copy
Expand all Collapse all [ { "message" : "RTMP server is listening for incoming stream on port: 1935" ,
"level" : "info" ,
"time" : "2020-10-29T18:35:35.011823-07:00"
} ]
Server Configuration get /api/admin/serverconfig Get the current configuration of the Owncast server.
-
Response samples Content type application/json
Copy
Expand all Collapse all { "instanceDetails" :
{ "name" : "string" ,
"summary" : "string" ,
"logo" : "string" ,
"extraPageContent" : "<p>This page is <strong>super</strong> cool!" ,
"version" : "Owncast v0.0.3-macOS (ef3796a033b32a312ebf5b334851cbf9959e7ecb)"
} , "ffmpegPath" : "string" ,
"webServerPort" : 0 ,
"rtmpServerPort" : 0 ,
"videoSettings" :
{ "videoQualityVariants" :
[ { "videoPassthrough" : true ,
"audioPassthrough" : true ,
"videoBitrate" : 0 ,
"audioBitrate" : 0 ,
"scaledWidth" : 0 ,
"scaledHeight" : 0 ,
"framerate" : 0 ,
"cpuUsageLevel" : 0
} ] , "latencyLevel" : 0
} , "yp" :
{ "enabled" : false ,
"instanceUrl" : "string"
} }
Chat messages, unfiltered. get /api/admin/chat/messages Get a list of all chat messages with no filters applied.
-
Response samples Content type application/json
Copy
Expand all Collapse all Update the visibility of chat messages. post /api/admin/chat/updatemessagevisibility
/api/admin/chat/updatemessagevisibility
Pass an array of IDs you want to change the chat visibility of.
-
Request Body schema: application/json
visible boolean
Are these messages visible.
-
idArray
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Enable or disable a single user. post /api/admin/chat/users/setenabled
/api/admin/chat/users/setenabled
Enable or disable a single user. Disabling will also hide all the user's chat messages.
-
Request Body schema: application/json
userId enabled boolean
Set the enabled state of this user.
-
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all { "userId" : "yklw5Imng" ,
"enabled" : true
}
Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the stream key. post /api/admin/config/key Set the stream key. Also used as the admin password.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the custom page content. post /api/admin/config/pagecontent
/api/admin/config/pagecontent
Set the custom page content using markdown.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all "# Welcome to my cool server!<br><br>I _hope_ you enjoy it."
Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the stream title. post /api/admin/config/streamtitle
/api/admin/config/streamtitle
Set the title of the currently streaming content.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the server name. post /api/admin/config/name Set the name associated with your server. Often is your name, username or identity.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the server summary. post /api/admin/config/serversummary
/api/admin/config/serversummary
Set the summary of your server's streaming content.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the server logo. post /api/admin/config/logo Set the logo for your server. Path is relative to webroot.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the server tags. post /api/admin/config/tags Set the tags displayed for your server and the categories you can show up in on the directory.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all { "value" :
[ "games" ,
"music" ,
"streaming"
] }
Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the ffmpeg binary path post /api/admin/config/ffmpegpath
/api/admin/config/ffmpegpath
Set the path for a specific copy of ffmpeg on your system.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the owncast web port. post /api/admin/config/webserverport
/api/admin/config/webserverport
Set the port the owncast web server should listen on.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the inbound rtmp server port. post /api/admin/config/rtmpserverport
/api/admin/config/rtmpserverport
Set the port where owncast service will listen for inbound broadcasts.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Mark if your stream is not safe for work post /api/admin/config/nsfw Mark if your stream can be consitered not safe for work. Used in different contexts, including the directory for filtering purposes.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set if this server supports the Owncast directory. post /api/admin/config/directoryenabled
/api/admin/config/directoryenabled
If set to true the server will attempt to register itself with the Owncast Directory . Off by default.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the public url of this owncast server. post /api/admin/config/serverurl
/api/admin/config/serverurl
Set the public url of this owncast server. Used for the directory and optional integrations.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the latency level for the stream. post /api/admin/config/video/streamlatencylevel
/api/admin/config/video/streamlatencylevel
Sets the latency level that determines how much video is buffered between the server and viewer. Less latency can end up with more buffering.
-
Request Body schema: application/json
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the configuration of your stream output. post /api/admin/config/video/streamoutputvariants
/api/admin/config/video/streamoutputvariants
Sets the detailed configuration for all of the stream variants you support.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the video codec. post /api/admin/config/video/codec
/api/admin/config/video/codec
Sets the specific video codec that will be used for video encoding. Some codecs will support hardware acceleration. Not all codecs will be supported for all systems.
-
Request Body schema: application/json
value string
The video codec to change to.
-
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set your storage configration. Sets your S3 storage provider configuration details to enable external storage.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all { "value" :
{ "enabled" : true ,
"accessKey" : "e1ac500y7000500047156bd060" ,
"secret" : "H8FH8eSxM2K/S42CUg5K000Tt4WY2fI" ,
"bucket" : "video" ,
"region" : "us-west-000"
} }
Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set your social handles. post /api/admin/config/socialhandles
/api/admin/config/socialhandles
Sets the external links to social networks and profiles.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Custom CSS styles to be used in the web front endpoints. post /api/admin/config/customstyles
/api/admin/config/customstyles
Save a string containing CSS to be inserted in to the web frontend page.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Viewers Over Time get /api/admin/viewersOverTime
/api/admin/viewersOverTime
Get the tracked viewer count over the collected period.
-
Response samples Content type application/json
Copy
Expand all Collapse all Hardware Stats get /api/admin/hardwarestats Get the CPU, Memory and Disk utilization levels over the collected period.
-
Response samples Content type application/json
Copy
Expand all Collapse all Enable or disable federated social features. post /api/admin/config/federation/enable
/api/admin/config/federation/enable
Request Body schema: application/json
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Enable or disable private federation mode. post /api/admin/config/federation/private
/api/admin/config/federation/private
Request Body schema: application/json
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Enable or disable Federation activity showing in chat. post /api/admin/config/federation/showengagement
/api/admin/config/federation/showengagement
Request Body schema: application/json
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the username you are seen as on the fediverse. post /api/admin/config/federation/username
/api/admin/config/federation/username
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set the message sent to the fediverse when this instance goes live. post /api/admin/config/federation/livemessage
/api/admin/config/federation/livemessage
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Save a collection of domains that should be ignored on the fediverse. post /api/admin/config/federation/blockdomains
/api/admin/config/federation/blockdomains
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all { "value" :
[ "guns.eagles.biz" ,
"freedom.us"
] }
Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Manually send a message to the fediverse from this instance. post /api/admin/federation/send
/api/admin/federation/send
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Get a list of accepted actions that took place on the Fediverse. get /api/admin/federation/actions
/api/admin/federation/actions
Responses 200 Actions previously handled.
- Response samples Content type application/json
Copy
Expand all Collapse all Return all webhooks. Return all of the configured webhooks for external events.
-
Responses 200 Webhooks are returned
- Response samples Content type application/json
Copy
Expand all Collapse all Set external action URLs. post /api/admin/config/externalactions
/api/admin/config/externalactions
Set a collection of external action URLs that are displayed in the UI.
-
Request Body schema: application/json
Array
url string
URL of the external action content.
-
title string
The title to put on the external action button.
-
description string
Optional additional description to display in the UI.
-
icon string
The URL to an image to place on the external action button.
-
color string
Optional color to use for drawing the action button.
-
openExternally boolean
If set this action will open in a new browser tab instead of an internal modal.
-
Responses 200 Actions have been updated.
- Request samples Content type application/json
Copy
Expand all Collapse all [ { "url" : "string" ,
"title" : "string" ,
"description" : "string" ,
"icon" : "string" ,
"color" : "string" ,
"openExternally" : true
} ]
Delete a single webhook. post /api/admin/webhooks/delete
/api/admin/webhooks/delete
Delete a single webhook by its ID.
-
Request Body schema: application/json
id string
The webhook id to delete
-
Request samples Content type application/json
Copy
Expand all Collapse all Create a webhook. post /api/admin/webhooks/create
/api/admin/webhooks/create
Create a single webhook that acts on the requested events.
-
Request Body schema: application/json
url string
The url to post the events to.
-
events Array of strings
The events to be notified about.
-
Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Copy
Expand all Collapse all Set moderator priviledges on a chat users. post /api/admin/chat/users/setmoderator
/api/admin/chat/users/setmoderator
Give a chat user ID and be able to grant or remove moderator priviledges to this user.
-
Request Body schema: application/json
userId string
User ID of the chat user you want to change moderation status of.
-
isModerator boolean
The moderator status of this user.
-
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all { "userId" : "xJ84_48Ghj" ,
"isModerator" : true
}
Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Get a list of chat moderator users. get /api/admin/chat/users/moderators
/api/admin/chat/users/moderators
Response samples Content type application/json
Copy
Expand all Collapse all [ { "id" : "yklw5Imng" ,
"displayName" : "awesome-pizza" ,
"displayColor" : 42 ,
"createdAt" : "2019-08-24T14:15:22Z" ,
"previousNames" : "awesome-pizza,user42" ,
} ]
Get the followers of this instance Response samples Content type application/json
Copy
Expand all Collapse all Get a list of follow requests that are pending. get /api/admin/followers/pending
/api/admin/followers/pending
Get a list of follow requests that have been blocked/rejected. get /api/admin/followers/blocked
/api/admin/followers/blocked
Approve a pending follow request. post /api/admin/followers/approve
/api/admin/followers/approve
Request Body schema: application/json
actorIRI string
The requestor's remote IRI used to identify the user.
-
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all A list of names to select from randomly for new chat users. post /api/admin/config/chat/suggestedusernames
/api/admin/config/chat/suggestedusernames
Request Body schema: application/json
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Endpoints related to the chat interface.
-
Register a chat user Register a user that returns an access token for accessing chat.
-
Request Body schema: application/json
displayName string
Optionally provide a display name you want to assign to this user when registering.
-
Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Copy
Expand all Collapse all { "id" : "string" ,
"accessToken" : "string" ,
"displayName" : "string"
}
Chat Messages Backlog Used to get chat messages prior to connecting to the websocket.
-
Response samples Content type application/json
Copy
Expand all Collapse all Get Custom Emoji Get a list of custom emoji that are supported in chat.
-
Response samples Content type application/json
Copy
Expand all Collapse all APIs built to allow 3rd parties to interact with an Owncast server.
-
Set the stream title. post /api/integrations/streamtitle
/api/integrations/streamtitle
Set the title of the currently streaming content.
-
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Send a chat message. post /api/integrations/chat/send
/api/integrations/chat/send
Send a chat message on behalf of a 3rd party integration, bot or service.
-
Request Body schema: application/json
body string
The message text that will be sent as the user.
-
Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Copy
Expand all Collapse all { "success" : true ,
"message" : "sent"
}
Send a system chat message. post /api/integrations/chat/system
/api/integrations/chat/system
Send a chat message on behalf of the system/server.
-
Request Body schema: application/json
body string
The message text that will be sent as the system user.
-
Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Copy
Expand all Collapse all { "success" : true ,
"message" : "sent"
}
Send a chat action. post /api/integrations/chat/action
/api/integrations/chat/action
Send an action that took place to the chat.
-
Request Body schema: application/json
body required
string
The message text that will be sent as the system user.
-
author string
An optional user name that performed the action.
-
Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Copy
Expand all Collapse all { "success" : true ,
"message" : "sent"
}
Send system chat message to a client, identified by its ClientId post /api/integrations/chat/system/client/{clientId}
/api/integrations/chat/system/client/{clientId}
Send a chat message on behalf of the system/server to a single client.
-
path Parameters clientId required
integer <int64>
Client ID (a unique numeric Id, identifying the client connection)
-
Request Body schema: application/json
body required
string
The message text that will be sent to the client.
-
Responses 500 Message was not sent to the client
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Copy
Expand all Collapse all { "success" : true ,
"messages" : "sent"
}
Create an access token. post /api/admin/accesstokens/create
/api/admin/accesstokens/create
Create a single access token that has access to the access scopes provided.
-
Request Body schema: application/json
name string
The human-readable name to give this access token.
-
scopes
Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Copy
Expand all Collapse all Delete an access token. post /api/admin/accesstokens/delete
/api/admin/accesstokens/delete
Delete a single access token.
-
Request Body schema: application/json
Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Copy
Expand all Collapse all Return all access tokens. get /api/admin/accesstokens Return all of the available access tokens.
-
Responses 200 Tokens are returned
- Response samples Content type application/json
Copy
Expand all Collapse all Set external action URLs. post /api/admin/config/externalactions
/api/admin/config/externalactions
Set a collection of external action URLs that are displayed in the UI.
-
Request Body schema: application/json
Array
url string
URL of the external action content.
-
title string
The title to put on the external action button.
-
description string
Optional additional description to display in the UI.
-
icon string
The URL to an image to place on the external action button.
-
color string
Optional color to use for drawing the action button.
-
openExternally boolean
If set this action will open in a new browser tab instead of an internal modal.
-
Responses 200 Actions have been updated.
- Request samples Content type application/json
Copy
Expand all Collapse all [ { "url" : "string" ,
"title" : "string" ,
"description" : "string" ,
"icon" : "string" ,
"color" : "string" ,
"openExternally" : true
} ]
Return a list of currently connected clients get /api/integrations/clients
/api/integrations/clients
Return a list of currently connected clients with optional geo details.
-
Responses 200 Successful response of an array of clients
- Response samples Content type application/json
Copy
Expand all Collapse all [ { "connectedAt" : "2020-10-06T23:20:44.588649-07:00" ,
"messageCount" : 3 ,
"userAgent" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36" ,
"ipAddress" : "172.217.164.110" ,
"user" :
{ "id" : "yklw5Imng" ,
"displayName" : "awesome-pizza" ,
"displayColor" : 42 ,
"createdAt" : "2021-07-08T20:21:25.303402404-07:00" ,
"previousNames" : "awesome-pizza,coolPerson23"
} } ]
Historical Chat Messages get /api/integrations/chat Used to get the backlog of chat messages.
-
Response samples Content type application/json
Copy
Expand all Collapse all Update the visibility of chat messages. post /api/integrations/chat/updatemessagevisibility
/api/integrations/chat/updatemessagevisibility
Pass an array of IDs you want to change the chat visibility of.
-
Request Body schema: application/json
visible boolean
Are these messages visible.
-
idArray
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Chat-related actions that can take place by a moderator.
-
Update the visibility of chat messages. post /api/chat/updatemessagevisibility
/api/chat/updatemessagevisibility
Pass an array of IDs you want to change the chat visibility of.
-
Request Body schema: application/json
visible boolean
Are these messages visible.
-
idArray
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Disable (block) or re-enable a chat user. post /api/chat/users/setenabled
/api/chat/users/setenabled
Request Body schema: application/json
userId string
User ID of the chat user you're changing.
-
enabled boolean
State of this user. False to block/disable.
-
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all { "userId" : "string" ,
"enabled" : true
}
Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Set moderator priviledges on a chat users. post /api/admin/chat/users/setmoderator
/api/admin/chat/users/setmoderator
Give a chat user ID and be able to grant or remove moderator priviledges to this user.
-
Request Body schema: application/json
userId string
User ID of the chat user you want to change moderation status of.
-
isModerator boolean
The moderator status of this user.
-
Responses 200 Operation Success/Failure Response
- Request samples Content type application/json
Copy
Expand all Collapse all { "userId" : "xJ84_48Ghj" ,
"isModerator" : true
}
Response samples Content type application/json
Example Operation succeeded.
Operation failed.
Copy
Expand all Collapse all Get a list of chat moderator users. get /api/admin/chat/users/moderators
/api/admin/chat/users/moderators
Response samples Content type application/json
Copy
Expand all Collapse all [ { "id" : "yklw5Imng" ,
"displayName" : "awesome-pizza" ,
"displayColor" : 42 ,
"createdAt" : "2019-08-24T14:15:22Z" ,
"previousNames" : "awesome-pizza,user42" ,
} ]
Information The client configuration. Information useful for the user interface.
-
Response samples Content type application/json
Copy
Expand all Collapse all { "name" : "string" ,
"summary" : "string" ,
"logo" : "string" ,
"extraPageContent" : "<p>This page is <strong>super</strong> cool!" ,
"version" : "Owncast v0.0.3-macOS (ef3796a033b32a312ebf5b334851cbf9959e7ecb)"
}
Mark the current viewer as active. For tracking viewer count, periodically hit the ping endpoint.
-
Current Status This endpoint is used to discover when a server is broadcasting, the number of active viewers as well as other useful information for updating the user interface.
-
Response samples Content type application/json
Copy
Expand all Collapse all { "lastConnectTime" : "2020-10-03T21:36:22-05:00" ,
"lastDisconnectTime" : null ,
"online" : true ,
"overallMaxViewerCount" : 420 ,
"sessionMaxViewerCount" : 12 ,
"viewerCount" : 7
}
Yellow Pages Information Information to be used in the Yellow Pages service, a global directory of Owncast servers.
-
Response samples Content type application/json
Copy
Expand all Collapse all { "name" : "string" ,
"description" : "string" ,
"logo" : "string" ,
"nsfw" : true ,
"online" : true ,
"viewerCount" : 0 ,
"overallMaxViewerCount" : 0 ,
"sessionMaxViewerCount" : 0 ,
"lastConnectTime" : "2019-08-24T14:15:22Z"
}
Get the public followers of this instance Response samples Content type application/json
Copy
Expand all Collapse all Return the information needed to redirect a user to a fediverse server to perform a remote follow action. Request Body schema: application/json
Responses 200 Remote follow redirect details
- Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Copy
Expand all Collapse all
+ " fill="currentColor">
Owncast (0.0.12) Download OpenAPI specification:Download
Owncast is a self-hosted live video and web chat server for use with existing popular broadcasting software.
+
Admin operations requiring authentication.
+
Server status and broadcaster Responses 200 Server status and broadcaster details
+ Response samples Content type application/json
Copy
Expand all Collapse all { "broadcaster" :
{ "remoteAddr" : "172.217.164.110" ,
"time" : "2020-10-06T23:20:44.588649-07:00" ,
} , "online" : true ,
"viewerCount" : 3 ,
"overallPeakViewerCount" : 4 ,
"sessionPeakViewerCount" : 4 ,
"versionNumber" : "0.0.3"
}
Disconnect Broadcaster post /api/admin/disconnect Disconnect the active inbound stream, if one exists, and terminate the broadcast.
+
Responses 200 Operation Success/Failure Response
+ Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Reset your YP registration key. Used when there is a problem with your registration to the Owncast Directory via the YP APIs. This will reset your local registration key.
+
Responses 200 Operation Success/Failure Response
+ Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Return a list of currently connected clients get /api/admin/chat/clients Return a list of currently connected clients with optional geo details.
+
Responses 200 Successful response of an array of clients
+ Response samples Content type application/json
Copy
Expand all Collapse all [ { "connectedAt" : "2020-10-06T23:20:44.588649-07:00" ,
"messageCount" : 3 ,
"userAgent" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36" ,
"ipAddress" : "172.217.164.110" ,
"user" :
{ "id" : "yklw5Imng" ,
"displayName" : "awesome-pizza" ,
"displayColor" : 42 ,
"createdAt" : "2021-07-08T20:21:25.303402404-07:00" ,
"previousNames" : "awesome-pizza,coolPerson23"
} } ]
Return a list of currently connected clients get /api/admin/users/disabled
/api/admin/users/disabled
Return a list of currently connected clients with optional geo details.
+
Responses 200 A collection of users.
+ Response samples Content type application/json
Copy
Expand all Collapse all [ { "id" : "yklw5Imng" ,
"displayName" : "awesome-pizza" ,
"displayColor" : 42 ,
"createdAt" : "2019-08-24T14:15:22Z" ,
"previousNames" : "awesome-pizza,user42" ,
} ]
Return recent log entries Responses 200 Response of server log entries
+ Response samples Content type application/json
Copy
Expand all Collapse all [ { "message" : "RTMP server is listening for incoming stream on port: 1935" ,
"level" : "info" ,
"time" : "2020-10-29T18:35:35.011823-07:00"
} ]
Return recent warning and error logs. get /api/admin/logs/warnings Return recent warning and error logs.
+
Responses 200 Response of server log entries
+ Response samples Content type application/json
Copy
Expand all Collapse all [ { "message" : "RTMP server is listening for incoming stream on port: 1935" ,
"level" : "info" ,
"time" : "2020-10-29T18:35:35.011823-07:00"
} ]
Server Configuration get /api/admin/serverconfig Get the current configuration of the Owncast server.
+
Response samples Content type application/json
Copy
Expand all Collapse all { "instanceDetails" :
{ "name" : "string" ,
"summary" : "string" ,
"logo" : "string" ,
"extraPageContent" : "<p>This page is <strong>super</strong> cool!" ,
"version" : "Owncast v0.0.3-macOS (ef3796a033b32a312ebf5b334851cbf9959e7ecb)"
} , "ffmpegPath" : "string" ,
"webServerPort" : 0 ,
"rtmpServerPort" : 0 ,
"videoSettings" :
{ "videoQualityVariants" :
[ { "videoPassthrough" : true ,
"audioPassthrough" : true ,
"videoBitrate" : 0 ,
"audioBitrate" : 0 ,
"scaledWidth" : 0 ,
"scaledHeight" : 0 ,
"framerate" : 0 ,
"cpuUsageLevel" : 0
} ] , "latencyLevel" : 0
} , "yp" :
{ "enabled" : false ,
"instanceUrl" : "string"
} }
Chat messages, unfiltered. get /api/admin/chat/messages Get a list of all chat messages with no filters applied.
+
Response samples Content type application/json
Copy
Expand all Collapse all Update the visibility of chat messages. post /api/admin/chat/updatemessagevisibility
/api/admin/chat/updatemessagevisibility
Pass an array of IDs you want to change the chat visibility of.
+
Request Body schema: application/json
visible boolean
Are these messages visible.
+
idArray
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Enable or disable a single user. post /api/admin/chat/users/setenabled
/api/admin/chat/users/setenabled
Enable or disable a single user. Disabling will also hide all the user's chat messages.
+
Request Body schema: application/json
userId enabled boolean
Set the enabled state of this user.
+
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
{ "userId" : "yklw5Imng" ,
"enabled" : true
}
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the stream key. post /api/admin/config/key Set the stream key. Also used as the admin password.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the custom page content. post /api/admin/config/pagecontent
/api/admin/config/pagecontent
Set the custom page content using markdown.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
"# Welcome to my cool server!<br><br>I _hope_ you enjoy it."
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the stream title. post /api/admin/config/streamtitle
/api/admin/config/streamtitle
Set the title of the currently streaming content.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the server name. post /api/admin/config/name Set the name associated with your server. Often is your name, username or identity.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the server summary. post /api/admin/config/serversummary
/api/admin/config/serversummary
Set the summary of your server's streaming content.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the server logo. post /api/admin/config/logo Set the logo for your server. Path is relative to webroot.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the server tags. post /api/admin/config/tags Set the tags displayed for your server and the categories you can show up in on the directory.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Copy
Expand all Collapse all { "value" :
[ "games" ,
"music" ,
"streaming"
] }
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the ffmpeg binary path post /api/admin/config/ffmpegpath
/api/admin/config/ffmpegpath
Set the path for a specific copy of ffmpeg on your system.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the owncast web port. post /api/admin/config/webserverport
/api/admin/config/webserverport
Set the port the owncast web server should listen on.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the inbound rtmp server port. post /api/admin/config/rtmpserverport
/api/admin/config/rtmpserverport
Set the port where owncast service will listen for inbound broadcasts.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Mark if your stream is not safe for work post /api/admin/config/nsfw Mark if your stream can be consitered not safe for work. Used in different contexts, including the directory for filtering purposes.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set if this server supports the Owncast directory. post /api/admin/config/directoryenabled
/api/admin/config/directoryenabled
If set to true the server will attempt to register itself with the Owncast Directory . Off by default.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the public url of this owncast server. post /api/admin/config/serverurl
/api/admin/config/serverurl
Set the public url of this owncast server. Used for the directory and optional integrations.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the latency level for the stream. post /api/admin/config/video/streamlatencylevel
/api/admin/config/video/streamlatencylevel
Sets the latency level that determines how much video is buffered between the server and viewer. Less latency can end up with more buffering.
+
Request Body schema: application/json
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the configuration of your stream output. post /api/admin/config/video/streamoutputvariants
/api/admin/config/video/streamoutputvariants
Sets the detailed configuration for all of the stream variants you support.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the video codec. post /api/admin/config/video/codec
/api/admin/config/video/codec
Sets the specific video codec that will be used for video encoding. Some codecs will support hardware acceleration. Not all codecs will be supported for all systems.
+
Request Body schema: application/json
value string
The video codec to change to.
+
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set your storage configration. Sets your S3 storage provider configuration details to enable external storage.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Copy
Expand all Collapse all { "value" :
{ "enabled" : true ,
"accessKey" : "e1ac500y7000500047156bd060" ,
"secret" : "H8FH8eSxM2K/S42CUg5K000Tt4WY2fI" ,
"bucket" : "video" ,
"region" : "us-west-000"
} }
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set your social handles. post /api/admin/config/socialhandles
/api/admin/config/socialhandles
Sets the external links to social networks and profiles.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Custom CSS styles to be used in the web front endpoints. post /api/admin/config/customstyles
/api/admin/config/customstyles
Save a string containing CSS to be inserted in to the web frontend page.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Viewers Over Time get /api/admin/viewersOverTime
/api/admin/viewersOverTime
Get the tracked viewer count over the collected period.
+
Response samples Content type application/json
Copy
Expand all Collapse all Hardware Stats get /api/admin/hardwarestats Get the CPU, Memory and Disk utilization levels over the collected period.
+
Response samples Content type application/json
Copy
Expand all Collapse all Enable or disable federated social features. post /api/admin/config/federation/enable
/api/admin/config/federation/enable
Request Body schema: application/json
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Enable or disable private federation mode. post /api/admin/config/federation/private
/api/admin/config/federation/private
Request Body schema: application/json
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Enable or disable Federation activity showing in chat. post /api/admin/config/federation/showengagement
/api/admin/config/federation/showengagement
Request Body schema: application/json
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the username you are seen as on the fediverse. post /api/admin/config/federation/username
/api/admin/config/federation/username
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set the message sent to the fediverse when this instance goes live. post /api/admin/config/federation/livemessage
/api/admin/config/federation/livemessage
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Save a collection of domains that should be ignored on the fediverse. post /api/admin/config/federation/blockdomains
/api/admin/config/federation/blockdomains
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Copy
Expand all Collapse all { "value" :
[ "guns.eagles.biz" ,
"freedom.us"
] }
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Manually send a message to the fediverse from this instance. post /api/admin/federation/send
/api/admin/federation/send
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Get a list of accepted actions that took place on the Fediverse. get /api/admin/federation/actions
/api/admin/federation/actions
Responses 200 Actions previously handled.
+ Response samples Content type application/json
Copy
Expand all Collapse all Return all webhooks. Return all of the configured webhooks for external events.
+
Responses 200 Webhooks are returned
+ Response samples Content type application/json
Copy
Expand all Collapse all Set external action URLs. post /api/admin/config/externalactions
/api/admin/config/externalactions
Set a collection of external action URLs that are displayed in the UI.
+
Request Body schema: application/json
Array
url string
URL of the external action content.
+
title string
The title to put on the external action button.
+
description string
Optional additional description to display in the UI.
+
icon string
The URL to an image to place on the external action button.
+
color string
Optional color to use for drawing the action button.
+
openExternally boolean
If set this action will open in a new browser tab instead of an internal modal.
+
Responses 200 Actions have been updated.
+ Request samples Content type application/json
Copy
Expand all Collapse all [ { "url" : "string" ,
"title" : "string" ,
"description" : "string" ,
"icon" : "string" ,
"color" : "string" ,
"openExternally" : true
} ]
Delete a single webhook. post /api/admin/webhooks/delete
/api/admin/webhooks/delete
Delete a single webhook by its ID.
+
Request Body schema: application/json
id string
The webhook id to delete
+
Request samples Content type application/json
Create a webhook. post /api/admin/webhooks/create
/api/admin/webhooks/create
Create a single webhook that acts on the requested events.
+
Request Body schema: application/json
url string
The url to post the events to.
+
events Array of strings
The events to be notified about.
+
Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Set moderator priviledges on a chat users. post /api/admin/chat/users/setmoderator
/api/admin/chat/users/setmoderator
Give a chat user ID and be able to grant or remove moderator priviledges to this user.
+
Request Body schema: application/json
userId string
User ID of the chat user you want to change moderation status of.
+
isModerator boolean
The moderator status of this user.
+
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
{ "userId" : "xJ84_48Ghj" ,
"isModerator" : true
}
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Get a list of chat moderator users. get /api/admin/chat/users/moderators
/api/admin/chat/users/moderators
Response samples Content type application/json
Copy
Expand all Collapse all [ { "id" : "yklw5Imng" ,
"displayName" : "awesome-pizza" ,
"displayColor" : 42 ,
"createdAt" : "2019-08-24T14:15:22Z" ,
"previousNames" : "awesome-pizza,user42" ,
} ]
Get the followers of this instance Response samples Content type application/json
Copy
Expand all Collapse all Get a list of follow requests that are pending. get /api/admin/followers/pending
/api/admin/followers/pending
Get a list of follow requests that have been blocked/rejected. get /api/admin/followers/blocked
/api/admin/followers/blocked
Approve a pending follow request. post /api/admin/followers/approve
/api/admin/followers/approve
Request Body schema: application/json
actorIRI string
The requestor's remote IRI used to identify the user.
+
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. A list of names to select from randomly for new chat users. post /api/admin/config/chat/suggestedusernames
/api/admin/config/chat/suggestedusernames
Request Body schema: application/json
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Return Prometheus-compatible scraper metrics. Responses 200 Prometheus-compatible scraper values.
+
Endpoints related to the chat interface.
+
Register a chat user Register a user that returns an access token for accessing chat.
+
Request Body schema: application/json
displayName string
Optionally provide a display name you want to assign to this user when registering.
+
Request samples Content type application/json
Response samples Content type application/json
{ "id" : "string" ,
"accessToken" : "string" ,
"displayName" : "string"
}
Chat Messages Backlog Used to get chat messages prior to connecting to the websocket.
+
Response samples Content type application/json
Copy
Expand all Collapse all Get Custom Emoji Get a list of custom emoji that are supported in chat.
+
Response samples Content type application/json
Copy
Expand all Collapse all APIs built to allow 3rd parties to interact with an Owncast server.
+
Set the stream title. post /api/integrations/streamtitle
/api/integrations/streamtitle
Set the title of the currently streaming content.
+
Request Body schema: application/json
value string or integer or object or boolean
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Send a chat message. post /api/integrations/chat/send
/api/integrations/chat/send
Send a chat message on behalf of a 3rd party integration, bot or service.
+
Request Body schema: application/json
body string
The message text that will be sent as the user.
+
Request samples Content type application/json
Response samples Content type application/json
{ "success" : true ,
"message" : "sent"
}
Send a system chat message. post /api/integrations/chat/system
/api/integrations/chat/system
Send a chat message on behalf of the system/server.
+
Request Body schema: application/json
body string
The message text that will be sent as the system user.
+
Request samples Content type application/json
Response samples Content type application/json
{ "success" : true ,
"message" : "sent"
}
Send a chat action. post /api/integrations/chat/action
/api/integrations/chat/action
Send an action that took place to the chat.
+
Request Body schema: application/json
body required
string
The message text that will be sent as the system user.
+
author string
An optional user name that performed the action.
+
Request samples Content type application/json
Response samples Content type application/json
{ "success" : true ,
"message" : "sent"
}
Send system chat message to a client, identified by its ClientId post /api/integrations/chat/system/client/{clientId}
/api/integrations/chat/system/client/{clientId}
Send a chat message on behalf of the system/server to a single client.
+
path Parameters clientId required
integer <int64>
Client ID (a unique numeric Id, identifying the client connection)
+
Request Body schema: application/json
body required
string
The message text that will be sent to the client.
+
Responses 500 Message was not sent to the client
+ Request samples Content type application/json
Response samples Content type application/json
{ "success" : true ,
"messages" : "sent"
}
Create an access token. post /api/admin/accesstokens/create
/api/admin/accesstokens/create
Create a single access token that has access to the access scopes provided.
+
Request Body schema: application/json
name string
The human-readable name to give this access token.
+
scopes
Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Delete an access token. post /api/admin/accesstokens/delete
/api/admin/accesstokens/delete
Delete a single access token.
+
Request Body schema: application/json
Request samples Content type application/json
Response samples Content type application/json
Return all access tokens. get /api/admin/accesstokens Return all of the available access tokens.
+
Responses 200 Tokens are returned
+ Response samples Content type application/json
Set external action URLs. post /api/admin/config/externalactions
/api/admin/config/externalactions
Set a collection of external action URLs that are displayed in the UI.
+
Request Body schema: application/json
Array
url string
URL of the external action content.
+
title string
The title to put on the external action button.
+
description string
Optional additional description to display in the UI.
+
icon string
The URL to an image to place on the external action button.
+
color string
Optional color to use for drawing the action button.
+
openExternally boolean
If set this action will open in a new browser tab instead of an internal modal.
+
Responses 200 Actions have been updated.
+ Request samples Content type application/json
Copy
Expand all Collapse all [ { "url" : "string" ,
"title" : "string" ,
"description" : "string" ,
"icon" : "string" ,
"color" : "string" ,
"openExternally" : true
} ]
Return a list of currently connected clients get /api/integrations/clients
/api/integrations/clients
Return a list of currently connected clients with optional geo details.
+
Responses 200 Successful response of an array of clients
+ Response samples Content type application/json
Copy
Expand all Collapse all [ { "connectedAt" : "2020-10-06T23:20:44.588649-07:00" ,
"messageCount" : 3 ,
"userAgent" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36" ,
"ipAddress" : "172.217.164.110" ,
"user" :
{ "id" : "yklw5Imng" ,
"displayName" : "awesome-pizza" ,
"displayColor" : 42 ,
"createdAt" : "2021-07-08T20:21:25.303402404-07:00" ,
"previousNames" : "awesome-pizza,coolPerson23"
} } ]
Historical Chat Messages get /api/integrations/chat Used to get the backlog of chat messages.
+
Response samples Content type application/json
Copy
Expand all Collapse all Update the visibility of chat messages. post /api/integrations/chat/updatemessagevisibility
/api/integrations/chat/updatemessagevisibility
Pass an array of IDs you want to change the chat visibility of.
+
Request Body schema: application/json
visible boolean
Are these messages visible.
+
idArray
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Chat-related actions that can take place by a moderator.
+
Update the visibility of chat messages. post /api/chat/updatemessagevisibility
/api/chat/updatemessagevisibility
Pass an array of IDs you want to change the chat visibility of.
+
Request Body schema: application/json
visible boolean
Are these messages visible.
+
idArray
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
Copy
Expand all Collapse all Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Disable (block) or re-enable a chat user. post /api/chat/users/setenabled
/api/chat/users/setenabled
Request Body schema: application/json
userId string
User ID of the chat user you're changing.
+
enabled boolean
State of this user. False to block/disable.
+
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
{ "userId" : "string" ,
"enabled" : true
}
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Set moderator priviledges on a chat users. post /api/admin/chat/users/setmoderator
/api/admin/chat/users/setmoderator
Give a chat user ID and be able to grant or remove moderator priviledges to this user.
+
Request Body schema: application/json
userId string
User ID of the chat user you want to change moderation status of.
+
isModerator boolean
The moderator status of this user.
+
Responses 200 Operation Success/Failure Response
+ Request samples Content type application/json
{ "userId" : "xJ84_48Ghj" ,
"isModerator" : true
}
Response samples Content type application/json
Example Operation succeeded. Operation failed. Operation succeeded. Get a list of chat moderator users. get /api/admin/chat/users/moderators
/api/admin/chat/users/moderators
Response samples Content type application/json
Copy
Expand all Collapse all [ { "id" : "yklw5Imng" ,
"displayName" : "awesome-pizza" ,
"displayColor" : 42 ,
"createdAt" : "2019-08-24T14:15:22Z" ,
"previousNames" : "awesome-pizza,user42" ,
} ]
Information The client configuration. Information useful for the user interface.
+
Response samples Content type application/json
Copy
Expand all Collapse all { "name" : "string" ,
"summary" : "string" ,
"logo" : "string" ,
"extraPageContent" : "<p>This page is <strong>super</strong> cool!" ,
"version" : "Owncast v0.0.3-macOS (ef3796a033b32a312ebf5b334851cbf9959e7ecb)"
}
Mark the current viewer as active. For tracking viewer count, periodically hit the ping endpoint.
+
Current Status This endpoint is used to discover when a server is broadcasting, the number of active viewers as well as other useful information for updating the user interface.
+
Response samples Content type application/json
{ "lastConnectTime" : "2020-10-03T21:36:22-05:00" ,
"lastDisconnectTime" : null ,
"online" : true ,
"overallMaxViewerCount" : 420 ,
"sessionMaxViewerCount" : 12 ,
"viewerCount" : 7
}
Yellow Pages Information Information to be used in the Yellow Pages service, a global directory of Owncast servers.
+
Response samples Content type application/json
Copy
Expand all Collapse all { "name" : "string" ,
"description" : "string" ,
"logo" : "string" ,
"nsfw" : true ,
"online" : true ,
"viewerCount" : 0 ,
"overallMaxViewerCount" : 0 ,
"sessionMaxViewerCount" : 0 ,
"lastConnectTime" : "2019-08-24T14:15:22Z"
}
Get the public followers of this instance Response samples Content type application/json
Copy
Expand all Collapse all Return the information needed to redirect a user to a fediverse server to perform a remote follow action. Request Body schema: application/json
Responses 200 Remote follow redirect details
+ Request samples Content type application/json
Response samples Content type application/json