Post

1 follower Follow
0
Avatar

Simple API URL structure?

Hi there,

I'm trying to setup just a simple API call to get a filtered list of items. Here's the call I'm using:

GET https://api.podio.com/item/app/{app_id}/filter/{view_ID}/

(I have substituted the actual app ID and view ID)

But I keep getting an error returned that says "No matching operation could be found. The path '/item/app/{app_id}/filter/{view_ID}/' was not found.."

I am authenticated and can successfully use both:

GET https://api.podio.com/app/{app_ID}

GET https://api.podio.com/item/{item_ID}/basic

My goal is to setup a static call that will always pull the latest app item that includes a specific app reference (in this case, a Report app item for a specific client from the Client app).

Any help you could provide would be greatly appreciated!

Allen Fuller Answered

Please sign in to leave a comment.

7 comments

0
Avatar

Thanks! That solves that mystery!

I guess really what I am trying to do is create a filter based on the value of an app reference field. How would I structure that?

Thanks again!

Allen Fuller 0 votes
0
Avatar

For Filter Items you can see that it has a 'filters' key in the request body. Filters is a hash and just set a key to be the field_id of your app reference field and the value to be an array of item_ids that should be matched.

Does that make sense?

/Andreas

Andreas Haugstrup Pedersen 0 votes
0
Avatar

Hi Andreas,

I really appreciate your help. I'm still not clear though... How would I construct a URL to include the field_id key in the URL?

Thanks again!

-Allen

Allen Fuller 0 votes
0
Avatar

The request is a POST request and the field key goes along with all the other settings as a part of the JSON you send in the request body.

Andreas Haugstrup Pedersen 0 votes
0
Avatar

It's a POST request, even if I want to GET a filtered list of web app items back? That might be where I was confused.

Allen Fuller 0 votes
0
Avatar

As you can see in the API documentation link I included earlier it is indeed a POST request: https://developers.podio.com/doc/items/filter-items-4496747

This is for the simple reason that the filter syntax gets very complicated to represent in a query string.

Generally speaking, if you can you should use one of our API clients as much this this nitty gritty stuff is handled for you: https://developers.podio.com/clients

/Andreas

Andreas Haugstrup Pedersen 0 votes