Slack connector - Rest api
Authentication : Jira authentication
Name | Endpoint | Method | Request param/ Request payload | Sample response |
---|---|---|---|---|
List of team connections | http://localhost:7990/bitbucket/rest/slack/1.0/slack-config/connections | GET | [ { "ID": 3, "projectKey": "PROJECT_1", "repoId": 1, "teamId": "T192F065V", "teamName": "Slack Connector", "createdDate": "Apr 2, 2018 7:23:01 AM", "createdBy": "admin" }, { "ID": 4, "projectKey": "PROJECT_1", "repoId": -1, "teamId": "T192F065V", "teamName": "Slack Connector", "createdDate": "Apr 2, 2018 7:58:43 AM", "createdBy": "admin" } ] | |
Remove a connection | http://localhost:7990/bitbucket/rest/slack/1.0/slack-config/disconnect/{connectId} | POST | replace connectId by your connection id. e.g : 3 | |
List all project or repo settings | http://localhost:7990/bitbucket/rest/slack/1.0/slack-config/settings/all | GET | ||
Filter project setting by project or repo | http://localhost:7990/bitbucket/rest/slack/1.0/slack-config/settings | GET | projectKey=PROJECT_1&teamId=T192F065V&repoId=1 | |
Remove a setting | http://localhost:7990/bitbucket/rest/slack/1.0/slack-config/remove-slack-setting/{settingId} | POST | ||
Save a setting | http://localhost:7990/bitbucket/rest/slack/1.0/slack-config/save-slack-setting | POST | { "projectKey": "PROJECT_1", "channelId": "G2S9UTW5B", "channelName": "?private-chanel", "events": "EventType_0,EventType_1,EventType_2,EventType_3,EventType_4,EventType_5,EventType_6,EventType_7,EventType_8,PushEvent_1,PersonalEvent_1", "prMessageFormat": "{\n \"text\":\"\",\n \"attachments\": [\n {\n \"author_name\": \"${userName}\",\n \"author_icon\": \"${avatar}\",\n \"color\": \"${activityColor}\",\n \"text\": \"${activityText}\",\n \"fields\": [\n {\n \"title\": \"Description\",\n \"value\": \"${activityDes}\",\n \"short\": true\n },\n {\n \"title\": \"Reviewers\",\n \"value\": \"${activityReviewers}\",\n \"short\": true\n },\n {\n \"title\": \"Source\",\n \"value\": \"${source}\",\n \"short\": true\n },\n {\n \"title\": \"Destination\",\n \"value\": \"${destination}\",\n \"short\": true\n }\n ]\n }\n ]\n}", "pushMessageFormat": "{\n \"text\":\"${pushInfo}\",\n \"attachments\": [\n {\n \"color\": \"${commitColor}\",\n \"text\": \"${commitLog}\"\n }\n ]\n}", "teamId": "T192F065V", "teamName": "Slack Connector", "repoId": 1 } |