Gateway Network Partitions

Create Gateway Partition

Description

Create gateway partition

URI

POST /admin-api/partitions

JSON body

{
  "name": "test"
}

Request example

Shell

curl \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  https://admin-site/admin-api/partitions \
  -d '{"name":"test"}'

Response example

Status: 200 OK
{
    "data":{
        "id":3
    },
    "status":0
}

Get Gateway Partitions

Description

Get gateway partitions

URI

GET /admin-api/partitions

Request example

Shell

curl \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  https://admin-site/admin-api/partitions

Response example

Status: 200 OK
{
    "data": [{
        "id": 1,
        "name": "default"
    }, {
        "id": 2,
        "name": "test1"
    }, {
        "id": 3,
        "name": "test2"
    }],
    "status": 0
}

Get Gateway Partition Name

Description

Get gateway partition name by partition_id

URI

GET /admin-api/partitions/{partition_id}

Request example

Shell

curl \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  https://admin-site/admin-api/partitions/1

Response example

Status: 200 OK
{
    "data": {
        "name": "default",
        "id": 1
    },
    "status": 0
}

Modify Gateway Partition

Description

Modify gateway partition

URI

PUT /admin-api/partitions/{partition_id}

JSON body

{
  "name": "new-partition"
}

Request example

Shell

curl -X PUT \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  https://admin-site/admin-api/partitions/2 -d '{"name": "new-partition"}'

Response example

Status: 200 OK
{"status":0}

Delete Gateway Partition

Description

Delete gateway partition

URI

DELETE /admin-api/partitions/{partition_id}

Request example

Shell

curl -X DELETE \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  https://admin-site/admin-api/partitions/2

Response example

Status: 200 OK
{"status":0}