Application Authentication List

Create an application authentication list

Description

Create an application authentication list.

URI

POST /admin-api/applications/http/{app_id}/auth_list

JSON body

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

Example Request

Shell

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

Example Response

Status: 200 OK

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

Get the application authentication list

Description

Get the application authentication list.

URI

GET /admin-api/applications/http/{app_id}/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" \
  https://{admin-site}/admin-api/applications/http/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 application authentication list

Description

Update the application authentication list.

URI

PUT /admin-api/applications/http/{app_id}/auth_list/{auth_id}

JSON body

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

Example Request

Shell

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

Example Response

Status: 200 OK

{"status":0}

Delete the application authentication list

Description

Delete the application authentication list.

URI

DELETE /admin-api/applications/http/{app_id}/auth_list/{auth_id}

Example Request

Shell

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

Example Response

Status: 200 OK

{"status":0}

Add the item to the application authentication list

Description

Add the item to the application authentication list.

URI

POST /admin-api/applications/http/{app_id}/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" \
  https://{admin-site}/admin-api/applications/http/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 application authentication list

Description

Get the items of the application authentication list.

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

URI

GET /admin-api/applications/http/{app_id}/auth_list/{auth_id}/items

Example Request

Shell

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

Example Response

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

Update the item of the application authentication list

Description

Update the item of the application authentication list.

URI

PUT /admin-api/applications/http/{app_id}/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" \
  https://{admin-site}/admin-api/applications/http/1/auth_list/1/items/1 \
  -d '{"username": "test1", "password": "test1"}'

Example Response

Status: 200 OK
{ "status": 0 }

Delete the item of the application authentication list

Description

Delete the item of the application authentication list.

URI

DELETE /admin-api/applications/http/{app_id}/auth_list/{auth_id}/items/{item_id}

Example Request

Shell

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

Example Response

Status: 200 OK
{ "status": 0 }