Concept IDs not returned from client


#1

Hi

I’m making use of the python client to get_schema_concept, using the concept ID. However, I don’t see a way to actually get the IDs programatically. So far I have just grabbed them from the UI. Is there a way either via the client or direct graql to get the ID of a schema concept i.e. a thing type

Thanks

Nathan


#2

Hi @nathan.johnson

the object returned by the client should have the id field on it:

person_type = tx.get_schema_concept("person")
# person_type.id  should have the id of the type person

we will add this to the docs.

EDIT: (Also if you’re interested in just fetching a Schema Concept, you can use label instead of ID, as also label is unique and indexed)