-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query entries get response Bad Request #7
Comments
Strangley I was able to filter by doing: query=all, then I get 3 entries instead of all posts, categories and authors. But this is not good enough. |
Maybe contetful is not production ready and is not meant for building blogs? |
@iprognos — When querying the Contentful API you must use the content type ID. where You can see al content types using: I would really recommend reading through the entire content delivery API documentation here: https://www.contentful.com/developers/documentation/content-delivery-api/ Can you let me know if it works so I can close this issue? Thanks! |
I tested the contentful entries query:
Failed to load resource: the server responded with a status of 400 (Bad Request)
https://cdn.contentful.com/spaces/1jdsnorf6e9t/entries?access_token=02d0e52b0cfb62cb9fc011cfe849191fd58a9abb285a388afd68720cf9ab1df7&content_type=category
I switched from dog to category because I don't have dogs in my blog, other then that, I used it this way:
ul contentful-entries="content_type=dog"
li ng-repeat="dog in $contentfulEntries.items"
{{ dog.fields.name }}
/li
/ul
I have also tried with CURL and followed the documentation: https://www.contentful.com/developers/documentation/content-delivery-api/http/#search-content-type.
curl -X GET -H 'Authorization: Bearer 02d0e52b0cfb62cb9fc011cfe849191fd58a9abb285a388afd68720cf9ab1df7' 'https://cdn.contentful.com/spaces/1jdsnorf6e9t/entries?content_type=category';
{
"sys": {
"type": "Error",
"id": "InvalidQuery"
},
"message": "The query you sent was invalid. Probably a filter or ordering specification is not applicable to the type of a field.",
"details": {
"errors": [
{
"name": "unknownContentType",
"value": "DOESNOTEXIST"
}
]
},
"requestId": "c0e-1773132314"
}
Maybe only dogs is searchable...
The text was updated successfully, but these errors were encountered: