3 messages in com.googlegroups.google-base-data-apiRe: how to query with <g:id> attribute
FromSent OnAttachments
Chinavasion20 Feb 2008 17:08 
Jeff S21 Feb 2008 13:54 
Chinavasion03 Mar 2008 04:24 
Subject:Re: how to query with <g:id> attribute
From:Jeff S (j.@google.com)
Date:02/21/2008 01:54:00 PM
List:com.googlegroups.google-base-data-api

Hi Chinavasion,

When you use the bq=[attribute:value] syntax, the attributes that you search over are elements in the g: namespace, so you don't need to specify the namespace in your query (I think this is always true). So you could just use:

.../feeds/items?bq=[id:2365]

Note that a g:id is different from the Atom ID of the item. Each item is assigned an Atom ID by the server which uniquely identifies the item, but you are free to define your own id element in the Google Base namespace (g), the g:id does not need to be unique. I only mention this because having two id elements is sometimes confusing :)

Happy coding,

Jeff

On Feb 20, 5:09 pm, Chinavasion <cvas@gmail.com> wrote:

Hi, How do I query my gbase items with the g:id attribute? I've tried the following but got nothing from the query results. There is a product with a <g:id> attribute with a value of 2365. I did this trying to pull it out: .../feeds/items?bq=[g id : 2365] .../feeds/items?bq=[g id(text): (text)2365] Both failed to work. Can anybody show me the right syntax? Thank you