For the complete documentation index, see llms.txt. This page is also available as Markdown.

Getting started

Install api-preview

1

Using Fotokite Live, navigate to the System Update menu.

2

From the options menu, select Change Channel

3

Select the api-preview channel and navigate back. If api-preview does not appear for your system, contact Fotokite to get you enrolled in the Fotokite API Early Access Program (EAP).

4

Update the system to the latest version.

Access the API

1

Connect your Client Device over Wi-Fi or Ethernet. We recommend Ethernet for better reliability.

2

In Fotokite Live, navigate to System Connect > Advanced Settings from the options menu.

3

In the Upstream Ethernet section, select Bridged.

4

Connect your Client Device to the Ethernet port on the Ground Station and configure it to use DHCP. It will receive an IP address in the 192.168.2.0/24 range and have Internet access, as long as the Ground Station has Internet access.

5

Now it will be possible to access the Fotokite API over HTTP. Please ensure your request is authenticated as described in Authentication.

curl http://192.168.2.100:3128/api/v0/info/system \
--oauth2-bearer <auth_token>

If the command hangs or times out, or you receive a "no route to host" error, your Client Device is not correctly connected to the Fotokite system.

If there is a "Connection refused" error, the Fotokite system is not running an API-enabled software version. Make sure an API release is installed. Learn more in Install api-preview.

Authentication

The authentication mechanism ensures proper security and access control. Most API endpoints are protected by this workflow and are scoped, meaning each request to a protected endpoint must include a valid Bearer Token.

1

During the beta phase, you can use the following API Key.

DemoApiKey123

In future releases, API Keys will always be issued directly by Fotokite.

2

To obtain a Token, send a request using POST /v0/authentication/tokens/request by including your API Key (client_secret).

curl -X POST "http://192.168.2.100:3128/api/v0/authentication/tokens/request" \
  -H "Content-Type: application/json" \
  -d '{
    "client_secret": "DemoApiKey123"
  }'

Alternatively, you can use scopes for more granular control. Available scopes are

info, telemetry, command, media
curl -X POST "http://192.168.2.100:3128/api/v0/authentication/tokens/request" \
  -H "Content-Type: application/json" \
  -d '{
    "client_secret": "DemoApiKey123"
    "scope": "info,command"
  }'
3

The Token (Bearer Token) is what you use to authenticate all subsequent requests to protected endpoints.

curl -X GET "http://192.168.2.100/api/v0/info/system" \
--oauth2-bearer <auth_token>

Tokens can be invalidated via POST /v0/authentication/tokens/invalidate. Once invalidated, you must request a new one using your API Key.

Basic REST endpoints

Basic information about the system, the flight status, and current system notifications are available at these endpoints:

To control the system use:

WebSocket subscriptions for event-based updates

The Fotokite API can notify your application about changes using a WebSocket based protocol. To demonstrate this, we will use the websocat tool; for your application, you can use any WebSocket client library.

You can subscribe to almost any endpoint by appending /subscribe to the endpoint URL:

The Fotokite system will send updated information over the websocket as soon as it is available. The data will be formatted as a sequence of WebSocket messages, each containing one JSON object of the same form as reported by the endpoint itself.

Accessing video streams

Video streams are available as H.264 encoded RTSP sources. These can be read using any RTSP client. Learn more in Local Video Streaming (RTSP).

To retrieve information about the videostreams use:

Example response.

The video streams will only be available while the Kite is flying; otherwise the cameras turn off after a while. For low latency, we recommend using GStreamer with a pipeline set up like this:

Some code examples can be found here

Last updated