bluesky_queueserver_api.zmq.REManagerAPI.plans_allowed¶
- REManagerAPI.plans_allowed(*, reload=False, user_group=None)¶
Returns the list (dictionary) of allowed plans. The function checks
plans_allowed_uid
status parameter and downloads the list of allowed plans from the server if UID changed. Otherwise the copy of cached list of allowed plans is returned.- Parameters:
- reload: boolean
Set the parameter
True
to force reloading of status from the server beforeplans_allowed_uid
is checked. Otherwise cached status is used.- user_group: str or None (optional)
User group name used in API request. Specified user group name overrides the default user group name (accessible using
user_group
property). The default user group name is used if the parameter is not specified orNone
. The parameter is ignored by the HTTP version of the API.
- Returns:
- response: dict
Dictionary keys:
success
: boolean - success of the request.msg
: str - error message in case the request is rejected by RE Manager or operation failed.plans_allowed
: dict - list (dictionary) of allowed plans.plans_allowed_uid
: str - UID of the list of allowed plans.
- Raises:
- RequestTimeoutError, RequestFailedError, HTTPRequestError, HTTPClientError, HTTPServerError
All exceptions raised by
send_request
API.
Examples
# Synchronous code (0MQ, HTTP) response = RM.plans_allowed() plans_allowed = response["plans_allowed"] # Asynchronous code (0MQ, HTTP) response = await RM.plans_allowed() plans_allowed = response["plans_allowed"]