Global Authentication List

Create an global authentication list

Description

Create an global authentication list.

URI

POST /admin-api/global/1/auth_list

JSON body

{
   "name": "name",
   "label": "label"
}

Example Request

Shell

curl -X POST \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  http://{admin-site}/admin-api/global/1/auth_list \
  -d '{"name":"name","label": "label"}'

Example Response

Status: 200 OK

{"status":0,"data":{"id":1}}

Get the global authentication list

Description

Get the global authentication list.

URI

GET /admin-api/global/1/auth_list

URI Parameters

  • page

    type: integer

    required: no

    description: Results page (default 1)

  • page_size

    type: integer

    required: no

    description: Results page size (default 20)

Example Request

Shell

curl \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  http://{admin-site}/admin-api/global/1/auth_list?page=1&page_size=20

Example Response

Status: 200 OK
{
    "status": 0,
    "data": {
        "data": [
            {
                "id": 1,
                "label": "label",
                "creator": 1,
                "name": "name"
            }
        ],
        "meta": {
            "count": 1
        }
    }
}

Update the global authentication list

Description

Update the global authentication list.

URI

PUT /admin-api/global/1/auth_list/{auth_id}

JSON body

{
   "name": "name",
   "label": "label"
}

Example Request

Shell

curl -X PUT\
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  http://{admin-site}/admin-api/global/1/auth_list \
  -d '{"name":"name","label": "label"}'

Example Response

Status: 200 OK

{"status":0}

Delete the global authentication list

Description

Delete the global authentication list.

URI

DELETE /admin-api/global/1/auth_list/{auth_id}

Example Request

Shell

curl -X DELETE \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  http://{admin-site}/admin-api/global/1/auth_list/1

Example Response

Status: 200 OK

{"status":0}

Add the item to the global authentication list

Description

Add the item to the global authentication list.

URI

POST /admin-api/global/1/auth_list/{auth_id}/items

JSON body

{
   "username": "test",
   "password": "test"
}

Example Request

Shell

curl -X POST \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  http://{admin-site}/admin-api/global/1/auth_list/1/items \
  -d '{"username":"test","password": "test"}'

Example Response

Status: 200 OK

{"status":0,"data":{"id":1}}

Get the items of the global authentication list

Description

Get the items of the global authentication list.

We will return empty password to hide the real password for safety.

URI

GET /admin-api/global/1/auth_list/{auth_id}/items

Example Request

Shell

curl \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  http://{admin-site}/admin-api/global/1/auth_list/1/items

Example Response

Status: 200 OK
{
    "data": [
        {
            "username": "test",
            "password": "",
            "id": 1
        }
    ],
    "status": 0
}

Update the item of the global authentication list

Description

Update the item of the global authentication list.

URI

PUT /admin-api/global/1/auth_list/{auth_id}/items/{item_id}

JSON body

{
   "username": "test1",
   "password": "test1"
}

Example Request

Shell

curl -X PUT \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  http://{admin-site}/admin-api/global/1/auth_list/1/items/1 \
  -d '{"username": "test1", "password": "test1"}'

Example Response

Status: 200 OK
{ "status": 0 }

Delete the item of the global authentication list

Description

Delete the item of the global authentication list.

URI

DELETE /admin-api/global/1/auth_list/{auth_id}/items/{item_id}

Example Request

Shell

curl -X DELETE \
  -H "API-Token: 1df87165-3593-4eca-a910-9ac20005e6ec" \
  http://{admin-site}/admin-api/global/1/auth_list/1/items/1

Example Response

Status: 200 OK
{ "status": 0 }