Expand my Community achievements bar.

Do you have questions about the migration to Adobe Business Platform? Come join our upcoming coffee break and ask away!

HTTP OPTIONS Responds 422

Avatar

Level 1
Hi everyone, I'm attempting to make a call to your API, and it looks like I'm getting blocked by some CORS issues that I've never seen before. When I make an HTTP GET request via XHR, chrome checks options and the server returns a 422 Unprocessable Entity. This causes the CORS preflight to fail (I think) and prevents me making any requests to the server. When I make the request by just pasting the request in the chrome window it returns everything, but when I make the request via postman the request only succeeds every other attempt. Tested with V9 and V10, behavior consistent between both. I'm not sure where to go from here as I've never seen behavior like this from an API endpoint. Thanks in advance Conner Phillis
6 Replies

Avatar

Level 1
I did a little more digging with Postman, this time sending an HTTP OPTIONS from there and got the 422. Postman revealed the error message which stated that OPTIONS is not an allowed method, and there is no "Access-Control-Allow-Origin" in the response headers. Does this mean the Workfront REST API doesn't support web apps that aren't server side rendered? (i.e. the implementation status demo, which is written in PHP) Conner Phillis

Avatar

Level 2
Could you provide your postman request? We use the api via frontend applications exclusively. thanks, Karl Karl Krasnowsky Lingo Systems

Avatar

Level 1
Of course, note that I have filtered out the API key and the subdomain "https://xxxxxxx.preview.workfront.com/attask/api/v10.0/project/search?apiKey=xxxxxx" (I have tested this on preview, test, and production, all to the same effect) If you don't mind me asking, what technology are you using for your frontend applications? Thanks for your help! Conner Phillis

Avatar

Level 1
Of course, note that I have filtered out the API key and the subdomain "https://xxxxxxx.preview.workfront.com/attask/api/v10.0/project/search?apiKey=xxxxxx" (I have tested this on preview, test, and production, all to the same effect) If you don't mind me asking, what technology are you using for your frontend applications? Thanks for your help! Conner Phillis

Avatar

Level 2
so all you're trying to do is search for all projects? no filter? Karl Krasnowsky Lingo Systems

Avatar

Level 1
correct, we're just starting to write our integrations and this was a jumping-off point for the UI I was writing. Are filters required for requests to complete? Conner Phillis