Can´t get json-api to work when passing arguments.
My api is working with no arguments but I can´t understand how to do it with passing arguments.
I run this (with singel or dubbelbrackets- same result):
http://localhost:4000/api/json/documents/syllabuses/by_type/"se"/"gy"/"courses"
and get this:
```
{
"errors": [
{
"code": "NotFound",
"detail": "No syllabus record found with
country_code: "se", document_type: "courses", school_type: "gy"`",
"id": "1db6e507-92e1-4683-a133-517993305779",
"status": "404",
"title": "Entity Not Found"
}
],
"jsonapi": {
"version": "1.0"
}
}
```14 Replies
Pretty sure you just need to remove the quotation marks
Same error
Can I see the error? It should be at least slightly different
`
What happens if you try to get it yourself?
yes we have an error here
Ah, you probably need something like this set up on your resource
If the resource doesn't have an
identity
on a set of fields, then they can't be used to look one up
identity
is basically "unique index"Ah. This wont be an issue if I do not use ETS?
You need the identity regardless of which data layer you are using
Error when I compile: Identities: unique_country_document_type_school_type
Must specify the
pre_check_with
option. Can´t find where to put that in the documentationHmm. (Mix) Could not start application ampl_dev: exited in: AmplDev.Application.start(:normal, [])
(EXIT) an exception was raised:
** (Ash.Error.Invalid) Input Invalid
* country_code, document_type, school_type: has already been taken.
I am making some newbie error here
Ahh never mind
Hey @maxmannen if your issue has been resolved please add the resolved tag and close the post, thanks!
Thanks for your help!