It's all about the answers!

Ask a question

Can we pass a value dynamically (as build property value ) when we request build via REST API?

ryosuke oka (17984648) | asked Jul 31 '13, 5:53 a.m.
One of our customer want to do pass a workitem number as build property value when they request build via REST API.

Follow of actions and pre-works are like this:
Pre-work 1: Create a build property as a string called "WORK_ITEM_NO".
pre-work 2: Create a attribute called "Request_build_URL"

1) add REST API URL in "Request_build_URL" to request a build from WorkItem. they also want to pass workItem number as long as build request.
2) the Request run build and workitems number will be filled as build property.

Can we archive this?
If so, any comment and advice is appreciated.

I had found these helpful information but these dose not explain how to add workitem number to Request build REST API .

Request a build via REST api


[RTC-2010] RESTful API for Build, to support C/ALM integration scenarios

 Thank you, in advance!

Accepted answer

permanent link
Scott Cowan (966310) | answered Jul 31 '13, 9:50 a.m.
Hi ryosuke,

Nick's first answer to shows an example HTTP POST request that defines a string property "addedProperty" with the value "some value".  You should be able to do the same with a property named "WORK_ITEM_NO" and some sort of variable substitution depending on how you're making the request.

It reads like you're hoping to be able to request a build with an HTTP GET request.  This is not supported.  Please read this link for an explanation of the differences ...

To test some HTTP POST requests, try installing the Poster Addon to Firefox ...

ryosuke oka selected this answer as the correct answer

ryosuke oka commented Aug 01 '13, 8:54 p.m.

Hi Scott,
Thank you for your helpful advices!

I will check this with customer and may post more questions.

Scott Cowan commented Aug 02 '13, 8:26 a.m.

I'd be happy to help where I can.

Your answer

Register or to post your answer.