Unable to start a build using API

api

#1

I was going through api docs to make a curl request to start a build from scripts.

curl -X POST --header "Content-Type: application/json" -d '{ "revision": "709758************b51c76732142c4e2" }' https://circleci.com/api/v1.1/project/bb/In***tise/co**it/tree/develop?circle-token=8f70cd************953bd1f9e

This is not working and only returns some circleci html page starting with

<!DOCTYPE html>
<html><head><title>Continuous Integration and Deployment</title><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"><meta content="width=device-width, initial-scale=1" name="viewport"><meta content="CircleCI" name="apple-mobile-web-app-title"><meta content="Hosted Continuous Integration for web applications. Set up your application for testing in one click, on the fastest testing platform on the internet." name="description"><link href="https://dmmj3mmt94rvw.

I used browser to call the same and it’s going to the circleci 404 page.


#2

I’m sorry that no one replied to your question. It turns out that they only allow 2 choices. ‘github’ or ‘bitbucket’. Unlike the html requests, you have to spell out github or bitbucket instead of gh or bb. It took me a couple days to figure it out too.

https://circleci.com/docs/api/v1-reference/#version-control-system-vcs-type


#3

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.