Funcs
Funcs : Funcs
Read an entity by id
Read a list of entities by their ids into a grid
Read the first entity which matches filter
Read all entities which match the filter
Return summary information about the server
Close the client's current session and release any server side resources held by it
List the operations this server supports, one row per op
List the libraries composing the server's namespace, one row per lib sorted by name
List the filetypes available for content negotiation, one row per format sorted by name
(id: Ref?, checked: Bool) => Dict? <noSideEffects, op>
Read an entity by id. If not found raise error or
return null based on checked flag. A null id behaves as
an entity which is not found.
Examples:
readById(@2b00f9dc-82690ed6)
readById(@2b00f9dc-82690ed6, false)
(ids: List <of:Ref>, checked: Bool) => Grid <noSideEffects, op>
Read a list of entities by their ids into a grid. The rows in the
result correspond by index to the ids list. If checked is true,
then every id must be found or an error is raised. If checked
is false, then an unknown entity is returned as a row with every column
set to null (including the id tag).
Examples:
readByIds([@2af6f9ce-6ddc5075, @2af6f9ce-2d56b43a])
readByIds([@2af6f9ce-6ddc5075, @2af6f9ce-2d56b43a], false)
(filter: Filter, checked: Bool) => Dict? <noSideEffects, op>
Read the first entity which matches filter. If no matches found raise error or return null based on checked flag. If there are multiple matches it is indeterminate which one is returned.
Examples:
read(Site) // read any entity which subtypes Site
read(Site and dis=="HQ") // read site with specific dis tag
read(Room) // raise error if no room entities
read(Room, false) // return null if no room entities
(filter: Filter, opts: Dict?) => Grid <noSideEffects, op>
Read all entities which match the filter.
Options:
limit: max number of entities to returnsort: sort by display namesearch: platform specific search patterngridMeta: dict to use for the result's grid level meta
Examples:
readAll(Site) // read all site entities
readAll(Equip and siteRef==@xyz) // read all equip in a given site
readAll(Equip, {limit:10}) // read up to ten equips
readAll(Equip, {sort}) // read all equip sorted by dis
() => AboutInfo <noSideEffects, op>
Return summary information about the server. See AboutInfo for the tags a server should report where applicable. Vendors may add their own tags.
See Ops.
() => None <op>
Close the client's current session and release any server side resources held by it. Any future requests using the session's authentication token are rejected and the client must reauthenticate.
Servers which do not maintain per-session state may implement this as a no-op.
See Ops.
() => Grid <of:OpInfo> <noSideEffects, op>
List the operations this server supports, one row per op; see
OpInfo for the columns. This is a quick summary for debugging
and discovery - to inspect an op's full definition, or to generate
a client or an API schema, use the openapi op instead.
Clients written against an older protocol version receive that version's format instead; see Ops.
() => Grid <of:LibInfo> <noSideEffects, op>
List the libraries composing the server's namespace, one row per lib sorted by name; see LibInfo for the columns. These are the libs a client resolves to mirror the namespace locally.
() => Grid <of:FiletypeInfo> <noSideEffects, op>
List the filetypes available for content negotiation, one row per format sorted by name; see FiletypeInfo for the columns and HttpApi for how a format is selected.
Clients written against an older protocol version receive the legacy def format instead.