API Documentation

Guidelines

The SwissHomeguard API allows you to exchange data with a SwissHomeguard system and perform control actions

  • Authentication and Security
    The SwissHomeguard REST API is served over HTTPS only, to support data privacy. Access to the API requires a Bearer token. This token is issued to a developers account and only valid for a specific system.
  • Rate Limiting
    The rate limitation is implemented as a counter with a maximum limit of 10000 per day. Each request decrements the counter by 1 until you reach zero. As long as the counter is zero, the API returns error code 429.
  • Inefficient API calls
    Your application should accomplish its goals with the minimum number of API requests. For example, execute API requests only when they are effectively needed.

HTTP Status Codes

The API uses standard HTTP status codes to indicate the success or failure of an API request.

Success Codes

  • 200: OK
  • 201: Accepted for processing, but the processing has not been completed

Error Codes

  • 401:Not Authenticated. Missing a valid basic authentication header
  • 404:Not Found. Requested resource not found
  • 406:Not Acceptable. Cannot respond with content type requested in accept: header
  • 429:Too Many Requests. Probably above rate limit