wikimedia-enterprise / wme-sdk-go

Software development kit for Wikimedia Enterprise APIs in GO.
https://enterprise.wikimedia.com
Apache License 2.0
3 stars 0 forks source link

Allowed filters documentation #7

Open ed-sparkes opened 3 months ago

ed-sparkes commented 3 months ago

Is there any docs on the allowed filters. Keep getting 404s if i supply a filter it doesnt like.

For example if i want to get a specific language from project code wiki i have tried

{
"filters": [{ "field":"in_language.identifier", "value":"en"} ,{ "field":"is_part_of.code", "value":"wiki"} ]
}

but get a 404

the language on its own works as does if i include a is_part_of.identifier but not with the code?

prabhat393 commented 1 month ago

In your example above, you are using is_part_of.code. code is not a required field in is_part_of object. Refer to this doc. It is safe to use required fields under filters. String, numbers (int or float) type fields are supported for filtering.

Please check few article responses without filters to get an idea on the required fields always populated. Also, refer to the article schema.