add http files

This commit is contained in:
2025-07-25 00:57:05 +02:00
committed by swordsteel
parent 97991f243f
commit 203150749d
28 changed files with 326 additions and 6 deletions

View File

@@ -0,0 +1,41 @@
### get user by id
GET {{hostname}}/account-00000000-0000-7000-0000-000000000001
### add user
POST {{hostname}}/account
Content-Type: application/json
{
"username": "user01010101",
"password": "p4ssw0rd",
"enabled": true,
"roles": [
"ROLE_ADMIN",
"ROLE_TEST"
]
}
### update user all information
PUT {{hostname}}/account-00000000-0000-7000-0000-000000000002
Content-Type: application/json
{
"username": "user",
"password": "pass",
"enabled": true,
"roles": [
"ROLE_TEST"
]
}
### update user information
PUT {{hostname}}/account-00000000-0000-7000-0000-000000000002
Content-Type: application/json
{
"username": "user",
"enabled": true,
"roles": [
"ROLE_TEST"
]
}

View File

@@ -0,0 +1,8 @@
### Get accounts
GET {{hostname}}/accounts
### Get accounts by page
GET {{hostname}}/accounts/page-1
### Get accounts by page and size
GET {{hostname}}/accounts/page-1/show-1

View File

@@ -0,0 +1,2 @@
### get actuator
GET {{hostname}}/actuator

View File

@@ -0,0 +1,44 @@
### Get admin information
POST {{hostname}}/authenticate
Content-Type: application/json
{
"username": "admin",
"password": "pass"
}
### Get user information
POST {{hostname}}/authenticate
Content-Type: application/json
{
"username": "user",
"password": "pass"
}
### Get bad user
POST {{hostname}}/authenticate
Content-Type: application/json
{
"username": "bad user",
"password": "pass"
}
### Get bad pass
POST {{hostname}}/authenticate
Content-Type: application/json
{
"username": "user",
"password": "bad pass"
}
### Get disabled user
POST {{hostname}}/authenticate
Content-Type: application/json
{
"username": "disabled",
"password": "pass"
}

View File

@@ -0,0 +1,11 @@
{
"development": {
"hostname": "http://localhost:8080"
},
"docker": {
"hostname": "http://localhost:9050"
},
"testing": {
"hostname": "http://10.0.x.x"
}
}

View File

@@ -0,0 +1,2 @@
### get actuator
GET {{hostname}}/actuator

View File

@@ -0,0 +1,3 @@
### get configuration
GET {{hostname}}/configuration
Identity: {{identity}}

View File

@@ -0,0 +1,14 @@
{
"development": {
"hostname": "https://localhost:8443",
"identity": "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
},
"docker": {
"hostname": "https://localhost:9000",
"identity": "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
},
"testing": {
"hostname": "https://10.0.x.x",
"identity": "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
}
}

View File

@@ -0,0 +1,23 @@
### get measurement
GET {{hostname}}/measurement
Identity: {{identity}}
### add measurement for all
POST {{hostname}}/measurement
Content-Type: application/json
Identity: {{identity}}
{
"button0": 0,
"button1": 1,
"button2": 0
}
### add measurement for one
POST {{hostname}}/measurement
Content-Type: application/json
Identity: {{identity}}
{
"button0": 1
}

View File

@@ -0,0 +1,2 @@
### get actuator
GET {{hostname}}/actuator

View File

@@ -0,0 +1,11 @@
{
"development": {
"hostname": "http://localhost:8080"
},
"docker": {
"hostname": "http://localhost:9030"
},
"testing": {
"hostname": "http://10.0.x.x"
}
}

View File

@@ -0,0 +1,11 @@
###
GET {{hostname}}/node-00000000-0000-7000-0000-000000000001
### add measurement for one
PUT {{hostname}}/node-01983d73-3a1e-792e-b910-5673f366fb3b
Content-Type: application/json
{
"configuration": "test"
}

View File

@@ -0,0 +1,2 @@
### get actuator
GET {{hostname}}/actuator

View File

@@ -0,0 +1,11 @@
{
"development": {
"hostname": "http://localhost:8080"
},
"docker": {
"hostname": "http://localhost:9020"
},
"testing": {
"hostname": "http://10.0.x.x"
}
}

View File

@@ -0,0 +1,34 @@
### add measurement for all
POST {{hostname}}/client-00000000-0000-7000-0001-000000000001
Content-Type: application/json
{
"tags": {
"device": "00000000-0000-7000-0002-000000000001",
"node": "00000000-0000-7000-0003-000000000001"
},
"fields": {
"button0": 1,
"button1": 0,
"button2": 1
}
}
### add measurement for one
POST {{hostname}}/client-00000000-0000-7000-0001-000000000001
Content-Type: application/json
{
"tags": {
"device": "00000000-0000-7000-0002-000000000001",
"node": "00000000-0000-7000-0003-000000000001"
},
"fields": {
"button1": 0
}
}
### add measurement
GET {{hostname}}/client-00000000-0000-7000-0001-000000000001/node-00000000-0000-7000-0003-000000000001

View File

@@ -0,0 +1,2 @@
### get actuator
GET {{hostname}}/actuator

View File

@@ -0,0 +1,10 @@
### register device for a type
POST {{hostname}}/device
Content-Type: application/json
{
"type": "00000000-0000-0000-0000-000000000000"
}
### register device for a type
GET {{hostname}}/device-00000000-0000-0000-0000-000000000000

View File

@@ -0,0 +1,11 @@
{
"development": {
"hostname": "http://localhost:8080"
},
"docker": {
"hostname": "http://localhost:9050"
},
"testing": {
"hostname": "http://10.0.x.x"
}
}

View File

@@ -0,0 +1,2 @@
### get identity
GET {{hostname}}/identity/device-00000000-0000-0000-0000-000000000001

View File

@@ -0,0 +1,9 @@
### register node for a client and device with name
POST {{hostname}}/node
Content-Type: application/json
{
"client": "00000000-0000-0000-0000-000000000000",
"device": "01983d72-476e-77ab-9b17-5ba7045b15fa",
"name": "my test device"
}

View File

@@ -0,0 +1,20 @@
### add type
POST {{hostname}}/type
Content-Type: application/json
{
"name": "Test Device 001",
"description": "Description of test device."
}
### get type by id
GET {{hostname}}/type-00000000-0000-0000-0000-000000000000
### update type by id
PUT {{hostname}}/type-00000000-0000-0000-0000-000000000000
Content-Type: application/json
{
"name": "Test Device 001",
"description": "Description of test device."
}

View File

@@ -0,0 +1,17 @@
### get all types
GET {{hostname}}/types
### get all types
GET {{hostname}}/types/page-1
### get all types
GET {{hostname}}/types/page-1/show-2
### get all types
GET {{hostname}}/types/filter-{filter}
### get all types
GET {{hostname}}/types/filter-{filter}/page-1
### get all types
GET {{hostname}}/types/filter-{filter}/page-1/show-2

View File

@@ -0,0 +1,5 @@
### get actuator
GET {{hostname}}/actuator`
Authorization: Bearer {{token}}
Content-Type: application/json`

View File

@@ -0,0 +1,8 @@
### account login
POST {{hostname}}/login
Content-Type: application/json
{
"username": "admin",
"password": "pass"
}

View File

@@ -0,0 +1,14 @@
{
"development": {
"hostname": "https://localhost:8443",
"token": "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
},
"docker": {
"hostname": "https://localhost:9040",
"token": "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
},
"testing": {
"hostname": "https://10.0.x.x",
"token": "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
}
}

View File

@@ -0,0 +1,8 @@
### register device for a type
POST {{hostname}}/register
Authorization: Bearer {{token}}
Content-Type: application/json
{
"type": "00000000-0000-0000-0000-000000000000"
}