1

I created a container called /courseattendees with the following payload:

{
  uuid: "972a794a-8312-11e3-b1ca-b531afb5f461"
  type: "courseattendee"
  created: 1390360162004
  modified: 1390360162004
  badge: "blank.png"
  course: "7d4b97ea-82e3-11e3-bfff-179577f046a1"
  coursestart: "4850ef54-82fc-11e3-b496-c959b35bdbdf"
  email: "michaelb@apigee.com"
  metadata: {
    path: "/courseattendees/972a794a-8312-11e3-b1ca-b531afb5f461"
  }
  status: "registered"
}

I can query other elements like email but I can't query coursestart (I orignally called it coursedateuuid but renamed it thinking that the uuid part of the name was causing some background indexing).

Is there some kind of special escaping or trick when I'm referencing a uuid formatted element?

Here's my query:

https://api.usergrid.com/apigeetraining/contentapi2/courseattendees?ql=select * where coursestart = '4850ef54-82fc-11e3-b496-c959b35bdbdf'

(Needs authorization)

Cheeso
  • 189,189
  • 101
  • 473
  • 713
Michael Bissell
  • 1,210
  • 1
  • 8
  • 14

1 Answers1

1

coursestart is of type UUID, so you don't need the single quotes:

https://api.usergrid.com/apigeetraining/contentapi2/courseattendees?ql=select * where coursestart = 4850ef54-82fc-11e3-b496-c959b35bdbdf

See supported data types in the Apigee docs for details on the different types of data that can be stored/retrieved.

brandonscript
  • 68,675
  • 32
  • 163
  • 220
  • This is a supported data type -- unless there is some way to specifically cast it to something else, I believe it is treating it as a string. – Michael Bissell Jan 22 '14 at 17:33
  • 1
    @MichaelBissell I suspect there's something (regular expression?) that happens on the POST/PUT side that detects it as a UUID type and casts it as such. Don't know why, but this is what I've always had to do. It behaves the same way is you queried for `uuid`. – brandonscript Jan 22 '14 at 17:37
  • 1
    I tried the same thing. The coursestart field is in UUID format, so it is treated as a UUID even though it is enclosed in quotation marks in the create json. Similarly, storing the value of "100.0" would convert the value to a float. Querying for fieldname=4850ef54-82fc-11e3-b496-c959b35bdbdf should work for you. – Mike Malloy Jan 22 '14 at 17:48