Teleport Api

Integrirajte Teleport u svoje rješenje pomoću ugradnje i API-ja

Overview

  • Using the Teleport APIs you can create, manage, view and broadcast Teleport feeds.
  • Simple REST APIs that return JSON, easily consumed from any website or app.
  • Get your APIKEY from the Account Dashboard → Api section. It can be either the primary or secondary key.
  • Get your ACCESSKEY from the Feed Dashboard → Embed & Link → Public image links section. It gives view only access to the feed.

Player embedding

The embed code is as follows:

<iframe width="WIDTH" height="HEIGHT" src="https://www.teleport.io/api/v2/player?feedid=FEEDID&frametime=FRAMETIME&playmode=PLAYMODE&playmodespossible=PLAYMODESPOSSIBLE&framesizingmode=FRAMESIZINGMODE&showsplashbadge=SHOWSPLASHBADGE&showoverlaybadge=SHOWOVERLAYBADGE&overlayopacity=OVERLAYOPACITY&backgroundcolor=BACKGROUNDCOLOR&videoplayspeed=VIDEOPLAYSPEED&imageplayspeed=IMAGEPLAYSPEED&playframeskipinterval=PLAYFRAMESKIPINTERVAL&playframecount=PLAYFRAMECOUNT&accesskey=ACCESSKEYcustomArgs#" frameborder="0" allow="fullscreen" allowfullscreen></iframe>
  • Also you can embed the player without black bars with auto sizing using the script method.
  • You can embed multiple players on a single page by using multiple iframe embed codes.
  • FEED is found in the feed profile url or on this API dashboard page.
  • PLAYMODE is one of [liveimage, liveimageloop, livetimelapse, historyimage].
  • WIDTH,HEIGHT are pixel values. Use 100% for width to fill available horizontal space.
  • PLAYMODESPOSSIBLE is a comma separated list of the above.
  • FRAMESIZINGMODE is one of [auto, uniformtofill, uniform].
  • FRAMETIME is a timestamp referring to an existing frame; if it doesn't exist, the most recent or live frame is shown. Use the UTC 8601 format, e.g. 2026-09-21T01:25:47Z. Get this value from the player share section while viewing the frame of interest.
  • IMAGEPLAYSPEED controls how fast images change in live loop and history image play modes. Formats: ?.??sec, ?.??fps or ?.??x.
  • PLAYFRAMESKIPINTERVAL controls the interval between played frames in live loop and history image play modes. One of [sec, min, 5min, 15min, hour, day, month]. Custom values aren't supported yet — email us if you need one.
  • PLAYFRAMECOUNT controls how many frames to play. Applies to live loop play mode only at this time. Value between 1 and 1000.
  • VIDEOPLAYSPEED controls how fast time-lapse video plays. Formats: ?.??sec, ?.??fps or ?.??x; the value multiplies the original video rate.
  • APIKEY embeds the player with an API key, giving access to all feeds on the account, including non-public ones. WARNING: do not use this on public websites!
  • ACCESSKEY embeds the player with a share key, giving access to the feeds it covers, including non-public ones.
  • More coming soon! Please contact us for any help.

Example player with custom options, uniform sizing and live loop as the default play mode

Demo code

V2 Player Embedding

The V2 player has a minimal UI and began as support for non-interactive scenarios such as digital signage and lobby TVs with a custom playlist. UI is being added, and it will replace the V1 player shortly.

Demo code

Access feed images

Access a live feed image

GET
https://www.teleport.io/api/v2/frame-get?feedid=FEEDID&sizecode=SIZECODE&apikey=APIKEY&accesskey=ACCESSKEY
  • Returns the JPG image data for the specified image size.
  • SIZECODE is one of [x480, x768, x1080, x2160, x4320] image sizes.
  • The image is at most the specified size. It may be smaller if the feed doesn't have that size.
  • Guaranteed to return an image if one exists, regardless of SIZECODE.
  • Http method: GET

Demo code

Access a recorded feed image

GET
https://www.teleport.io/api/v2/frame-get?feedid=FEEDID&frametime=FRAMETIME&sizecode=SIZECODE&timematch=TIMEMATCH&apikey=APIKEY&accesskey=ACCESSKEY
  • Returns the JPG image data for the specified size, recorded at the requested time. The time must be accurate to the second, otherwise a 404 is returned.
  • FRAMETIME is in UTC format, e.g. 2026-09-21T01:25:47Z
  • SIZECODE is one of [x480, x768, x1080, x2160, x4320] image sizes.
  • TIMEMATCH is one of [closest-future, closest-past, closest-any, exact]. Defaults to exact, meaning no image is returned if none exists for the given frame time.
  • The image is at most the specified size. It may be smaller if the feed doesn't have that size.
  • Guaranteed to return an image if one exists, regardless of SIZECODE.
  • If the image doesn't exist, add the optional &sizecode=c to return the closest existing image to the timestamp; without it you'll get a 404.
  • Http method: GET

