Project Groups
Project Groups API provides endpoints to manage project groups within a user account.
Add project group
POST https://api4.seranking.com/site-groups
Adds a new project group to the user account.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | Name of the project group to add. |
Request example
POST https://api4.seranking.com/site-groups
{ "name" : "New Project Group" }Response parameters
| Parameter | Type | Description |
|---|---|---|
| group_id | Integer | ID of the added project group. |
Response example
{ "group_id": 9545 }Rename project group
PUT https://api4.seranking.com/site-groups/{group_id}
Renames an existing project group.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | New name for the group. |
Request example
PUT https://api4.seranking.com/site-groups/{group_id}
{"name": "New Group Name"}Response parameters
If successful, the server returns the 200 HTTP code. Returns HTTP 400 if no name is specified and HTTP 404 if the group is not found (for more information, see Error handling).
Response example
No response body.
Delete project group
DELETE https://api4.seranking.com/site-groups/{group_id}
Deletes a project group from the user account.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| group_id | Integer | Yes | ID of the group to delete. |
Request example
DELETE https://api4.seranking.com/site-groups/{group_id}Response parameters
If successful, the server returns the 204 HTTP code. Returns HTTP 404 if the group is not found (for more information, see Error handling).
Response example
No response body.
List project groups
GET https://api4.seranking.com/site-groups
Retrieves all project groups for the user account.
Request parameters
None
Request example
GET https://api4.seranking.com/site-groupsResponse parameters
| Parameter | Type | Description |
|---|---|---|
| id | String | Project group ID. |
| name | String | Project group name. |
Response example
[
{
"id": "123",
"name": "Group1"
},
{
"id": "456",
"name": "Group2"
}
]Move projects to project group
POST https://api4.seranking.com/site-groups/{group_id}/sites
Transfers projects from one group to another.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| site_ids | Array | Yes | Array of project (site) IDs to move. |
Request example
POST https://api4.seranking.com/site-groups/{group_id}/sites
{"site_ids" : [1,2,3,4,5]}Response parameters
If successful, the server returns the 204 HTTP code. Returns HTTP 404 if the group is not found (for more information, see Error handling).
Response example
No response body.
