# Not able to trigger REST call from deployment section

**URL:** <https://discuss.circleci.com/t/not-able-to-trigger-rest-call-from-deployment-section/3338>\
**Category:** Build Environment\
**Created:** [April 14, 2016, 7:17am UTC](https://discuss.circleci.com/t/not-able-to-trigger-rest-call-from-deployment-section/3338 "2016-04-14T07:17:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ppahire](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@ppahire](https://discuss.circleci.com/u/ppahire)\
**Post date:** [April 14, 2016, 7:17am UTC](https://discuss.circleci.com/t/not-able-to-trigger-rest-call-from-deployment-section/3338/1 "2016-04-14T07:17:19Z")

</div>

We are using CircleCI to build our various projects. In one of our project, we need to trigger a build of other repository in case current build one is green.  
Say, if repo A’s build is green, trigger repo B’s build.

For triggering the build I am using REST API of CircleCI and can successfully trigger new build using it. My concern is, when I make a call from _test section_ it works, but while making same call form _deployment section_ it’s not working.

I want to use the same in deployment section to make sure it will be triggered in case of successful build only.

Example,

Working code:  
**test** :  
override:

- echo “No test for this project”
- curl -X POST [https://circleci.com/api/v1/project/](https://circleci.com/api/v1/project/) **/** _/tree/$CIRCLE\_BRANCH?circle-token=_\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

Non-working code:

**deployment** :  
development:  
branch: $CIRCLE\_BRANCH  
commands:

- curl -X POST [https://circleci.com/api/v1/project/](https://circleci.com/api/v1/project/) **_//tree/$CIRCLE\_BRANCH?circle-token=_** \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

Any thoughts on this why its not working ?

---

<div class="post-metadata">

**Author:** ![dalekurt](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/dalekurt/32/13381_2.png) [@dalekurt](https://discuss.circleci.com/u/dalekurt)\
**Post date:** [October 13, 2016, 11:57pm UTC](https://discuss.circleci.com/t/not-able-to-trigger-rest-call-from-deployment-section/3338/2 "2016-10-13T23:57:03Z")

</div>

Were you able to solve this issue?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:38am UTC](https://discuss.circleci.com/t/not-able-to-trigger-rest-call-from-deployment-section/3338/3 "2018-06-18T11:38:13Z")

</div>

Closed on June 18, 2018, 11:38am UTC