Demo code

Access recorded time-lapse video

GET
https://www.teleport.io/api/v2/video-get?feedid=FEEDID&videoquery=VIDEOQUERY&videotype=VIDEOTYPE&videopartnumber=VIDEOPARTNUMBER&sizecode=SIZECODE&querydata=QUERYDATA&apikey=APIKEY&accesskey=ACCESSKEY
  • Returns the MP4 video data for a video or video part matching the query by name and type. If querydata is set, returns JSON query results instead of video content.
  • VIDEOQUERY the full or partial name or tags of the video profile to match, e.g. 'all-time' or 'recent'. For more precision, use a | separated list ordered as videoProfile | videoName or videoTags or videoSpeed, e.g. "all-time|108,000x", "recent|Last 30 days" (name) or "recent|last-30-days" (tags). Tags can be set on the video profile and videos to simplify queries. Encode spaces as %20 or +.
  • VIDEOTYPE is one of [live, complete, completeorlive]. completeorlive returns the complete video, or the live video if no complete one exists.
  • SIZECODE is one of [x480, x768, x1080, x2160, x4320] video sizes; matches a video of that size if it exists in the video profile and has been generated.
  • QUERYDATA set to true to return JSON with basic video info such as duration and number of parts.
GET
https://www.teleport.io/api/v2/video-get?feedid=FEEDID&videoResourceId=VIDEORESOURCEID&videoId=VIDEOID&videoPartId=VIDEOPARTID&rt=VIDEOTIMESTAMP&apikey=APIKEY&accesskey=ACCESSKEY
  • Returns the MP4 video data for a specific video or video part. The ids come from a querydata=true query. Videos are chunked into multiple parts to avoid 20–50GB files.
  • RT is the video timestamp that ensures you retrieve the latest version of the live video; get it from the querydata=true result.
  • Http method: GET

Demo code

Manage feeds

Get feed information

GET
https://www.teleport.io/api/v2/feed-get?feedid=FEEDID&apikey=APIKEY&accesskey=ACCESSKEY
  • Returns feed properties such as name and description.
  • Http method: GET

Demo code

Set feed state

POST
https://www.teleport.io/api/v2/feed-setstate?feedid=FEEDID&feedstate=FEEDSTATE&feedstateautoenable=true|false&feedstateautodisableinterval=FEEDSTATEAUTODISABLEINTERVAL&apikey=APIKEY
  • Changes feed state immediately.
  • FEEDSTATE is one of [capture, view, disable, archive].
  • FEEDSTATEAUTODISABLEINTERVAL is an interval in PnDTnHnMn.nS format, e.g. P1D for 1 day, PT1H for 1 hour. See here for more.
  • APIKEY is required. Don't use this method in client-side code, as it would expose your API key to the public.
  • Http method: POST

Demo code

Manage recorded frames

Query recorded frames

GET
https://www.teleport.io/api/v2/frame-query?feedid=FEEDID&starttime=STARTTIME&endtime=ENDTIME&interval=INTERVAL&apikey=APIKEY&accesskey=ACCESSKEY
  • Returns an array of timestamps for use with frame-get or frame-delete.
  • STARTTIME is in UTC format, e.g. 2026-09-21T01:25:47Z
  • ENDTIME is in UTC format, e.g. 2026-09-21T01:25:47Z
  • INTERVAL is the seconds between each returned frame; use it to thin the result set, e.g. 3600 for frames 1 hour apart.
  • Http method: GET

Demo code

Delete recorded frames

DELETE
https://www.teleport.io/api/v2/frame-delete?feedid=FEEDID&frametime=FRAMETIME&apikey=APIKEY
  • Permanently deletes the specified frame.
  • Use the frame-query API to get frame timestamps.
  • FRAMETIME is the exact frame timestamp to delete, in UTC format, e.g. 2026-09-21T01:25:47Z
  • APIKEY is required to delete on all feeds. ACCESSKEY is ignored by this method.
  • Http method: DELETE

Demo code

Upload an image to a feed

