add opnsense-api requests to bruno
This commit is contained in:
parent
d526839bfa
commit
589c3f2890
@ -1,6 +1,8 @@
|
|||||||
vars {
|
vars {
|
||||||
opnsense_key: 33NhXqaJwrWy1T4Qi60GK90RXJuS3PWIYwlwYPnQ8f5YPe/J1q/g6/l4bZ2/kJk71MFhwP+9mr+IiQPi
|
opnsense_key: 33NhXqaJwrWy1T4Qi60GK90RXJuS3PWIYwlwYPnQ8f5YPe/J1q/g6/l4bZ2/kJk71MFhwP+9mr+IiQPi
|
||||||
|
base: https://opnsense.home
|
||||||
}
|
}
|
||||||
vars:secret [
|
vars:secret [
|
||||||
|
vpn_endpoint,
|
||||||
opnsense_secret
|
opnsense_secret
|
||||||
]
|
]
|
||||||
|
38
bruno/opnsense-api/Add Client Builder.bru
Normal file
38
bruno/opnsense-api/Add Client Builder.bru
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
meta {
|
||||||
|
name: Add Client Builder
|
||||||
|
type: http
|
||||||
|
seq: 9
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
url: {{base}}/api/wireguard/client/addClientBuilder
|
||||||
|
body: json
|
||||||
|
auth: inherit
|
||||||
|
}
|
||||||
|
|
||||||
|
headers {
|
||||||
|
Content-Type: application/json
|
||||||
|
}
|
||||||
|
|
||||||
|
body:json {
|
||||||
|
{
|
||||||
|
"configbuilder": {
|
||||||
|
"enabled": "1",
|
||||||
|
"name": "{{clientName}}",
|
||||||
|
"pubkey": "{{clientPubkey}}",
|
||||||
|
"psk": "{{psk}}",
|
||||||
|
"tunneladdress": "{{clientTunnelAddress}}",
|
||||||
|
"keepalive": "",
|
||||||
|
"server": "{{serverUuid}}",
|
||||||
|
"endpoint": "{{vpn_endpoint}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vars:pre-request {
|
||||||
|
clientName: vpgen-test
|
||||||
|
clientPubkey: BJ5faPVJsDP4CCxNYilmKnwlQXOtXEOJjqIwb4U/CgM=
|
||||||
|
psk: 0LWopbrISXBNHUxr+WOhCSAg+0hD8j3TLmpyzHkBHCQ=
|
||||||
|
clientTunnelAddress: 10.18.11.101/32,fd00::1/128
|
||||||
|
serverUuid: 99f278fb-5b79-4fde-b3d8-afab19f1fc07
|
||||||
|
}
|
@ -5,14 +5,13 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
url: https://opnsense.home/api/wireguard/service/show
|
url: {{base}}/api/wireguard/service/show
|
||||||
body: json
|
body: json
|
||||||
auth: inherit
|
auth: inherit
|
||||||
}
|
}
|
||||||
|
|
||||||
headers {
|
headers {
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Accept: application/json
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body:json {
|
body:json {
|
||||||
@ -20,9 +19,13 @@ body:json {
|
|||||||
"current": 1,
|
"current": 1,
|
||||||
"rowCount": 7,
|
"rowCount": 7,
|
||||||
"sort": {},
|
"sort": {},
|
||||||
"searchPhrase": "",
|
"searchPhrase": "{{searchPhrase}}",
|
||||||
"type": [
|
"type": [
|
||||||
"interface"
|
"interface"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vars:pre-request {
|
||||||
|
searchPhrase:
|
||||||
|
}
|
||||||
|
11
bruno/opnsense-api/Get Key Pair.bru
Normal file
11
bruno/opnsense-api/Get Key Pair.bru
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
meta {
|
||||||
|
name: Get Key Pair
|
||||||
|
type: http
|
||||||
|
seq: 7
|
||||||
|
}
|
||||||
|
|
||||||
|
get {
|
||||||
|
url: {{base}}/api/wireguard/server/key_pair
|
||||||
|
body: none
|
||||||
|
auth: inherit
|
||||||
|
}
|
11
bruno/opnsense-api/Get PSK.bru
Normal file
11
bruno/opnsense-api/Get PSK.bru
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
meta {
|
||||||
|
name: Get PSK
|
||||||
|
type: http
|
||||||
|
seq: 8
|
||||||
|
}
|
||||||
|
|
||||||
|
get {
|
||||||
|
url: {{base}}/api/wireguard/client/psk
|
||||||
|
body: none
|
||||||
|
auth: inherit
|
||||||
|
}
|
@ -5,14 +5,13 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
url: https://opnsense.home/api/wireguard/service/show
|
url: {{base}}/api/wireguard/service/show
|
||||||
body: json
|
body: json
|
||||||
auth: inherit
|
auth: inherit
|
||||||
}
|
}
|
||||||
|
|
||||||
headers {
|
headers {
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Accept: application/json
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body:json {
|
body:json {
|
||||||
@ -20,9 +19,13 @@ body:json {
|
|||||||
"current": 1,
|
"current": 1,
|
||||||
"rowCount": 7,
|
"rowCount": 7,
|
||||||
"sort": {},
|
"sort": {},
|
||||||
"searchPhrase": "",
|
"searchPhrase": "{{searchPhrase}}",
|
||||||
"type": [
|
"type": [
|
||||||
"peer"
|
"peer"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vars:pre-request {
|
||||||
|
searchPhrase:
|
||||||
|
}
|
||||||
|
15
bruno/opnsense-api/Get Server Info.bru
Normal file
15
bruno/opnsense-api/Get Server Info.bru
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
meta {
|
||||||
|
name: Get Server Info
|
||||||
|
type: http
|
||||||
|
seq: 6
|
||||||
|
}
|
||||||
|
|
||||||
|
get {
|
||||||
|
url: {{base}}/api/wireguard/client/get_server_info/:server_uuid
|
||||||
|
body: none
|
||||||
|
auth: inherit
|
||||||
|
}
|
||||||
|
|
||||||
|
params:path {
|
||||||
|
server_uuid: 8799c789-b6fb-4aa8-9dac-edf18d860340
|
||||||
|
}
|
11
bruno/opnsense-api/List Servers.bru
Normal file
11
bruno/opnsense-api/List Servers.bru
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
meta {
|
||||||
|
name: List Servers
|
||||||
|
type: http
|
||||||
|
seq: 6
|
||||||
|
}
|
||||||
|
|
||||||
|
get {
|
||||||
|
url: {{base}}/api/wireguard/client/list_servers
|
||||||
|
body: none
|
||||||
|
auth: inherit
|
||||||
|
}
|
11
bruno/opnsense-api/Reconfigure.bru
Normal file
11
bruno/opnsense-api/Reconfigure.bru
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
meta {
|
||||||
|
name: Reconfigure
|
||||||
|
type: http
|
||||||
|
seq: 10
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
url: {{base}}/api/wireguard/service/reconfigure
|
||||||
|
body: none
|
||||||
|
auth: inherit
|
||||||
|
}
|
30
bruno/opnsense-api/Search Client.bru
Normal file
30
bruno/opnsense-api/Search Client.bru
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
meta {
|
||||||
|
name: Search Client
|
||||||
|
type: http
|
||||||
|
seq: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
url: {{base}}/api/wireguard/client/searchClient
|
||||||
|
body: json
|
||||||
|
auth: inherit
|
||||||
|
}
|
||||||
|
|
||||||
|
headers {
|
||||||
|
Content-Type: application/json
|
||||||
|
}
|
||||||
|
|
||||||
|
body:json {
|
||||||
|
{
|
||||||
|
"current": 1,
|
||||||
|
"rowCount": 7,
|
||||||
|
"sort": {},
|
||||||
|
"servers": ["{{serverUuid}}"],
|
||||||
|
"searchPhrase": "{{searchPhrase}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vars:pre-request {
|
||||||
|
searchPhrase:
|
||||||
|
serverUuid: 64e1d6ec-980a-463d-8583-c863d8e9852b
|
||||||
|
}
|
28
bruno/opnsense-api/Search Server.bru
Normal file
28
bruno/opnsense-api/Search Server.bru
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
meta {
|
||||||
|
name: Search Server
|
||||||
|
type: http
|
||||||
|
seq: 4
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
url: {{base}}/api/wireguard/server/searchServer
|
||||||
|
body: json
|
||||||
|
auth: inherit
|
||||||
|
}
|
||||||
|
|
||||||
|
headers {
|
||||||
|
Content-Type: application/json
|
||||||
|
}
|
||||||
|
|
||||||
|
body:json {
|
||||||
|
{
|
||||||
|
"current": 1,
|
||||||
|
"rowCount": 7,
|
||||||
|
"sort": {},
|
||||||
|
"searchPhrase": "{{searchPhrase}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vars:pre-request {
|
||||||
|
searchPhrase:
|
||||||
|
}
|
7
bruno/opnsense-api/folder.bru
Normal file
7
bruno/opnsense-api/folder.bru
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
meta {
|
||||||
|
name: opnsense-api
|
||||||
|
}
|
||||||
|
|
||||||
|
headers {
|
||||||
|
Accept: application/json
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user