<aside> 📎 Endpoints

</aside>

Get account details

GET https://your-panel.com/api/client/auth/@me

Example Request

curl "<https://your-panel.com/api/client/auth/@me>" \\
  -H "Content-Type: application/json" \\
  -H "Accept: application/vnd.wisp.v1+json" \\
  -H "Authorization: Bearer APITOKEN" \\
  -X GET

Example Response

{
  "user": {
    "object": "user",
    "attributes": {
      "id": 3,
      "email": "[email protected]",
      "name_first": "Software",
      "name_last": "Noob",
      "preferences": null,
      "use_totp": false,
      "root_admin": true,
      "support_op": false,
      "sso_enabled": false
    },
    "meta": {
      "extra_objects": [
        {
          "object": "permissions",
          "attributes": [
            "admin:license.read",
            "admin:settings.update",
            "admin:migrator.read",
            "admin:migrator.update",
            "admin:announcement.read",
            "admin:announcement.create",
            "admin:announcement.update",
            "admin:announcement.delete",
          ]
        }
      ]
    }
  }
}

Update account details

PUT https://your-panel.com/api/client/account

Available Parameters

current_password - The current user password new_password - The new password new_password_confirmation - The new password again name_first - First name name_last - Last name preferences sso_redirect sso_code sso_state

Example Request

curl "<https://your-panel.com/api/client/account>" \\
  -H "Content-Type: application/json" \\
  -H "Accept: application/vnd.wisp.v1+json" \\
  -H "Authorization: Bearer APITOKEN" \\
  -X PUT \\
  -d '
	   {
	       "current_password": "examplePassword",
	       "new_password": "newPassword",
	       "new_password_confirmation": "newPassword"
	   }'

Response code 204 for a successful request

Mark notifications read

POST https://your-panel.com/api/client/account/notifications

Example Request

curl "<https://your-panel.com/api/client/account/notifications>" \\
  -H "Content-Type: application/json" \\
  -H "Accept: application/vnd.wisp.v1+json" \\
  -H "Authorization: Bearer APITOKEN" \\
  -X POST

Mark announcements read

POST https://your-panel.com/api/client/account/announcements

Example Request

curl "<https://your-panel.com/api/client/account/announcements>" \\
  -H "Content-Type: application/json" \\
  -H "Accept: application/vnd.wisp.v1+json" \\
  -H "Authorization: Bearer APITOKEN" \\
  -X POST

Get API tokens

Retrieves all of the user API tokens

GET https://your-panel.com/api/client/security/credentials

Example Request

curl "<https://your-panel.com/api/client/security/credentials>" \\
  -H "Content-Type: application/json" \\
  -H "Accept: application/vnd.wisp.v1+json" \\
  -H "Authorization: Bearer APITOKEN" \\
  -X GET

Example Response

{
    "object": "list",
    "data": [
        {
            "object": "api_key",
            "attributes": {
                "identifier": "mc5LN3BOk8rWIgti",
                "key": "mc5LN3BOkPrWIVtiJ9tAKs3vtd3L0SWSE24Qwofgsb2zElMV",
                "memo": "this is my test token",
                "allowed_ips": "[\\"%\\"]",
                "last_used_at": null,
                "created_at": "2022-02-02T10:57:44.000000Z"
            }
        }
    ],
    "meta": {
        "pagination": {
            "total": 1,
            "count": 1,
            "per_page": 10,
            "current_page": 1,
            "total_pages": 1,
            "links": {}
        }
    }
}

Create API token

POST https://your-panel.com/api/client/security/credentials

Required Parameters

memo - description for the token

Optional Parameters

allowed_ips - Restrict access to specific IPs

Example Request

curl "<https://your-panel.com/api/client/security/credentials>" \\
  -H "Content-Type: application/json" \\
  -H "Accept: application/vnd.wisp.v1+json" \\
  -H "Authorization: Bearer APITOKEN" \\
  -X POST \\
    -d '
    {
        "memo": "this is my test token",
        "allowed_ips": [
          "192.168.0.1"
          "192.168.0.2"
        ]
    }'

Example Response

{
    "object": "api_key",
    "attributes": {
        "identifier": "mc5LN3BOk8rWIgti",
        "key": "mc5LN3BOkPrWIVtiJ9tAKs3vtd3L0SWSE24Qwofgsb2zElMV",
        "memo": "this is my test token",
        "allowed_ips": [
          "192.168.0.1",
          "192.168.0.2"
        ],
        "last_used_at": null,
        "created_at": "2022-02-02T10:57:44.000000Z"
    }
}

Delete API token