There is related Rest API to get build result- include the status info
"result": "succeeded",
You could also use Rest API to create(trigger) a release based on some info such as build ID.
For more details you could take a look at this blog shows how to use rest api in powershell:
Moreover, Daniel is right. You could check the Continuous deployment(create release and deploy whenever a build completes) when you create a new release definition or select in triggers of the release definition. TFS server will handle this automatically, without the need of user intervention.
Update
A example when you open a build result in the web portal just as:
In the entire url there will include a buildID such as buildID=49
. So according to above screenshot, you should use
Get http://xxx:8080/tfs/DefaultCollection/ScrumMttApple/_apis/build/builds/49/?api-version=2.0
Then will get below JSON result:
"id": 49,
"buildNumber": "20170525.5",
"status": "completed",
"result": "succeeded",
"queueTime": "2017-05-25T19:17:39.6545026Z",
"startTime": "2017-05-25T19:17:42.2482602Z",
"finishTime": "2017-05-25T19:25:15.6808731Z",
"url": "http://win-kev0061habi:8080/tfs/DefaultCollection/bdd4809b-e6dd-4cb8-8e60-762373b20cdc/_apis/build/Builds/49",
"definition": {
"path": "\\",
"type": "build",
"revision": 5,
"id": 14,
"name": "OrdertTest",
.....