Not getting committees in API v1


#1

This post was flagged by the community and is temporarily hidden.


#2

It wants a “first” or “last” parameter less than or equal to 100. See http://docs.openstates.org/en/latest/api/v2/index.html . If it isn’t obvious from the doc, please explain so it can be improved.


#3

Thanks for the response, now I’m able to get committees response from API v2, But I have one question on API v1 that, Is there any way to get the committees data along with legislator object if want to fetch bulk data using state-code.


#4

I’m not sure I can help very much, but here are some questions:

I believe you are using the legislator detail API, e.g. “openstates.org/api/v1/legislators/DCL000012/”. Is that right?

I think the missing data is normally returned as a roles field. Is that correct? If so, is the field altogether missing, or is it an empty array?

Have you tried more than one state? Which state(s)? Is the problem specific to that state? Did the v2 request return what you’re looking for in that/those states?


#5

This post was flagged by the community and is temporarily hidden.


#6

I’m puzzled, since I don’t remember the legislative search API returning roles, it wouldn’t make sense for it to return roles by default, the doc says it doesn’t return them by default, they aren’t in the example return data, and that doc hasn’t changed in a long time. Your easiest but riskiest approach is to add a fields query parameter to ask for roles, but I wouldn’t be surprised if it doesn’t work. Behavior there apparently has changed recently; see http://docs.openstates.org/en/latest/api/index.html#deprecation .

I don’t know the server source code well enough to accurately interpret it without taking a day to do it.

If the fields query parameter doesn’t help, I’d suggest seeing whether the legislator detail api, that I assumed you were using, returns what you need, and using that if it does. Or switch to v2, of course.