/subscribers

These methods aloow you to create, delete and get info on subscribers.

List of all subscribers with child subscribers, (like comment)

GET http://pm415.com/api/subscribers/all/:ownertable/:ownerid

Path Parameters

NameTypeDescription

ownerid

string

owner id (id - item or initative or bug)

ownertable

string

Owner subscribers (item, initiative, bug)

Headers

NameTypeDescription

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

{
"success": true,
"subscribers":{
"ownerSubscribers":[
{
"email": "ekibcirkc@emltmp.com",
"firstName": "Axel",
"lastName": "Last",
"id": 24
}
],
"subownerSubscribers":[
{"email": "nosuchip@gmail.com", "firstName": "Iddqd", "lastName": "Idkfa", "id": 1,…},
{"email": "zverozabr@yandex.ru", "firstName": "Alex", "lastName": "Prilipko", "id": 2,…},
{
"email": "admin@admin.com",
"firstName": "Axel",
"lastName": "Baum",
"id": 3,
"subowner": "comments"
},
{"email": "msskwqad@supere.ml", "firstName": "msskwqad@supere.ml", "lastName": "msskwqad@supere.ml",…}
]
}
}

Create new subscriber

POST https://pm415.com/api/subscribers/new/:ownertable/:ownerid

Creates the new suscriber.

Path Parameters

NameTypeDescription

:ownerid

number

The ID of the bug or initiative or item

:ownertable

string

"Bugs" or "Initiatives" or "Items"

Headers

NameTypeDescription

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

Request Body

NameTypeDescription

object

{"subowner": "comments", "subownerId": "72", "usersId": ["1","2"]} to clear all subscribers function leave the "userid" empty

object

{"usersId": ["1","2"]}

{
    "success": true
}

Get list of subscribers

GET https://pm415.com/api/subscribers/:ownertable/:ownerid

Gets the list of subscribers.

Path Parameters

NameTypeDescription

:ownerid

number

The ID of the bug or initiative or item

:ownertable

string

"Bugs" or "Initiatives" or "Items"

Headers

NameTypeDescription

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

{
    "success": true,
    "subscribers": [
        {
            "email": "nosuchip@gmail.com",
            "firstName": "Iddqd",
            "lastName": "Idkfa",
            "id": 1
        },
        {
            "email": "zverozabr@yandex.ru",
            "firstName": "Alex",
            "lastName": "Prilipko",
            "id": 2
        },
        {
            "email": "nosuchip@gmail.com",
            "firstName": "Iddqd",
            "lastName": "Idkfa",
            "id": 1
        },
        {
            "email": "zverozabr@yandex.ru",
            "firstName": "Alex",
            "lastName": "Prilipko",
            "id": 2
        }
    ]
}

Get list of subscribers

GET https://pm415.com/api/subscribers/:ownertable/:ownerid/:subowner/:subownerid

Gets the list of subscribers on the selected comments.

Path Parameters

NameTypeDescription

:subownerid

number

The ID of the comment

:subowner

string

"Comments" or another tablename

:ownerid

number

The ID of the bug or initiative or item

:ownertable

string

"Bugs" or "Initiatives" or "Items"

Headers

NameTypeDescription

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

{
    "success": true,
    "subscribers": [
        {
            "email": "nosuchip@gmail.com",
            "firstName": "Iddqd",
            "lastName": "Idkfa",
            "id": 1
        },
        {
            "email": "zverozabr@yandex.ru",
            "firstName": "Alex",
            "lastName": "Prilipko",
            "id": 2
        }
    ]
}

Delete subscriber

POST https://pm415.com/api/subscribers/delete/:ownertable/:ownerid

Deletes the current subscriber. example full body: {"usersId": ["1"], "subowner": "comments", "subownerId": "72"} example body without subowner: {"usersId": ["1"]}

Path Parameters

NameTypeDescription

:ownerid

number

The ID of the bug or initiative or item

:ownertable

string

"Bugs" or "Initiatives" or "Items"

Headers

NameTypeDescription

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

Request Body

NameTypeDescription

usersid

array

["1"] (array of users id, that will deleted)

subownerId

string

"72" (id of comment - subowner, example)

subowner

string

"comments" (example of table subowner)

{
    "success": true
}

Last updated