Python
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
overlay = client.streaming.streams.overlays.get(
overlay_id=0,
stream_id=0,
)
print(overlay.id)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/option"
"github.com/G-Core/gcore-go/streaming"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
overlay, err := client.Streaming.Streams.Overlays.Get(
context.TODO(),
0,
streaming.StreamOverlayGetParams{
StreamID: 0,
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", overlay.ID)
}
curl --request GET \
--url https://api.gcore.com/streaming/streams/{stream_id}/overlays/{overlay_id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/streaming/streams/{stream_id}/overlays/{overlay_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/streaming/streams/{stream_id}/overlays/{overlay_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/streaming/streams/{stream_id}/overlays/{overlay_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/streaming/streams/{stream_id}/overlays/{overlay_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 1,
"stream_id": 12345,
"url": "http://domain.com/myoverlay1.html",
"width": 120,
"height": 40,
"x": 30,
"y": 30,
"stretch": false,
"created_at": "2023-09-20T00:01:01.000Z",
"updated_at": "2023-10-01T12:01:01.000Z"
}{
"status": 404,
"error": "Not Found. Entity you are looking for was not found, please check the initial parameters"
}{
"error": "Feature is disabled. Contact support to enable."
}Overlays
Get overlay
Get overlay details
GET
/
streaming
/
streams
/
{stream_id}
/
overlays
/
{overlay_id}
Python
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
overlay = client.streaming.streams.overlays.get(
overlay_id=0,
stream_id=0,
)
print(overlay.id)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/option"
"github.com/G-Core/gcore-go/streaming"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
overlay, err := client.Streaming.Streams.Overlays.Get(
context.TODO(),
0,
streaming.StreamOverlayGetParams{
StreamID: 0,
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", overlay.ID)
}
curl --request GET \
--url https://api.gcore.com/streaming/streams/{stream_id}/overlays/{overlay_id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/streaming/streams/{stream_id}/overlays/{overlay_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/streaming/streams/{stream_id}/overlays/{overlay_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/streaming/streams/{stream_id}/overlays/{overlay_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/streaming/streams/{stream_id}/overlays/{overlay_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 1,
"stream_id": 12345,
"url": "http://domain.com/myoverlay1.html",
"width": 120,
"height": 40,
"x": 30,
"y": 30,
"stretch": false,
"created_at": "2023-09-20T00:01:01.000Z",
"updated_at": "2023-10-01T12:01:01.000Z"
}{
"status": 404,
"error": "Not Found. Entity you are looking for was not found, please check the initial parameters"
}{
"error": "Feature is disabled. Contact support to enable."
}Authorizations
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234_abcdef
Response
Successful
Valid http/https URL to an HTML page/widget
ID of the overlay
ID of a stream to which it is attached
Datetime of creation in ISO 8601
Datetime of last update in ISO 8601
Width of the widget
Height of the widget
Coordinate of left upper corner
Coordinate of left upper corner
Switch of auto scaling the widget. Must not be used as "true" simultaneously with the coordinate installation method (w, h, x, y).
Was this page helpful?