Build Features Via REST API

Hi All. Is there any documentation on creating build features through REST? I've checked the API docs and they are sparse to say the least (JetBrains, please flesh out your documentation)

I'm specifically interested in creating email notifiers on job success.

Thanks

0
2 comments

Hello Cameron,

You may find several examples regarding management of build features here. Usually, the easiest approach is to create an entity you are interested in manually (via UI or DSL), then retrieve it with a GET request and duplicate the response in your requests, modifying it as necessary. 

A minimal example of Notifications build feature is below:

{
            "id": "BUILD_EXT_13",
            "type": "notifications",
            "properties": {
                "count": 3,
                "property": [
                    {
                        "name": "buildFinishedSuccess",
                        "value": "true"
                    },
                    {
                        "name": "email",
                        "value": "test@example.com"
                    },
                    {
                        "name": "notifier",
                        "value": "email"
                    }
                ]
            }
        }

It will send a notification to test@example.com whenever a build is successful. 

0

Hi Fedor

Thanks for that. I did read that document but was hoping for an example of how to post a new build feature.

Ta
Cam

0

Please sign in to leave a comment.