IAM Application Registrations
Applications interface
Access to the applications endpoint.
The user is not expected to use this class directly. It is an attribute of the
Archivist
class.
For example instantiate an Archivist instance and execute the methods of the class:
with open(".auth_token", mode="r", encoding="utf-8") as tokenfile:
authtoken = tokenfile.read().strip()
# Initialize connection to Archivist
arch = Archivist(
"https://app.datatrails.ai",
authtoken,
)
application = arch.applications.create(...)
- class archivist.applications._ApplicationsClient(archivist_instance: Archivist)[source]
ApplicationsClient
Access to applications entities using CRUD interface. This class is usually accessed as an attribute of the Archivist class.
- Parameters:
archivist (Archivist) --
Archivist
instance
- create(display_name: str, custom_claims: dict[str, str]) Application [source]
Create application
Creates application with defined attributes.
- Parameters:
display_name (str) -- display name of application.
custom_claims (dict) -- custom claims
- Returns:
Application
instance
- create_from_data(data: dict[str, Any]) Application [source]
Create application
Creates application with request body from data stream. Suitable for reading data from a file using json.load or yaml.load
- Parameters:
data (dict) -- request body of application.
- Returns:
Application
instance
- delete(identity: str) dict[str, Any] [source]
Delete Application
Deletes application.
- Parameters:
identity (str) -- applications identity e.g. applications/xxxxxxxxxxxxxxxxxxxxxxx
- Returns:
Application
instance - empty?
- list(*, page_size: int | None = None, display_name: str | None = None)[source]
List applications.
List applications that match criteria.
- Parameters:
display_name (str) -- display name (optional)
page_size (int) -- optional page size. (Rarely used).
- Returns:
iterable that returns
Application
instances
- read(identity: str) Application [source]
Read Application
Reads application.
- Parameters:
identity (str) -- applications identity e.g. applications/xxxxxxxxxxxxxxxxxxxxxxx
- Returns:
Application
instance
- regenerate(identity: str) Application [source]
Regenerate secret
Regenerate secret for app registration
- Parameters:
identity (str) -- identity of application
- Returns:
Application
instance
- update(identity: str, *, display_name: str | None = None, custom_claims: dict[str, str] | None = None) Application [source]
Update Application
Update application.
- Parameters:
identity (str) -- applications identity e.g. applications/xxxxxxxxxxxxxxxxxxxxxxx
display_name (str) -- display name of application.
custom_claims (dict) -- custom claims
- Returns:
Application
instance