Start a Conversation

Unsolved

T

1 Rookie

 • 

2 Posts

25

July 23rd, 2024 13:19

API Call for legacy command

Looking for an API Call for isi sync recovery and can't see to locate it (if it exists).  Anyone know what it might be?  

Moderator

 • 

7K Posts

July 23rd, 2024 21:08

Hello tchstnut,

There is not an api call for isi sync recovery. There is a CLI command but that is all.

1 Rookie

 • 

7 Posts

July 25th, 2024 07:05

  1. Find the Endpoint: Locate the URL for the legacy API.
  2. Understand Command Format: Check required parameters, headers, and HTTP method.
  3. Set Up Request:
    • URL: Use the legacy endpoint.
    • Method: Use GET, POST, etc.
    • Headers: Include necessary headers (e.g., authentication).
    • Parameters: Add query parameters or request body.
  4. Make the Call:
    • cURL: curl -X [METHOD] "[URL]" -H "Authorization: Bearer [TOKEN]" -d "[BODY]"
    • Python: requests.[METHOD]('[URL]', headers={'Authorization': 'Bearer [TOKEN]'}, data={'param': 'value'})
  5. Handle Response: Process the response or errors.

Refer to specific API documentation for details.

4o mini

3 Apprentice

 • 

586 Posts

August 20th, 2024 16:42

@tchstnut

try isi --debug <command>, it should give you the API.

EXAMPLE
onefs97-1# isi --debug network pools list
2024-08-20 09:28:41,961 DEBUG rest.py:87: >>>GET ['18', 'network', 'pools']
...

USING CURL IN BASIC AUTH

onefs97-1# isi_gconfig -t web-config auth_basic=true

onefs97-1# curl --insecure --basic --user root:a  "https://192.168.1.31:8080/platform/18/network/pools"

{
"pools" :
[

{
"access_zone" : "System",
"addr_family" : "ipv4",
"aggregation_mode" : "lacp",
"alloc_method" : "static",
"description" : "Initial ext-1 pool",
"external_manager" : null,
"firewall_policy" : "default_pools_policy",
"groupnet" : "groupnet0",
"id" : "groupnet0.subnet0.pool0",
"ifaces" :
...




No Events found!

Top