Streetlights API
1.0.0

The Smartylighting Streetlights API allows you to remotely manage the city lights.

Check out its awesome features:
  • Turn a specific streetlight on/off 🌃
  • Dim a specific streetlight 😎
  • Receive real-time information about environmental lighting conditions 📈

This is the documentation for version 1.0.0 of the API. Last update on Feb 25, 2021.

This API is provided under license Apache 2.0.

Protocol: mqtt
test.mosquitto.org:{port}

Authentication

The API accepts 3 different authentication methods:

Api key

Provide your API key as the user and leave the password empty.

Supported oauth flows (oauth2)

Flows to support OAuth 2.0

Flow type implicit
Authorization URL https://authserver.example/auth
Scopes
  • streetlights:on: Ability to switch lights on
  • streetlights:dim: Ability to dim the lights
  • streetlights:off: Ability to switch lights off
Flow type password
Token URL https://authserver.example/token
Scopes
  • streetlights:on: Ability to switch lights on
  • streetlights:dim: Ability to dim the lights
  • streetlights:off: Ability to switch lights off
Flow type clientCredentials
Token URL https://authserver.example/token
Scopes
  • streetlights:on: Ability to switch lights on
  • streetlights:dim: Ability to dim the lights
  • streetlights:off: Ability to switch lights off
Flow type authorizationCode
Authorization URL https://authserver.example/auth
Token URL https://authserver.example/token
Refresh URL https://authserver.example/refresh
Scopes
  • streetlights:on: Ability to switch lights on
  • streetlights:dim: Ability to dim the lights
  • streetlights:off: Ability to switch lights off

Open id connect well known (openIdConnect)

OpenID Connect is a simple identity layer on top of the OAuth 2.0 protocol. It enables Applications to verify the identity of End-Users based on the authentication performed by an Authorization Server.

The OpenID Connect URL for this API is: https://authserver.example/.well-known.