I have set up a local Iglu server and pushed about 50 custom schemas using igluctl with --public flag. However, when calling the Iglu server’s API, it tells me {“message”:“No schemas available”}. I checked the Postgres iglu_schemas table and all rows have is_public: true.
The request I’m sending is
curl -X GET “http://ec2-xx-xx-xx-xx.us-west-1.compute.amazonaws.com:8080/api/schemas/public” -H “accept: application/json”
What I should maybe mention is that I first pushed the schemas without the --public flag, and then deleted all the private schemas from the DB so that I could re-add them in public via igluctl.
The same schemas worked in Snowplow mini.
Any ideas how I can fix this? Any help is appreciated!
Try and restart your iglu server, I’m not sure exactly what the problem might be but I suspect manually deleting the entries from the DB might have caused the issue. Generally I’d advise don’t delete schemas from an Iglu, simply upload new versions on top of the old ones.
I reset the database and re-ran the iglu-server setup, still getting {“message”:“No schemas available”}.
Concretely, I did the following steps:
connect to postgres, drop igludb database, create new igludb database
java -jar iglu-server-0.6.0.jar setup --config iglu.conf
concretely, my config is:
repo-server {
interface = "0.0.0.0"
port = 8080
pool = "cached"
}
# 'postgres' contains configuration options for the postgre instance the server is using
# 'dummy' is in-memory only storage
database {
type = "postgres"
host = "localhost"
port = 5432
dbname = "igludb"
username = "postgres"
password = "xxxxx"
driver = "org.postgresql.Driver"
maxPoolSize = 5
pool = {
}
}
# Enable additional debug endpoint to output all internal state
debug = true
connect to igludb database, INSERT INTO iglu_permissions VALUES ('xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', '', TRUE, 'CREATE_VENDOR'::schema_action, '{"CREATE", "DELETE"}'::key_action[]);
run iglu-server java -jar iglu-server-0.6.0.jar --config iglu.conf
To add what Paul said, there was an API change in 0.5.0 and we deleted /api/schemas/public endpoint. Now, all schemas are served via /api/schemas and only apikey header determines what schemas will be returned. If you’re anonymous user (no apikey provided) - you’ll get only public schemas (as with /api/schemas/public in pre-0.5.0). If you provide an apikey - it will return you schemas that your key has access to and public ones.
Ooh I see, I called api/schemas and it works! Maybe we should change the response of api/schemas/public to {"message":"deprecated"} instead of {"message":"No schemas available"}
Can I specify an API key for the StreamEnrich Iglu client?