Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 549c95bb authored by Antoine Blanquet's avatar Antoine Blanquet
Browse files

documentations notices

parent b270124b
# How to use it efficiently with reports:
link : https://lns.campusiot.imag.fr/api#/
The API is a very great tool to understand how to acces to data of the server. it will generate for you the jq and curl command to directly acces to each ressource stocked on the server.
First of all, you need to take the token that you will put on the right top of the page. If you had already run once the generation of reports, you can get your token in the repo : `reports/data/configuration/` in a json file containing "token" in the name.
You are ready to do any acces.
## Specifications
Imagine we want to get a gateway. you can display Model or an Example of what your json will looks like :
**Model**
```C
apiListGatewayResponse {
result (Array[apiGatewayListItem], optional):
Nodes within this result-set. ,
totalCount (string, optional):
Total number of nodes available within the result-set.
}
apiGatewayListItem {
createdAt (string, optional):
Create timestamp. ,
description (string, optional):
A description for the gateway ,
firstSeenAt (string, optional):
First seen timestamp. ,
id (string, optional):
Gateway ID (HEX encoded). ,
lastSeenAt (string, optional):
Last seen timestamp. ,
location (commonLocation, optional):
Location. ,
name (string, optional):
A name for the gateway ,
networkServerID (string, optional):
Network-server ID. ,
organizationID (string, optional):
Organization ID. ,
updatedAt (string, optional):
Last update timestamp.
}
commonLocation {
accuracy (integer, optional):
Accuracy (in meters). ,
altitude (number, optional):
Altitude. ,
latitude (number, optional):
Latitude. ,
longitude (number, optional):
Longitude. ,
source (string, optional):
UNKNOWN: Unknown.
GPS: GPS.
CONFIG: Manually configured.
GEO_RESOLVER: Geo resolver.
= ['UNKNOWN', 'GPS', 'CONFIG', 'GEO_RESOLVER']
string
Default: UNKNOWN
Enum: "UNKNOWN", "GPS", "CONFIG", "GEO_RESOLVER"
}
```
**Example**
```json
{
"result": [
{
"createdAt": "2021-04-07T01:08:12.614Z",
"description": "string",
"firstSeenAt": "2021-04-07T01:08:12.614Z",
"id": "string",
"lastSeenAt": "2021-04-07T01:08:12.614Z",
"location": {
"accuracy": 0,
"altitude": 0,
"latitude": 0,
"longitude": 0,
"source": "UNKNOWN"
},
"name": "string",
"networkServerID": "string",
"organizationID": "string",
"updatedAt": "2021-04-07T01:08:12.614Z"
}
],
"totalCount": "string"
}
```
Click on "Try it out" to get the command line you are looking for.
# Install:
> sudo apt install mailutils postfix
## curl
**curl** is used in command lines or scripts to transfer data.
link : https://curl.se/
## jq
**jq** is a filter that allows you to manage data on json files.
link : https://stedolan.github.io/jq/manual/
Good tutorial to follow : https://www.youtube.com/watch?v=7XUibDYw4mc
......@@ -13,3 +13,14 @@
* Mailbox size limit: 0
* Local address extension character: +
* Internet protocols to use: all
# On `reports`
You can put the receiver of emails in the config files on repo `reports/data/configuration`
```json
{
"chirpstack_api_url": "https://lns.campusiot.imag.fr",
"report_email_to": "XX.XX@univ-grenoble-alpes.fr YY.YY@univ-grenoble-alpes.fr"
}
```
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment