Appearance
User - NAS Groups
Base URL:
https://your-domain.com
Admin endpoints for managing NAS Groups. NAS Groups let you organise NAS devices into logical groups and assign them to resellers. All endpoints require admin/staff authentication.
Fetch All NAS Groups
Retrieve all NAS groups for the given ISP/Branch.
| Property | Value |
|---|---|
| Method | GET |
| URL | /api/v1/nas-groups |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
user_id | integer | Yes | User ID |
Success Response (200 OK):
json
{
"status": "success",
"data": [
{
"id": 1,
"name": "Group A",
"isp_id": 1,
"branch_id": 1,
"created_at": "2024-01-01 00:00:00"
}
]
}Fetch NAS Group
Retrieve details of a specific NAS group.
| Property | Value |
|---|---|
| Method | GET |
| URL | /api/v1/nas-groups/{id} |
| Authentication | Bearer Token |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | NAS Group ID |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
Success Response (200 OK):
json
{
"status": "success",
"data": {
"id": 1,
"name": "Group A",
"isp_id": 1,
"branch_id": 1,
"created_at": "2024-01-01 00:00:00"
}
}Error Response (404 Not Found):
json
{
"status": "error",
"message": "NAS Group not found."
}Create NAS Group
Create a new NAS group.
| Property | Value |
|---|---|
| Method | POST |
| URL | /api/v1/nas-groups |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"name": "Group A"
}| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
user_id | integer | Yes | Acting user ID |
name | string | Yes | Group name |
Success Response (201 Created):
json
{
"status": "success",
"message": "NAS Group created successfully.",
"data": {
"id": 2,
"name": "Group A"
}
}Update NAS Group
Update an existing NAS group.
| Property | Value |
|---|---|
| Method | PUT |
| URL | /api/v1/nas-groups/{id} |
| Authentication | Bearer Token |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | NAS Group ID |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"name": "Group A Updated"
}Success Response (200 OK):
json
{
"status": "success",
"message": "NAS Group updated successfully."
}Delete NAS Group
Delete a NAS group.
| Property | Value |
|---|---|
| Method | DELETE |
| URL | /api/v1/nas-groups/{id} |
| Authentication | Bearer Token |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | NAS Group ID |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
user_id | integer | Yes | Acting user ID |
Success Response (200 OK):
json
{
"status": "success",
"message": "NAS Group deleted successfully."
}