Hi! I think this will turn out to be a dumb question, but I can’t seem to get the post request to the Iglu server to work. I’m trying with the first example on the setup guide.
curl iglu-lb-<ACCOUNT>.<REGION>.elb.amazonaws.com/api/schemas -X POST -H "apikey: <WRITE_KEY>" -d '{"json": {"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", "description": "Schema for an Acme Inc ad click event", "self": {"vendor": "com.acme", "name": "ad_click","format": "jsonschema","version": "1-0-0"},"type": "object","properties": {"clickId": {"type": "string"},"targetUrl": {"type": "string","minLength": 1}},"required": ["targetUrl"],"additionalProperties": false}}'
{“message”:“The request body was invalid.”}%
All debug checks passes
Loading the same json in Python checks out. What am I doing wrong?
>>> import json
>>> json.loads("""{"json": {"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", "description": "Schema for an Acme Inc ad click event", "self": {"vendor": "com.acme", "name": "ad_click","format": "jsonschema","version": "1-0-0"},"type": "object","properties": {"clickId": {"type": "string"},"targetUrl": {"type": "string","minLength": 1}},"required": ["targetUrl"],"additionalProperties": false}}""")
{'json': {'$schema': 'http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#', 'description': 'Schema for an Acme Inc ad click event', 'self': {'vendor': 'com.acme', 'name': 'ad_click', 'format': 'jsonschema', 'version': '1-0-0'}, 'type': 'object', 'properties': {'clickId': {'type': 'string'}, 'targetUrl': {'type': 'string', 'minLength': 1}}, 'required': ['targetUrl'], 'additionalProperties': False}}
I also tried setting the vendor to the same vendor as in the debug response
{"version":"0.7.0","authInfo":{"vendor":"<OURVENDOR>","schema":"READ","key":[]},"database":"postgres","schemaCount":0,"debug":false,"patchesAllowed":true}
Somewhat related, this is where the custom contexts go in the end? A custom context is a type of “self-describing schema”?