Skip to content

Entries API point #7

@sidneygijzen

Description

@sidneygijzen

Hello,

I am playing around a bit with the API, for now just trying to re-create some numbers from the example document of the municipality of Weststellingwerf.

When trying to request the entries with the following query string

http://openspending.nl:80/api/v1/entries/?period=5&gov_code=0098&year=2011

I get the following error

TransportError(400, u'SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[cSQKJ_e6SNiSsdDs9dJ-ZA][spending][0]: SearchParseException[[spending][0]: query[filtered(gov_code:0098)->cache(_type:entry)],from[0],size[-1]: Parse Failure [Failed to parse source [{"sort": [], "from": 0, "facets": {}, "filter": {}, "query": [{"text": {"entry.gov_code": "0098"}}, {"text": {"entry.period": "5"}}, {"text": {"entry.year": "2011"}}], "size": 20}]]]; nested: SearchParseException[[spending][0]: query[filtered(gov_code:0098)->cache(_type:entry)],from[0],size[-1]: Parse Failure [No parser for element [text]]]; }{[ulHUXXieSzSR9kW3DZm8Qg][spending][1]: RemoteTransportException[[Grey King][inet[/172.17.0.4:9300]][search/phase/query]]; nested: SearchParseException[[spending][1]: query[filtered(gov_code:0098)->cache(_type:entry)],from[0],size[-1]: Parse Failure [Failed to parse source [{"sort": [], "from": 0, "facets": {}, "filter": {}, "query": [{"text": {"entry.gov_code": "0098"}}, {"text": {"entry.period": "5"}}, {"text": {"entry.year": "2011"}}], "size": 20}]]]; nested: SearchParseException[[spending][1]: query[filtered(gov_code:0098)->cache(_type:entry)],from[0],size[-1]: Parse Failure [No parser for element [text]]]; }{[ulHUXXieSzSR9kW3DZm8Qg][spending][2]: RemoteTransportException[[Grey King][inet[/172.17.0.4:9300]][search/phase/query]]; nested: SearchParseException[[spending][2]: query[filtered(gov_code:0098)->cache(_type:entry)],from[0],size[-1]: Parse Failure [Failed to parse source [{"sort": [], "from": 0, "facets": {}, "filter": {}, "query": [{"text": {"entry.gov_code": "0098"}}, {"text": {"entry.period": "5"}}, {"text": {"entry.year": "2011"}}], "size": 20}]]]; nested: SearchParseException[[spending][2]: query[filtered(gov_code:0098)->cache(_type:entry)],from[0],size[-1]: Parse Failure [No parser for element [text]]]; }{[ulHUXXieSzSR9kW3DZm8Qg][spending][3]: RemoteTransportException[[Grey King][inet[/172.17.0.4:9300]][search/phase/query]]; nested: SearchParseException[[spending][3]: query[filtered(gov_code:0098)->cache(_type:entry)],from[0],size[-1]: Parse Failure [Failed to parse source [{"sort": [], "from": 0, "facets": {}, "filter": {}, "query": [{"text": {"entry.gov_code": "0098"}}, {"text": {"entry.period": "5"}}, {"text": {"entry.year": "2011"}}], "size": 20}]]]; nested: SearchParseException[[spending][3]: query[filtered(gov_code:0098)->cache(_type:entry)],from[0],size[-1]: Parse Failure [No parser for element [text]]]; }{[cSQKJ_e6SNiSsdDs9dJ-ZA][spending][4]: SearchParseException[[spending][4]: query[filtered(gov_code:0098)->cache(_type:entry)],from[0],size[-1]: Parse Failure [Failed to parse source [{"sort": [], "from": 0, "facets": {}, "filter": {}, "query": [{"text": {"entry.gov_code": "0098"}}, {"text": {"entry.period": "5"}}, {"text": {"entry.year": "2011"}}], "size": 20}]]]; nested: SearchParseException[[spending][4]: query[filtered(gov_code:0098)->cache(_type:entry)],from[0],size[-1]: Parse Failure [No parser for element [text]]]; }]')

Do you have any idea where I went wrong? :-)

(After submitting this issue, I noticed it's probably the wrong repo where I submitted it.... but I can' t find the one for openspending API. Let me know, and I gladly will move the issue over there!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions