add http files
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
.idea/
|
.idea/
|
||||||
cert/
|
cert/
|
||||||
|
http/*/http-client.env.json
|
||||||
|
|||||||
@@ -29,13 +29,7 @@ graph TD
|
|||||||
subgraph HM[Hlæja Management]
|
subgraph HM[Hlæja Management]
|
||||||
HMS[Service] -.-> HMR[(Redis)]
|
HMS[Service] -.-> HMR[(Redis)]
|
||||||
end
|
end
|
||||||
subgraph HG[Hlæja Gateway]
|
|
||||||
HGE[Nginx]
|
|
||||||
end
|
|
||||||
|
|
||||||
HG -.-> HDA
|
|
||||||
HG -.-> HRA
|
|
||||||
HG -.-> HM
|
|
||||||
|
|
||||||
HM --> HAR
|
HM --> HAR
|
||||||
HM -.-> HDR
|
HM -.-> HDR
|
||||||
|
|||||||
41
http/account-registry/account.http
Normal file
41
http/account-registry/account.http
Normal 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"
|
||||||
|
]
|
||||||
|
}
|
||||||
8
http/account-registry/accounts.http
Normal file
8
http/account-registry/accounts.http
Normal 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
|
||||||
2
http/account-registry/actuator.http
Normal file
2
http/account-registry/actuator.http
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
### get actuator
|
||||||
|
GET {{hostname}}/actuator
|
||||||
44
http/account-registry/authentication.http
Normal file
44
http/account-registry/authentication.http
Normal 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"
|
||||||
|
}
|
||||||
11
http/account-registry/http-client.env.json-dev
Normal file
11
http/account-registry/http-client.env.json-dev
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"development": {
|
||||||
|
"hostname": "http://localhost:8080"
|
||||||
|
},
|
||||||
|
"docker": {
|
||||||
|
"hostname": "http://localhost:9050"
|
||||||
|
},
|
||||||
|
"testing": {
|
||||||
|
"hostname": "http://10.0.x.x"
|
||||||
|
}
|
||||||
|
}
|
||||||
2
http/device-api/actuator.http
Normal file
2
http/device-api/actuator.http
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
### get actuator
|
||||||
|
GET {{hostname}}/actuator
|
||||||
3
http/device-api/configuration.http
Normal file
3
http/device-api/configuration.http
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
### get configuration
|
||||||
|
GET {{hostname}}/configuration
|
||||||
|
Identity: {{identity}}
|
||||||
14
http/device-api/http-client.env.json-dev
Normal file
14
http/device-api/http-client.env.json-dev
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
23
http/device-api/measurement.http
Normal file
23
http/device-api/measurement.http
Normal 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
|
||||||
|
}
|
||||||
2
http/device-configuration/actuator.http
Normal file
2
http/device-configuration/actuator.http
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
### get actuator
|
||||||
|
GET {{hostname}}/actuator
|
||||||
11
http/device-configuration/http-client.env.json-dev
Normal file
11
http/device-configuration/http-client.env.json-dev
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"development": {
|
||||||
|
"hostname": "http://localhost:8080"
|
||||||
|
},
|
||||||
|
"docker": {
|
||||||
|
"hostname": "http://localhost:9030"
|
||||||
|
},
|
||||||
|
"testing": {
|
||||||
|
"hostname": "http://10.0.x.x"
|
||||||
|
}
|
||||||
|
}
|
||||||
11
http/device-configuration/node.http
Normal file
11
http/device-configuration/node.http
Normal 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"
|
||||||
|
}
|
||||||
2
http/device-data/actuator.http
Normal file
2
http/device-data/actuator.http
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
### get actuator
|
||||||
|
GET {{hostname}}/actuator
|
||||||
11
http/device-data/http-client.env.json-dev
Normal file
11
http/device-data/http-client.env.json-dev
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"development": {
|
||||||
|
"hostname": "http://localhost:8080"
|
||||||
|
},
|
||||||
|
"docker": {
|
||||||
|
"hostname": "http://localhost:9020"
|
||||||
|
},
|
||||||
|
"testing": {
|
||||||
|
"hostname": "http://10.0.x.x"
|
||||||
|
}
|
||||||
|
}
|
||||||
34
http/device-data/measurement.http
Normal file
34
http/device-data/measurement.http
Normal 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
|
||||||
2
http/device-registry/actuator.http
Normal file
2
http/device-registry/actuator.http
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
### get actuator
|
||||||
|
GET {{hostname}}/actuator
|
||||||
10
http/device-registry/device.http
Normal file
10
http/device-registry/device.http
Normal 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
|
||||||
11
http/device-registry/http-client.env.json-dev
Normal file
11
http/device-registry/http-client.env.json-dev
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"development": {
|
||||||
|
"hostname": "http://localhost:8080"
|
||||||
|
},
|
||||||
|
"docker": {
|
||||||
|
"hostname": "http://localhost:9050"
|
||||||
|
},
|
||||||
|
"testing": {
|
||||||
|
"hostname": "http://10.0.x.x"
|
||||||
|
}
|
||||||
|
}
|
||||||
2
http/device-registry/identity.http
Normal file
2
http/device-registry/identity.http
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
### get identity
|
||||||
|
GET {{hostname}}/identity/device-00000000-0000-0000-0000-000000000001
|
||||||
9
http/device-registry/node.http
Normal file
9
http/device-registry/node.http
Normal 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"
|
||||||
|
}
|
||||||
20
http/device-registry/type.http
Normal file
20
http/device-registry/type.http
Normal 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."
|
||||||
|
}
|
||||||
17
http/device-registry/types.http
Normal file
17
http/device-registry/types.http
Normal 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
|
||||||
5
http/registry-api/actuator.http
Normal file
5
http/registry-api/actuator.http
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
### get actuator
|
||||||
|
GET {{hostname}}/actuator`
|
||||||
|
Authorization: Bearer {{token}}
|
||||||
|
Content-Type: application/json`
|
||||||
|
|
||||||
8
http/registry-api/authentication.http
Normal file
8
http/registry-api/authentication.http
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
### account login
|
||||||
|
POST {{hostname}}/login
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"username": "admin",
|
||||||
|
"password": "pass"
|
||||||
|
}
|
||||||
14
http/registry-api/http-client.env.json-dev
Normal file
14
http/registry-api/http-client.env.json-dev
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
8
http/registry-api/registry.http
Normal file
8
http/registry-api/registry.http
Normal 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"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user