This function provides the necessary flexbility to make any API call to ANYthing
Highlight text, right-click, select: Make HTTPS Request
This assumes the request is intented for the currently connected device, of which host details are already known.
K13225405: Common iControl REST API command examples
How to use postman api for external tests like post
https://www.npmjs.com/package/axios
/mgmt/tm/sys/clock
url: /mgmt/tm/sys/clock
{
"url": "/mgmt/tm/sys/clock"
}
/mgmt/tm/net/vlan/
/mgmt/tm/ltm/node
/mgmt/tm/sys/service/stats
/mgmt/tm/sys/service/restnoded/stats /mgmt/tm/ltm/virtual/stats?expandSubcollections=true
/mgmt/tm/ltm/virtual?expandSubcollections=true
/mgmt/tm/ltm/virtual
/mgmt/tm/ltm/pool/Commonbigiq.benlab.io_t443_pool?expandSubcollections=true
url: /mgmt/shared/authn/login
method: POST
body:
username: user1
password: dobgispet
url: /mgmt/tm/sys/config
method: POST
body:
command: save
/mgmt/tm/sys/
/mgmt/tm/sys/ucs/
{
"url": "/mgmt/shared/authn/login",
"method": "POST",
"body": {
"username": "todai",
"password": "dobgispet"
}
}
url: /mgmt/tm/sys/config
method: POST
body:
command: save
partition: all
The command will detect if the url has "http", if found, it considers it a fully qualified request destined for something outside of a device defined within the extension
This is based off of NodeJS AXIOS request https://www.npmjs.com/package/axios#request-config
Default HTTP method = GET
data, or body, must also include 'POST' HTTP method
https://api.chucknorris.io/jokes/random
url: https://api.chucknorris.io/jokes/random
url: https://broken.extra.io/whah
url: 'https://postman-echo.com/post'
method: POST
data:
hi: yo
{
"url": "https://postman-echo.com/post",
"method": "POST",
"data": {
"hi": "yo"
}
}
{
"url": "https://192.168.200.131/mgmt/tm/sys/ntp",
"auth": {
"username": "admin",
"password": "yayPassword!",
"sendImmediately": "true"
}
}
{
"url": "https://192.168.200.131:443/mgmt/shared/authn/login",
"method": "POST",
"rejectUnauthorized": "false",
"data": {
"username":"admin",
"password":"benrocks",
"loginProviderName": "tmos"
}
}
I think we need to make sure all the request options are getting merged with defaults appropriately
{
"url": "https://192.168.200.131:443/mgmt/shared/authz/tokens/",
"rejectUnauthorized": "false",
"headers": {
"Content-Type": "application/json",
"X-F5-Auth-Token": "E4IYTVO27Z7MOCG66RJTD7ZHNQ"
}
}
{
"url": "https://192.168.200.131:443/mgmt/tm/ltm/node",
"rejectUnauthorized": "false",
"headers": {
"Content-Type": "application/json",
"X-F5-Auth-Token": "DBZX3AKXJFBBZBNPG7RC6QS6MD"
}
}
"validateStatus": "true",