# Hlæja Device API Classes and endpoints, to shape and to steer, Devices and sensors, their purpose made clear. Each message exchanged, each packet that waits, Travels through layers, as data translates. API pathways, structured and strong, Link devices to services, where data belongs. Bound by one purpose, data flows onward, Answering each call, steadfast and forward. ## Properties for deployment | name | required | info | |-------------------------------|:--------:|------------------------------| | spring.profiles.active | ✓ | Spring Boot environment | | server.port | ✓ | HTTP port | | server.ssl.enabled | ✓ | HTTP Enable SSL | | server.ssl.key-store | ✓ | HTTP Keystore | | server.ssl.key-store-type | ✓ | HTTP Cert Type | | server.ssl.key-store-password | ✗ | HTTP Cert Pass | | spring.cache.type | | Cache type (redis) | | spring.data.redis.host | ✓ | Redis host | | spring.data.redis.port | | Redis port | | spring.data.redis.database | ✓ | Redis database | | spring.data.redis.password | ✗ | Redis password | | cache.time-to-live | | Cache time to live (minutes) | | jwt.public-key | ✓ | JWT public key | | device-registry.url | ✓ | Device Register URL | | device-data.url | ✓ | Device Data URL | | device-configuration.url | ✓ | Device Configuration URL | *Required: ✓ can be stored as text, and ✗ need to be stored as secret.* ## Releasing Service Run release pipeline from `master` branch. ## Development Configuration ### Developer Keystore We use a keystore to enable HTTPS for our API. To set up your developer environment for local development, please refer to [generate keystore](https://github.com/swordsteel/hlaeja-development/blob/master/doc/keystore.md) documentation. When generating and exporting the certificate for local development, please store it in the `./cert/keystore.p12` folder at the project root. ### Public RSA Key This service uses the public key from **[Hlæja Device Register](https://github.com/swordsteel/hlaeja-device-registry)** to identify devices. To set up device identification for local development, copy the `public_key.pem` file from the `./cert` directory in **Hlæja Device Register** into the `./cert` directory of this project. *Note: For more information on generating RSA keys, please refer to our [generate RSA key](https://github.com/swordsteel/hlaeja-development/blob/master/doc/rsa_key.md) documentation.* ### Global Settings This services rely on a set of global settings to configure development environments. These settings, managed through Gradle properties or environment variables. *Note: For more information on global properties, please refer to our [global settings](https://github.com/swordsteel/hlaeja-development/blob/master/doc/global_settings.md) documentation.* #### Gradle Properties ```properties repository.user=your_user repository.token=your_token_value influxdb.token=your_token_value ``` #### Environment Variables ```properties REPOSITORY_USER=your_user REPOSITORY_TOKEN=your_token_value INFLUXDB_TOKEN=your_token_value ```