Public API
Cayosoft Administrator Public API is a REST API that provides access to the product.
Administrator functionality
Before using any commands from Public API, you need to enable them. In theCayosoft Administrator Console:
Navigate to Home > Configuration > Settings > Public API.
Check Public API is enabled on this Administration Service.
Click Save Changes.
After that Public REST API service becomes available on these ports:
7801 - OAuth service
7802 - Graph service
7803 - Windows integrated authentication service
To start working with Cayosoft Administrator Public API, you need to install the CGraph PowerShell module. Install it on the machine where you plan to use Public API. Learn more below..
Connecting to Cayosoft Administrator Service Public API
Initiate connection to Cayosoft Administrator Service
NOTE: Before using any commands from Public API:
Enable Public API. Refer to the following article for additional information: Public API .
Install the Cayosoft Graph module. Refer to the following article for additional information: Installing Cayosoft Graph module.
Initiate a connection to the Cayosoft Administrator Service.
Connect-CGraphAdminService
[-AuthType <Windows | Office365>]
[-Credential <PSCredential>]
[-UserInteractionRequired <Switch>]
[-Server <string>]
[-ApplicationID <string>]Description
The Connect-CGraphAdminService attempts to initiate a connection to the Cayosoft Administrator Service. Run this command from a Windows PowerShell.
Parameters
-AuthType
Specifies the authentication type. It can be Office365 or Windows. If the authentication type is not specified, Windows authentication is used.
-Credential
Specifies the credential to use to connect to the Cayosoft Administrator Service. Specifies the credential to use to connect to Azure Active Directory. To obtain a PSCredential object, use the Get-Credential cmdlet.
-UserInteractionRequired
Specifies that user interaction is required to complete the request.
-Server
Specifies the Cayosoft Administrator Service FQDN name.
-ApplicationID
Specifies the application ID in Azure AD > App Registrations (Preview) > Cayosoft Administrator API Access.
Example 1: Initiate connection to Cayosoft Administrator Service
Connect-CGraphAdminServiceThis command attempts to initiate a connection to the local Cayosoft Administrator Service, using Active Directory credentials of the currently logged-in user. Run this command from a Windows PowerShell ISE or command prompt.
Example 2: Connect to the local Cayosoft Administrator Service, using Office 365 authentication
$creds = Get-Credential
Connect-CGraphAdminService -AuthType Office365 -Credential $credsExample 3: Connect to local Cayosoft Administrator Service, using Office 365 authentication with user interaction
Connect-CGraphAdminService -AuthType Office365 -UserInteractionRequiredA Sign in to your account dialog appears. Select or enter the name of the account and password:
If your account is set up with MFA, follow the instructions in the dialog:
Example 4: Connect to remote Cayosoft Administrator Service with default port using windows integrated authentication
Connect-CGraphAdminService -Server "<remote host>"Example 5: Connect to remote Cayosoft Administrator Service on a specific port using windows integrated authentication
Connect-CGraphAdminService -Server "<remote host>:13999"Example 6: Connect to the Cayosoft Administrator Service using O365 authentication and application ID
$creds = Get-Credential
Connect-CGraphAdminService -AuthType Office365 -Credential $creds -ApplicationId "<appId>"
Comments
0 comments
Please sign in to leave a comment.