xjm / drupal_core_release

Set of scripts for preparing a Drupal core release
14 stars 11 forks source link

Use Drupal.org's API for queries/string_change.txt & rn_mention.txt #2

Open drumm opened 8 years ago

drumm commented 8 years ago

To get a term ID from a string:

https://www.drupal.org/api-d7/taxonomy_term.json?vocabulary=9&name=String%20change%20in%208.0.2&full=0

To query for issues:

https://www.drupal.org/api-d7/node.json?status=1&field_project=3060&field_issue_version=8.0.x-dev&field_issue_category=1&field_issue_status=7&taxonomy_vocabulary_9=36890

RestWS doesn't support OR/IN queries, so all combinations of field_issue_category & field_issue_status will have to be requested and results merged together.

junowilderness commented 8 years ago

@drumm I was just checking this out and experienced intermittent 500 errors on queries like: https://www.drupal.org/api-d7/node.json?type=project_issue&field_project=3060&&field_issue_version=8.2.x-dev&field_issue_priority=300&field_issue_status=13

Also, is there a way to query multiple values, for example: &field_issue_status[]=13&field_issue_status[]=8?

(edited for my stupidity)

junowilderness commented 8 years ago

@drumm Duh, your comment on OR/IN went in one ear and out the other, sorry!

drumm commented 8 years ago

We do see the intermittent 500s on our end too. That seems to be the field cache warming up, we might lower the max number of entities returned in the future. Go ahead and retry, waiting 5-10s in between may increase success.

drumm commented 8 years ago

It turns out OR seems to be possible: https://www.drupal.org/node/2308939#comment-11371609

junowilderness commented 8 years ago

Yes, that works: https://www.drupal.org/api-d7/node.json?type=project_issue&field_project=3060&&field_issue_version=8.2.x-dev&field_issue_priority=300&field_issue_status[value][]=13&field_issue_status[value][]=8&limit=10

junowilderness commented 8 years ago

Or it seems to work, in this case. There are comments in the issue you referenced on not-so-subtle surprises.