Getting and Setting Agent requirements using REST API

Hello,
 
Background
I am looking to use TeamCitySharp (or something similar) to access TeamCity via the REST API.
The current task/goal is to dynamically change the agent requirements of a build configuration before running it.
 
My Issue
I don't seem to be able to access the Agent Requirements for my build configuration.
 
I have a simple configuration that has two Agent Requirements:
     Parameter: system.office - Condition: exists
     Parameter: system.os.name - Condition: contains Windows
 
If I check out my build config via 'http://myTCserver:8082/httpAuth/app/rest/buildTypes/id:bt1112/' I don't see the Agent Requirements listed.
This may be valid.
 
However, looking at the documentation here: http://confluence.jetbrains.com/display/TW/REST+API+Plugin and the other thread here: http://devnet.jetbrains.com/message/5463348 I assumed that the following would give me my agent-requirements (which I could then use to update them): http://myTCserver:8082/httpAuth/app/rest/buildTypes/id:bt1112/agent-requirements
However, I just get the following error: Error: jetbrains.buildServer.server.rest.errors.NotFoundException: Field 'agent-requirements' is not supported.
 
I presume I am missing something. If someone could enlighten me I would be very grateful.
 
Thanks,
Jack

3 comments
Comment actions Permalink

Which TeamCitty version do you use?

0
Comment actions Permalink

FYI: TeamCity Enterprise 6.5.5 (build 18087)

I just noticed the "Since TeamCity 7.0" note on the http://confluence.jetbrains.com/display/TW/REST+API+Plugin page under "Build Configuration And Template Settings" section.

I presume/am guessing that I am able to get this extra agent requirements information in my 6.5.5 build?

0
Comment actions Permalink

No, REST API is a part of common TeamCity bundle, so you'll have to upgrade the server.

0

Please sign in to leave a comment.