Take the 2-minute tour ×

I need to pass guid of user/blog/wire etc to elgg rest api. Is there a way to find the guid of an elgg entity(blog/user) manually?

share|improve this question
When you say "manually", do you mean that you would be looking it up in the database directly? If you have an entity, it will have a "guid" property that you can access directly: someEntity->guid –  Mike Hedman Feb 27 '12 at 0:26
@MikeHedman I mean I don't want to use elgg api to see the metadata. I want to see it by running a mysql query. –  Selvaraj M A Feb 28 '12 at 22:24
add comment

1 Answer

up vote 0 down vote accepted

For finding a users' guid it would be something like: select guid from {prefix}users_entity where ...

You'll have to provide the "where" clause.

If in the Elgg configuration you didn't specify a table prefix, you can leave out the {prefix} part.

For blogs, I think it would be a bit more difficult. The guid would be in the entities table, but it's a challenge to determine WHICH entity to select. You'd need to filter by the subtype to narrow it down to blog posts, and then it depends on what info you currently have (like post date, user who posted, etc) to figure out the rest of the query (since some of the entity attributes could be stored as metadata). Without knowing a lot more about your specific need, that's about as specific as I can get.

share|improve this answer
add comment

Your Answer


