API Description

Project groups

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

NameRequiredDescription
nameYesName of the project group to be added

Result

If successful, the server returns an array containing deletion statuses.

NameRequiredDescription
group_idYesID of the added project group

Response example

{
    “group_id”: 9545
}

Errors

HTTP code Error message
400Empty name

Renaming a project group

Request format

PUT https://api4.seranking.com/site-groups/{group_id}
{“name”: “new name”}

Parameters

NameRequiredDescription
nameYesNew project group name

Result

If successful, the server returns the 200 HTTP code.

Errors

HTTP code Error message
400Empty name
404Group 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
404Group 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.

NameRequiredDescription
idYesProject group ID
nameYesProject 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

NameRequiredDescription
site_idsYesAn 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
404Group not found