> For the complete documentation index, see [llms.txt](https://developer.fotokite.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.fotokite.com/fotokite-api/subscription.md).

# Subscription

## Connect to web socket

> This endpoint will allow a connection upgrade to a websocket

```json
{"openapi":"3.0.4","info":{"title":"Fotokite API","version":"1.0.0"},"servers":[{"url":"http://192.168.2.100:3128/api","description":"API service running on the system"},{"url":"http://{hostname_or_ip}/api","description":"Unencrypted API anywhere, for development use","variables":{"hostname_or_ip":{"default":"localhost:3128"}}},{"url":"https://{hostname_or_ip}/api","description":"Encrypted API accessible from outside the Sigma network","variables":{"hostname_or_ip":{"default":"fotokite-sigma.local"}}},{"url":"https://{gsname}.sigma.fotokite-system.com/api","description":"Hostname used for TLS certificates. The API is not reachable there, unless a local DNS override is set.","variables":{"gsname":{"default":"G2628RH"}}}],"security":[{"TokenAuth":[]}],"components":{"securitySchemes":{"TokenAuth":{"description":"Plugin authentication using Bearer token. For more details, see [Fotokite API Documentation](https://developer.fotokite.com/~/changes/46/getting-started#authentication).\n","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"http://192.168.2.100:3128/api/v1/auth/token/request","scopes":{"read":"Grants access to retrieve system data and information.","control":"Allows sending commands to control the system.","can_override":"Allows to make `handoff/control/override` call to override current controlling client.","experimental":"Enables access to experimental API features.","internal":"Fotokite-internal functions. Not for third-party use."}}}}}},"paths":{"/v1/{category}/{endpoint}/subscribe":{"get":{"tags":["Subscription"],"summary":"Connect to web socket","description":"This endpoint will allow a connection upgrade to a websocket","parameters":[{"in":"path","name":"category","description":"Category of the endpoint to to subscribe to","required":true,"schema":{"type":"string"}},{"in":"path","name":"endpoint","description":"Which endpoint to subscribe to","required":true,"schema":{"type":"string"}}],"responses":{"101":{"description":"Websocket connection established.","headers":{"Set-Cookie":{"schema":{"type":"string"}}}},"404":{"description":"Endpoint does not exist"},"405":{"description":"Endpoint does not support subscription"}}}}}}
```

## POST /v1/{category}/{endpoint}/subscribe

> Subscribe for updates

```json
{"openapi":"3.0.4","info":{"title":"Fotokite API","version":"1.0.0"},"servers":[{"url":"http://192.168.2.100:3128/api","description":"API service running on the system"},{"url":"http://{hostname_or_ip}/api","description":"Unencrypted API anywhere, for development use","variables":{"hostname_or_ip":{"default":"localhost:3128"}}},{"url":"https://{hostname_or_ip}/api","description":"Encrypted API accessible from outside the Sigma network","variables":{"hostname_or_ip":{"default":"fotokite-sigma.local"}}},{"url":"https://{gsname}.sigma.fotokite-system.com/api","description":"Hostname used for TLS certificates. The API is not reachable there, unless a local DNS override is set.","variables":{"gsname":{"default":"G2628RH"}}}],"security":[{"TokenAuth":[]}],"components":{"securitySchemes":{"TokenAuth":{"description":"Plugin authentication using Bearer token. For more details, see [Fotokite API Documentation](https://developer.fotokite.com/~/changes/46/getting-started#authentication).\n","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"http://192.168.2.100:3128/api/v1/auth/token/request","scopes":{"read":"Grants access to retrieve system data and information.","control":"Allows sending commands to control the system.","can_override":"Allows to make `handoff/control/override` call to override current controlling client.","experimental":"Enables access to experimental API features.","internal":"Fotokite-internal functions. Not for third-party use."}}}}}},"paths":{"/v1/{category}/{endpoint}/subscribe":{"post":{"tags":["Subscription"],"summary":"Subscribe for updates","parameters":[{"in":"path","name":"category","description":"Category of the endpoint to to subscribe to","required":true,"schema":{"type":"string"}},{"in":"path","name":"endpoint","description":"Which endpoint to subscribe to","required":true,"schema":{"type":"string"}},{"in":"cookie","name":"connection","description":"Which connection to use","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Subscribed"},"400":{"description":"No such connection"},"404":{"description":"Endpoint does not exist"},"405":{"description":"Endpoint does not support subscription"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.fotokite.com/fotokite-api/subscription.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
