PHP API Questions
Message
 

I have been working on a php interface and have a couple of questions/comments.

It is unclear how to add more than one column to the display_column or to add more than one filter to the filter parameters. I have been able to add one but the expected string input does not seem to work with delimiters. Actually I would have expected an array.

Also, the show_columns seems to be backwards. When I set it to 1, I get regular result rows. When I leave it empty or set it to zero I get the column names.

I was able to fix the ssl (curl) issue and am now ready to work on the interface. Any help would be beneficial.

Thanks,
Scott

 
The poster of the following message is an official representative of CATS.

For parameters like 'display_columns' that can take multiple values, you need to use a normalized HTTP array. Here's an example:

catsone.com/api/something?display_column[]=one&display_column[]=two&display_column[]=three

I'm not sure on your second issue, I've tested show_columns with 1 as you did and it's appearing correctly for me. Here's what that setting means, in case there's a misunderstanding of the definition:

When show_columns is set to true, then the result set is metadata about the columns (first_name, last_name, etc.). Metadata would include the column title, id, type, etc.. Think of it as a regular SQL query result that has been rotated -90 degrees so the columns actually become the rows, or a "DESCRIBE table" query. When show_columns is not set, the row data is returned, encapsulated in elements named after the column ids.


Login to post new content in the forum