POST
https://www.teleport.io/api/v2/frame-set?feedid=FEEDID&frametime=FRAMETIME&broadcastkey=BROADCASTKEY&apikey=APIKEY
  • Uploads a single image as a frame to the specified feed.
  • FRAMETIME is the time the frame was recorded, in UTC format, e.g. 2026-09-21T01:25:47Z. If omitted, the current UTC time is used.
  • A broadcast key or API key is required to upload frames.
  • The request body must contain the image data in binary form. PNG and JPEG are supported.
  • The content must be less than 10MB.
  • Http method: POST

Demo code, upload from file

Demo code, upload from webcam (supported platform only)

Import and export with PowerShell

Import historical images or broadcast live images to Teleport

  • Broadcast PNG or JPG images using a PowerShell script.
  • It can also upload live images, for example from a local folder another app writes images into.
  • The script uses the public APIs above, so you can easily modify it for custom needs.
  • Download the Teleport PowerShell broadcast script.

Export recorded data

How to use the Teleport PowerShell export script:

  • The script isn't signed, so Windows may warn you — only run scripts you trust. Right-click the downloaded file, open Properties and Unblock it.
  • To open PowerShell, press Windows + R, type powershell and click 'OK'.
  • At the prompt, type $PSVersionTable.PSVersion to check the version; if Major is below 4 you need to upgrade. Install PowerShell 7.1 from here.
  • Next, enable the execution policy; this requires running PowerShell as Administrator. Right-click the PowerShell icon in the task bar and click Run as administrator. Type Set-ExecutionPolicy Unrestricted. When you're done exporting, type Set-ExecutionPolicy Restricted to restore it.
  • In the PowerShell window, go to the folder where the script was downloaded using cd C:\Users\UserName\Downloads.
  • Finally, type .\teleport-export.ps1 to run the script. You'll be prompted for all parameters before the export begins. Type !? at any prompt for help.
  • To run directly from the command line use: .\teleport-export.ps1 -feedId 'feedid' -startTime 20240601T000000 -endTime 20240901T000000 -interval 20000 -sizeCodes ('x480', 'x768', 'x1080', 'x2160', 'x4320') -key 'apikey or accesskey' -exportFolder 'C:\TeleportExport\'
  • The interval argument is the seconds between exported frames, e.g. 0 exports all frames, 60 exports frames 60 sec apart.
  • To export only the largest available images (skipping scaled down copies) use just the 'x4320' sizeCode argument or leave it empty.
  • To load the script into PowerShell, run . .\teleport-export.ps1 (note the extra . and space before the main command).
  • Once you do this, type Teleport-Export to run the export function directly, or get-help Teleport-Export -detailed to get help.

Download the export script from the command line on Linux, macOS or Windows

  • Install PowerShell for Linux or macOS; Windows comes with it installed.
  • Start a PowerShell terminal window and execute this command to download the Teleport export script:
    # on Linux or OSX
        wget -q https://blob.teleport.io/apps/powershell/teleport-export.ps1 -O teleport-export.ps1
    
        # on Windows this is done using
        Invoke-WebRequest -Uri https://blob.teleport.io/apps/powershell/teleport-export.ps1 -OutFile teleport-export.ps1
  • Give it execute permission, not required on Windows:
    chmod +x teleport-export.ps1
  • And run it:
    ./teleport-export.sh

Here is an example command, which will export the 4K and 1080p images between the given dates; interval 0 downloads all images.

.\Teleport-Export -feedId yourFeedId -sizeCodes 'x2160', 'x1080' -key yourApiKey -startTime 2021-01-22T00:00:00Z -endTime 2023-01-22T00:00:00Z -interval 0 -exportFolder "C:\TeleportExport\"

Explore the API and generate code (Swagger)

The Teleport Swagger UI gives you an always up-to-date specification of every public REST endpoint, including request/response schemas and inline try-it-out tooling.

  • Open the interactive explorer at /swagger to browse endpoints by controller, inspect required parameters, and run calls against your environment.
  • Need a machine-readable contract for client generation or integration tests? Download the OpenAPI document directly from /swagger/v2/swagger.json.
  • Auto-generate client libraries in any language with tools such as OpenAPI Generator or NSwag.
  • Swagger reflects the same v2 APIs documented above, so you can prototype requests visually, then copy the generated cURL or C# snippets into your automation.
  • Authentication works the same way — pass your APIKEY or ACCESSKEY as query parameters when testing endpoints within Swagger UI.
Open Swagger UI

Point your teams to the Swagger endpoint whenever they need to discover operations, verify payloads, or validate Teleport responses during development.

Integriraj s Teleport

Želite li integrirati Teleport s vlastitim sustavima ili trebate specijalizirane značajke prilagođene vašem poslovanju? Naš tim vam može pomoći u izgradnji pravog rješenja.

Kontaktirajte nas