Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

"message" : "Project not found" #40

Open
bmcgair opened this issue Jul 30, 2019 · 2 comments
Open

"message" : "Project not found" #40

bmcgair opened this issue Jul 30, 2019 · 2 comments

Comments

@bmcgair
Copy link

bmcgair commented Jul 30, 2019

following the simple example you give on the front page.

curl -u ${CIRCLECI_TOKEN}: -X POST --header "Content-Type: application/json" -d '{
"parameters": {
"param1": "foo",
"param2": "find-me"
}
}' https://circleci.com/api/v2/project/gh/myorg/myproj/pipeline

"message" : "Project not found"

The project is found just fine by the 1.1 api
This doesn't work either:

curl -u ${CIRCLECI_TOKEN} https://circleci.com/api/v2/me
Enter host password for user 'mytokenhere':

I try it like this and I get the spew:

curl -u ${CIRCLECI_TOKEN}: -X POST --header "Content-Type: application/json" -d '{
"parameters": {
"param1": "foo",
"param2": "find-me"
}
}' https://circleci.com/api/v2/project/myorg/myproj/pipeline

<title>Continuous Integration and Deployment</title><script type="text/javascript">var circleEnvironment = "production";var circleHost = "circle-www-api-v1-797f7b6f99-hfkrj";var current_manifest_version_key = "frontend-releases/v3/849abd7c6a90753f6e72f2ad94ef6639062f3b8c.json";var optimizelyUrl = 'https://dmmj3mmt94rvw.cloudfront.net/assets/js/hosted/optimizely-a65329d34bab22eca38ab10d36eafc5b.js';var segmentWriteKey = 'AbgkrgN4cbRhAVEwlzMkHbwvrXnxHh35';var CSRFToken = '2wD4d5HJ4gv65cgh-kJU3KMpQBS8mC-LbhURFj5-IzdbUHD1aXFYWAdgSGy6f2UYp08k2FEsaU4u57fP';var OAuthCSRFToken = 'm2PWp1wKaQqicNzKN2LqVNxWmsgpV_stETitYUB9yh40qhSWFZli0Ttxyg_uTC0q_7Tjzg-7l_JVZ6Wy';</script><script type="text/javascript">var renderContext = JSON.parse(document.getElementById('bd3da3ad-9fc1-41c5-9ffd-f7774640b5c1').content);</script> <script type="text/javascript"> !function(){var loadOptimizely=function(){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=optimizelyUrl;var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)}; window.addEventListener('load', loadOptimizely, false); }(); </script> <script type="text/javascript"> !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t <script src="//d3dy5gmtp8yhk7.cloudfront.net/2.2/pusher.min.js" type="text/javascript"></script><script type="text/javascript">var launchDarkly = JSON.parse(document.getElementById('41ab3d53-0222-4eca-ab87-25f79a418933').content);</script><script type="text/javascript">var launchDarklyPlans = JSON.parse(document.getElementById('19b2a2e0-e532-40de-9c39-ec7dfb877ee0').content);</script><script type="text/javascript">var _rollbarConfig = JSON.parse(document.getElementById('1762bc15-e58c-4dae-837b-f1a022ac042d').content);</script><script>!function(r){function o(n){if(e[n])return e[n].exports;var t=e[n]={exports:{},id:n,loaded:!1};return r[n].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}var e={};return o.m=r,o.c=e,o.p="",o(0)}([function(r,o,e){"use strict";var n=e(1),t=e(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://dmmj3mmt94rvw.cloudfront.net/assets/js/hosted/rollbar-4fcef5ccc29985d4878f2e7c5676180b.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,o,e){"use strict";function n(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}function t(r,o){this.options=r,this._rollbarOldOnError=null;var e=s++;this.shimId=function(){return e},window&&window._rollbarShims&&(window._rollbarShims[e]={handler:o,messages:[]})}function a(r,o){var e=o.globalAlias||"Rollbar";if("object"==typeof r[e])return r[e];r._rollbarShims={},r._rollbarWrappedError=null;var t=new p(o);return n(function(){o.captureUncaught&&(t._rollbarOldOnError=r.onerror,i.captureUncaughtExceptions(r,t,!0),i.wrapGlobals(r,t,!0)),o.captureUnhandledRejections&&i.captureUnhandledRejections(r,t,!0);var n=o.autoInstrument;return(void 0===n||n===!0||"object"==typeof n&&n.network)&&r.addEventListener&&(r.addEventListener("load",t.captureLoad.bind(t)),r.addEventListener("DOMContentLoaded",t.captureDomContentLoaded.bind(t))),r[e]=t,t})()}function l(r){return n(function(){var o=this,e=Array.prototype.slice.call(arguments,0),n={shim:o,method:r,args:e,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)})}var i=e(2),s=0,d=e(3),c=function(r,o){return new t(r,o)},p=d.bind(null,c);t.prototype.loadFull=function(r,o,e,t,a){var l=function(){var o;if(void 0===r._rollbarDidLoad){o=new Error("rollbar.js did not load");for(var e,n,t,l,i=0;e=r._rollbarShims[i++];)for(e=e.messages||[];n=e.shift();)for(t=n.args||[],i=0;i</script>

Hello there noscripter!

CircleCI uses JavaScript pretty heavily to provide a good experience and to allow us to develop code a lot faster. We recognize that the tradeoff is that people using noscript get a worse experience, and we apologize for that.

So let us pitch you quickly on why you should enable JavaScript and view our site. CircleCI is powerful, fast, and easy-to-use Continuous Integration and Deployment for web applications.

CircleCI is easy to set up, incredibly fast, allows you to get your code to customers faster, and will even automatically parallelize your tests over many machines to get results to you faster. If that sounds useful, we'd encourage you to whitelist us in noscript and read about it yourself :)

<script crossorigin="anonymous" src="https://dmmj3mmt94rvw.cloudfront.net/assets/js/frontend-production-8fe95c42e3e87a3b6e5fad1d633978da.js" type="text/javascript"></script>

<script id="ze-snippet" async src="https://static.zdassets.com/ekr/snippet.js?key=d6a46f2f-db01-4e4e-a20e-5c089096bfe3"> </script>
@yaningo
Copy link

yaningo commented Apr 8, 2021

Considering that the project does exist (confirmed by the successful API v1.1 request), this error message suggests that you're using project API tokens, which are not supported on CircleCI API v2, as opposed to personal API tokens.

@austinflowspace
Copy link

For whoever is also trying to hit the CircleCi API v2 with a project API token... As @yaningo mentioned, you will need to use a personal api token instead. Would love the ability for project level api tokens as that would be more secure and give the ability for more long-term use cases.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants