Project groups API
Adding a project group
The method allows to add project groups to a user account.
Request format
POST https://api4.seranking.com/site-groups
{ “name” : “text” }
Parameters
Name | Required | Description |
name | Yes | Name of the project group to be added
|
Result
If successful, the server returns an array containing deletion statuses.
Name | Required | Description |
group_id | Yes | ID of the added project group
|
Response example
Errors
HTTP code | Error message |
400 | Empty name
|
Renaming a project group
Request format
PUT https://api4.seranking.com/site-groups/{group_id}
{
“name”: “new name”
}
Parameters
Name | Required | Description |
name | Yes | New project group name
|
Result
If successful, the server returns the 200 HTTP code.
Errors
HTTP code | Error message |
400 | Empty name
|
404 | Group not found
|
Deleting a project group
Request format
DELETE https://api4.seranking.com/site-groups/{group_id}
Result
If successful, the server returns the 204 HTTP code.
Errors
HTTP code | Error message |
404 | Group not found
|
Project group list
The method allows to receive a list of all project groups from a user account.
Request format
GET https://api4.seranking.com/site-groups
Result
If successful, the server returns a list of groups.
Name | Required | Description |
id | Yes | Project group ID
|
name | Yes | New project group name
|
Response example
[
{
“id”: “123”,
“name”: “Group1”
},
{
“id”: “456”,
“name”: “Group2”
}
]
Moving projects to a project group
The method allows to transfer projects from one project group to another.
Parameters
Name | Required | Description |
site_ids | Yes | An array containing the IDs of websites that are to be transferred
|
Request format
POST https://api4.seranking.com/site-groups/{group_id}/sites
{
“site_ids” : [1,2,3,4,5]
}
Result
If successful, the server returns the 204 HTTP code.
Errors
HTTP code | Error message |
404 | Group not found
|