Admin Functions

class ai.backend.client.func.admin.Admin[source]

Provides the function interface for making admin GrapQL queries.

Note

Depending on the privilege of your API access key, you may or may not have access to querying/mutating server-side resources of other users.

session = None

The client session instance that this function class is bound to.

classmethod await query(query, variables=None)[source]

Sends the GraphQL query and returns the response.

Parameters
  • query (str) – The GraphQL query string.

  • variables (Optional[Mapping[str, Any]]) – An optional key-value dictionary to fill the interpolated template variables in the query.

Return type

Any

Returns

The object parsed from the response JSON string.