This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » REST API - /content/views POST...
expandshrink

REST API - /content/views POST returns 403 forbidden error

REST API - /content/views POST returns 403 forbidden error

Saturday 08 March 2014 2:00:00 pm - 4 replies

I am trying to POST a request:

 

http://uname:pwd@ezlar.com/api/ezp/v2/content/views

Accept: application/vnd.ez.api.View+json

Content-Type: application/vnd.ez.api.ViewInput+xml

<ViewInput>   

<identifier>AircraftList</identifier>   

<Query>       

<Criteria> 

          <ContentTypeIdentifierCriterion>aircraft_information</ContentTypeIdentifierCriterion>    

</Criteria>

<limit>10</limit>

<offset>0</offset>   

</Query>

</ViewInput>

 

Result:

Error 403 forbidden

Response does not contain any data.

 

There are two content objects of type aircraft_information in the CMS.

I can successfully execute the same query using the public API in a Symfony bundle.

Clean install of eZ and using their standard rewrite rules in my virtual host configuration.

Wednesday 12 March 2014 1:17:45 pm

I can see that you are using basic auth, are you sure it is enabled ? 403 clearly indicates a permissions issue.

Did you change anything in security.yml ?

Wednesday 12 March 2014 11:14:58 pm

Bertrand,

 

It is enabled and working. No changes to security.yml.

 

Glenn

Tuesday 18 March 2014 11:33:09 am

I'm really confused here. It is hard to tell without further information...

Are you in dev or prod mode ? In dev mode, you should get an exception trace.

Tuesday 08 July 2014 12:00:35 pm

I have the same problem. How did you solve it?

SOLVED  for  me: I use curl now to test the rest api as this works. The advanced rest client from google chrome always gave me a 403 error.

Using the REST-API with curl is described here:

http://damien.pobel.fr/post/ez-publish-rest-curl

Thanx Andi

Modified on Wednesday 09 July 2014 7:21:24 am by Andreas Adelsberger

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from