Announcement Banner

tchstnut

updated

2 years ago

T

tchstnut

1 Rookie

•

6 Posts

0

149

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?  

  • Phil.Lam

    4 Apprentice

    •

    642 Posts

    •

    15 Points

    0

    0

    Posted 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" :
    ...




  • DELL-Sam L

    Community Manager

    •

    8095 Posts

    •

    34547 Points

    0

    0

    Posted 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.

  • tomfinn

    1 Rookie

    •

    7 Posts

    •

    2 Points

    0

    0

    Posted 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
  • tchstnut

    1 Rookie

    •

    6 Posts

    0

    0

    Posted February 4th, 2025 19:09

    @Phil.Lam​ Been away for a while, but that did help and gave me the exact call I was looking for not with this call I was trying to make in this post, but another cli command that I was struggling with finding an approprate API call for.  

    (edited)