Site24x7 Provider
The Site24x7 Provider allows you to install webhooks and receive alerts in Site24x7. It manages authentication, setup of webhooks, and retrieval of alert logs from Site24x7.
Inputs
The Site24x7Provider
class handles authentication and interacts with the Site24x7 API to install webhooks and fetch alerts. Here are the primary methods and their parameters:
Main Class Methods
-
setup_webhook(tenant_id, keep_api_url, api_key, setup_alerts)
tenant_id (str)
: Tenant identifier.keep_api_url (str)
: URL to send alert data.api_key (str)
: API key for authentication.setup_alerts (bool)
: Whether to setup alerting capabilities (default is True).
-
_get_alerts()
- Returns a list of
AlertDto
objects representing the alerts.
- Returns a list of
Authentication Parameters
The Site24x7ProviderAuthConfig
class is used for API authentication and includes:
zohoRefreshToken (str)
: Refresh token for Zoho authentication. RequiredzohoClientId (str)
: Client ID for Zoho authentication. RequiredzohoClientSecret (str)
: Client Secret for Zoho authentication. RequiredzohoAccountTLD (str)
: Top-Level Domain for the Zoho account. Options include.com
,.eu
,.com.cn
,.in
,.com.au
,.jp
. Required
Connecting with the Provider
To use the Site24x7 Provider, initialize it with the necessary authentication credentials and provider configuration. Ensure that your Zoho account credentials (Client ID, Client Secret, and Refresh Token) are correctly set up in the Site24x7ProviderAuthConfig
.
Steps to Obtain a Refresh Token
-
Registration and Client Credentials:
- Navigate to Zoho API Console.
- Sign in or sign up using the email associated with your Site24x7 account.
- Register your application using the “Self Client” option to get your Client ID and Client Secret.
-
Generating Grant Token:
- Go to the Zoho Developer Console and access your registered Self Client.
- In the “Generate Code” tab, input the required scopes (
Site24x7.Admin.Read, Site24x7.Admin.Create, Site24x7.Operations.Read
), description, and time duration. - Click “Generate” and copy the provided code.
-
Generating Access and Refresh Tokens:
- Use the grant token to make a POST request to
https://accounts.zoho.com/oauth/v2/token
to obtain the access and refresh tokens.
OR
- Use the grant token to make a POST request to
Notes
- Ensure that the necessary scopes Site24x7.Admin.Read, Site24x7.Admin.Create, Site24x7.Operations.Read are included when generating the grant token, as they dictate the API functionalities accessible via the provider.
- Zoho API Console Link
Webhook Integration Modifications
The webhook integration grants Keep access to the following scopes within Site24x7:
authenticated
valid_tld
The webhook can be accessed via the “Alarms” section in the Site24x7 console.