Skip to main content

User Slack Messages API

General notes​

Content​

Roles collection:

Single role:

User Slack Messages collection

User slack messages index​

This method needs permission access on user-slack-message.

Request​

Index behaviourDefinition
Paginated by defaultNo
Sortingid, user_id, chat_id, is_allowed
Filtersuser_id:int, chat_id:string, is_allowed:bool
Embedded-
GET /api/v0/user-slack-messages HTTP/1.1
Content-Type: application/json

Response​

200 OK​

GET /api/v0/user-slack-messages HTTP/1.1
Content-Type: application/json

{
"items": [
{
"id": 1,
"user_id": 1,
"chat_id": null,
"is_allowed": true
},
{
"id": 2,
"user_id": 2,
"chat_id": null,
"is_allowed": true
},
]
}

Create user slack message​

This method needs permission create on user-slack-message.

Request​

ParamTypeDescriptionRequirements
user_idintUser's idRequired.
chat_idintUser's slack chat idNullable.
is_allowedbooleanAllow/block Slack messages.Default value is true.
POST /api/v0/user-slack-messages HTTP/1.1
Content-Type: application/json
{
"user_id": 1,
"chat_id": "SD4SQ87ASX",
"is_allowed": true
},

Response​

200 OK​

POST /api/v0/user-slack-messages HTTP/1.1
Content-Type: application/json

{
"id": 1,
"user_id": 1,
"chat_id": null,
"is_allowed": true
}

422 UNPROCESSABLE ENTITY​

Validation error occured.



Single User Slack Message

User Slack Message Detail​

GET /api/v0/user-slack-messages/{id}

This method needs permission read on user-slack-message.

Get User slack message detail.

Request​

GET /api/v0/user-slack-messages/1 HTTP/1.1
Content-Type: application/json

Response​

200 OK​

GET /api/v0/clients/1 HTTP/1.1
Content-Type: application/json

{
"id": 1,
"user_id": 1,
"chat_id": null,
"is_allowed": true
}

404 NOT FOUND​

User slack message was not found.


Update User Slack message​

PUT/PATCH /api/v0/user-slack-messages/{id}

This method needs permission update on user-slack-message.

Request​

ParamTypeDescriptionRequirements
user_idintUser's idSometimes. Has to be int.
chat_idstringChat idSometimes. Nullable. Has to be string. Usually is set automatically.
is_allowedboolAllow/block messagesSometimes. Has to be bool.

For PATCH method any field can be omitted.

PATCH /api/v0/user-slack-messages/1 HTTP/1.1
Content-Type: application/json

{
"is_allowed": false,
}

Response​

200 OK​

404 NOT FOUND​

422 UNPROCESSABLE ENTITY​

Validation error occurred.


Delete User Slack Message​

DELETE /api/v0/user-slack-messages/{id}

This method needs permission delete on user-slack-message.

Delete User slack message detail.

Request​

DELETE /api/v0/user-slack-messages/1 HTTP/1.1
Content-Type: application/json

Response​

204 NO CONTENT​

404 NOT FOUND​