Admin Functions

class ai.backend.client.func.admin.Admin

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.

classmethod await query(query, variables=None)

Sends the GraphQL query and returns the response.

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

  • variables (Optional[Mapping[str, Any], None]) – 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.