planningcenter / developers

Planning Center API docs and support
https://developer.planning.center/docs/
85 stars 8 forks source link

APIs not returning all the data in PCO #1200

Closed smiller43147 closed 3 months ago

smiller43147 commented 3 months ago

Related Product Which product is this question related to? People

Describe the question I have called the people/v2/workflows and gotten 4 workflows back. The meta data indicates that there are a total of 4 to retrieve: "meta": { "total_recoverable_count": 0, "total_unfiltered_count": 4, "total_recently_viewed_count": 1, "total_has_my_cards_count": 0, "has_workflows": true, "total_unassigned_count": 0, "total_count": 4, "count": 4,

Users of the application report having more than a dozen workflows. We have picked the workflow ID from the URL of a couple of them, and if I call that specific ID https://api.planningcenteronline.com/people/v2/workflows/258360 the return is: { "errors": [ { "status": "404", "title": "Not Found", "detail": "The resource you requested could not be found" } ] }

However, if I call one of the 4 workflow IDs that are returned to me, I get that workflow.

What have you tried that worked? Can't get all the other workflows either of the two ways described above.

What have you tried that didn't work? See above.

Additional context

I came across Issue #1038 and that indicates that the API will only return values that the person who created my token can see. This worries me that there might be other APIs that aren't really returning me all the data in PCO. I am not familiar with PCO's security architecture, or what "sharing" workflows mentioned in the Issue means.

What account/permissions are needed by the person creating the OAuth 2 tokens so that the APIs return ALL of the churches data?

I have..

seven1m commented 3 months ago

Indeed, an API token is associated with a user in Planning Center, thus the API will only return the same data that the user would be able to see when using the website planningcenteronline.com or one of our mobile apps.

the person who created my token

It sounds like someone created an API token and asked you to do some programming work? If that is the case, you will need to talk to the person who did that to see what access they have. If they cannot see the data with their user account, then the API token will not either.

I hope that helps answer your question! Please comment here if you need more clarification.

smiller43147 commented 3 months ago

Yes, I'm doing some programming work, and I'm calling APIs across the board. I'm not an actual PCO user. Is there some sort of "super user" account that would be able to access everything? If so I would ask someone with that account to generate my token.

shanebonham commented 3 months ago

Hi @smiller43147,

The closest thing would be an "organization administrator" account, but a user with that role will still only have access to resources in the People application (such as Workflows, Lists and Notes) that are explicitly shared with them.