# Global Config Release

# Release Status

# URI

GET /admin-api/status/application/global_conf/1

# Request example

# Shell

curl \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  http://admin-site/admin-api/status/application/global_conf/1

# Response example

Status: 200 OK
{
    "time":1625728566,
    "status":0,
    "data":{
        "catch_uped":1,          // Number of synchronized nodes
        "total":2,               // Number of total nodes
        "unsynced_nodes":[       // unsynchronized nodes
            {
                "status":1,
                "id":1,
                "_modified_unix":1625637997.5736,
                "_created_unix":1625637514.0227,
                "config":{
                    "enable_qat":false
                },
                "online_status":true,
                "version":110,
                "sync_status_utime":0,
                "serial":"1677293471",
                "hardware_id":"b4230482bd8154eea67094dd80475762",
                "external_ip":"127.0.0.1"
            }
        ]
    }
}

# Get Unreleased Changes

# URI

GET /admin-api/txlogs/pending/global_conf/1

# Request example

# Shell

curl \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  http://admin-site/admin-api/txlogs/pending/global_conf/1

# Response example

Status: 200 OK
{
    "time":1625730440,
    "status":0,
    "data":{
        "meta":{
            "count":1
        },
        "data":[
            {
                "created_unix":1625730438.9107,
                "id":1835,
                "path":"global.1.ip_list.6",
                "uid":1,
                "new":{                         // new data
                    "id":6,
                    "type":"ipv4",
                    "name":"ip_whitelist2-foo-452851903.com",
                    "items":[
                        {
                            "id":12,
                            "ip":"127.0.0.2",
                            "binstr":"01111111000000000000000000000010"
                        },
                        {
                            "id":63,
                            "ip":"127.0.0.1",
                            "binstr":"01111111000000000000000000000001"
                        }
                    ]
                },
                "origin":{                      // old data
                    "id":6,
                    "type":"ipv4",
                    "name":"ip_whitelist2-foo-452851903.com",
                    "items":[
                        {
                            "id":12,
                            "ip":"127.0.0.2",
                            "binstr":"01111111000000000000000000000010"
                        }
                    ]
                },
                "comment":"",
                "username":"edge-admin",
                "opid":"2b923cc4a85f8e433a634f1a43f8dbf6",
                "op":"update"
            }
        ]
    }
}

# Get The Number of Unreleased Changes

# URI

GET /admin-api/txlogs/pending-count/global_conf/1

# Request example

# Shell

curl \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  http://admin-site/admin-api/txlogs/pending-count/global_conf/1

# Response example

Status: 200 OK
{
    "time":1625731076,
    "status":0,
    "data":1
}

# Get Released Changes

# URI

GET /admin-api/txlogs/list/global_conf/1

# Request example

# Shell

curl \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  http://admin-site/admin-api/txlogs/list/global_conf/1

# Response example

Status: 200 OK
{
    "time":1625731327,
    "status":0,
    "data":{
        "meta":{
            "count":234
        },
        "data":[
            {
                "created_unix":1625730193.5117,
                "is_gray":false,
                "txlog_id":1831,
                "snapshot":{
                    "global.1.ngx":{
                        "tcp_nopush":false,
                        "enable_open_file_cache":true,
                        "ssl_session_cache_unit":"m",
                        "enable_reuseport":true,
                        "ssl_session_ticket":true,
                        "error_log_level":"warn",
                        "ssl_prefer_server_ciphers":true
                    }
                },
                "snapshot_desc":"",
                "old_snapshot":{
                    "global.1.ngx":{
                        "tcp_nopush":false,
                        "enable_open_file_cache":true,
                        "ssl_session_cache_unit":"m",
                        "enable_reuseport":true,
                        "ssl_session_ticket":true,
                        "error_log_level":"warn",
                        "ssl_prefer_serv    er_ciphers":true
                    }
                },
                "old_snapshot_desc":"",
                "comment":"",
                "id":1046,
                "app_type":5,
                "latest_editor":"edge-admin",
                "uid":1,
                "_created_unix":"2021-07-08 03:43:13.511693",
                "username":"edge-admin",
                "app_id":1,
                "type":"clear"
            }
        ]
    }
}

# Release Global Conf

# URI

POST /admin-api/txlogs/release/global_conf/1

# Request example

# Shell

curl 'http://admin-site/admin-api/txlogs/release/global_conf/1' \
  -X 'POST' \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec"

# Response example

Status: 200 OK
{
    "time":1625732509,
    "status":0
}

# RollBack

# URI

POST /admin-api/txlogs/rollback/global_conf/1

# JSON body

  • id

    type: integer

    required: yes

    description: release id

# Request example

# Shell

curl 'http://admin-site/admin-api/txlogs/rollback/global_conf/1' \
  -X 'POST' \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  -d '{
      "id":1047
  }'

# Response example

Status: 200 OK
{
    "time":1625733110,
    "status":0
}

# Clear Pending Changes

# URI

GET /admin-api/txlogs/revert/global_conf/1

# Request example

# Shell

curl 'http://admin-site/admin-api/txlogs/revert/global_conf/1' \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec"

# Response example

Status: 200 OK
{
    "time":1625732509,
    "status":0
}

# Add Comment

# URI

POST /admin-api/txlogs/comment/global_conf/1/{release_id}

# JSON body

  • comment

    type: string

    required: yes

    description: release

# Request example

# Shell

curl 'http://admin-site/admin-api/txlogs/comment/global_conf/1/1015' \
  -X 'POST' \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  -d '{
      "comment":"test"
  }'

# Response example

Status: 200 OK
{
    "time":1625733110,
    "status":0
}