Skip to main content
service : (OrchestratorInstallArgs) -> {
  get_user : (principal) -> (opt PublicUser) query;
  get_users : (Pagination, opt text) -> (GetUsersResponse) query;
  orbit_station : () -> (principal) query;
  retry_user_canister_creation : () -> (RetryUserCanisterCreationResponse);
  revoke_share_file : (principal, nat64) -> (RevokeShareFileResponse);
  revoke_share_file_for_users : (vec principal, nat64) -> (
      RevokeShareFileResponse,
    );
  set_user : (text, blob) -> (SetUserResponse);
  share_file : (principal, nat64, ShareFileMetadata) -> (ShareFileResponse);
  share_file_with_users : (vec principal, nat64, ShareFileMetadata) -> (
      ShareFileResponse,
    );
  shared_files : () -> (SharedFilesResponse) query;
  user_canister : () -> (UserCanisterResponse) query;
  username_exists : (text) -> (bool) query;
  who_am_i : () -> (WhoamiResponse) query;
}

get_user

Returns the public information of a user by their user ID. Arguments:
  • user_id: The user ID of the user to retrieve.
Returns:
  • opt PublicUser: An optional PublicUser object containing the user’s public information, or null if the user does not exist.

get_users

Returns a paginated list of users. Arguments:
  • Pagination: The pagination parameters to use for the query.
  • opt text: An optional search term to filter users by username.
Returns:
  • GetUsersResponse: A response object containing a list of users and pagination information.

orbit_station

Returns the principal of the Orbit Station canister. Returns:
  • principal: The principal of the Orbit Station canister.

retry_user_canister_creation

Retries the creation of a user canister for the current user. Returns: RetryUserCanisterCreationResponse: A response object indicating the result of the retry operation.

revoke_share_file

Revoke access to a shared file for a specific user. Can only be called by the user canister. Arguments:
  • user_id: The user ID of the user to revoke access from.
  • file_id: The ID of the file to revoke access to.
Returns: RevokeShareFileResponse: A response object indicating the result of the revocation operation.

revoke_share_file_for_users

Revoke access to a shared file for multiple users. Can only be called by the user canister. Arguments:
  • user_ids: A vector of user IDs to revoke access from.
  • file_id: The ID of the file to revoke access to.
Returns: RevokeShareFileResponse: A response object indicating the result of the revocation operation.

set_user

Sign up with internet identity by providing a username. This call causes the orchestrator to start the worker which will result in the creation of the user canister for the user. Arguments:
  • username: The username to set for the user.
  • blob: The blob containing the user’s Public Key
Returns: SetUserResponse: A response object indicating the result of the user creation operation.

share_file

Share a file with a specific user. Can only be called by the user canister. Arguments:
  • user_id: The user ID of the user to share the file with.
  • file_id: The ID of the file to share.
  • ShareFileMetadata: Metadata about the file to share, such as the file name and description.
Returns: ShareFileResponse: A response object indicating the result of the share operation.

share_file_with_users

Share a file with multiple users. Can only be called by the user canister. Arguments:
  • user_ids: A vector of user IDs to share the file with.
  • file_id: The ID of the file to share.
  • ShareFileMetadata: Metadata about the file to share, such as the file name and description.
Returns: ShareFileResponse: A response object indicating the result of the share operation.

shared_files

Returns a list of files shared with the current user. Returns:
  • SharedFilesResponse: A response object containing a list of files shared with the user.

user_canister

Returns the principal of the user canister or its creation state if not created yet/pending/failed for the current user. Returns:
  • UserCanisterResponse: A response object containing the principal of the user canister or its creation state.

username_exists

Returns whether a username already exists. Arguments:
  • username: The username to check for existence.
Returns:
  • bool: true if the username exists, false otherwise.

who_am_i

Returns the public information of the current user. Returns:
  • WhoamiResponse: A response object containing the public information of the current user, including their user ID and username.