Get Entity Details
Observable: Get Entity Details
User Intent
"I want to retrieve full details for a specific entity"
Operation
SDK Method:
graphlit.queryObservables()GraphQL:
observablesqueryEntity Type: Observable
Common Use Cases: View entity summary details, diagnose extraction, check occurrence counts
TypeScript (Canonical)
import { Graphlit } from 'graphlit-client';
import {
ContentFilterInput,
ObservableTypes,
} from 'graphlit-client/dist/generated/graphql-types';
const graphlit = new Graphlit();
const observableId = 'observable-id-here';
const response = await graphlit.queryObservables({
contents: [{ id: 'content-id-here' }],
observables: [{ id: observableId }],
});
const observable = response.observables?.results?.[0];
if (!observable) {
console.log('Observable not found');
process.exit(0);
}
console.log(`Entity: ${observable.observable.name}`);
console.log(`Type: ${observable.type}`);
if (observable.observable.description) {
console.log(`Description: ${observable.observable.description}`);
}Query observable (snake_case)
result = await graphlit.client.query_observables( filter={ "observables": [{"id": observable_id}], "contents": [{"id": content_id}] } )
observable = (result.observables.results or [None])[0]
if observable: print(f"Entity: {observable.observable.name}") print(f"Type: {observable.type}") else: print("Observable not found")
Parameters
filter.observables(EntityReferenceFilterInput[]): One or more observable references (IDs, URIs, names)filter.contents(EntityReferenceFilterInput[], optional): Scope to specific content itemsfilter.types(ObservableTypes[], optional): Restrict to certain entity types (Person, Organization, etc.)filter.search(string, optional): Keyword search across observable names
Response
Last updated
Was this helpful?