### Examples API Source: https://learn.plantanapp.com/docs/current/actions Provides examples of how to use the learn_plantanapp API. ```APIDOC ## Examples API ### Description This API endpoint provides code examples for using the learn_plantanapp API, demonstrating specific actions and their expected request/response formats. ### Method GET ### Endpoint /websites/learn_plantanapp/examples ### Parameters #### Query Parameters - **example_name** (string) - Optional - The name of the specific example to retrieve. ### Response #### Success Response (200) - **examples** (array) - A list of examples. - **name** (string) - The name of the example. - **description** (string) - A description of the example. - **code** (string) - The code snippet for the example. #### Response Example ```json { "examples": [ { "name": "1. Example Name", "description": "Example Description", "code": "{\n \"Action\": \"Export\"\n}" } ] } ``` ``` -------------------------------- ### Run a Basic SQL Query in Plant an App Source: https://learn.plantanapp.com/docs/sql-console This snippet demonstrates a basic SQL query to retrieve user information from the 'Users' table. It's a starting point for testing SQL statements within the Plant an App SQL Console. ```sql SELECT UserID, UserName, FirstName, LastName, Email, DisplayName FROM Users ``` -------------------------------- ### Export Action Example (JSON) Source: https://learn.plantanapp.com/docs/actions This snippet demonstrates a basic JSON structure for the 'Export' action within the Plantanapp project. It's a simple key-value pair. ```json { "Action": "Export" } ``` -------------------------------- ### Actions API Source: https://learn.plantanapp.com/docs/actions This section details the Actions API, including its typical use cases, related actions, input and output parameters, and examples. ```APIDOC ## Actions API ### Description This API allows for various actions within the PlantanApp project. It includes sections for typical use cases, related actions, input and output parameter references, and detailed examples. ### Method GET (Implied, as no specific method is mentioned for the overall API, but examples suggest data retrieval and configuration.) ### Endpoint /websites/learn_plantanapp/actions ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None (for general API description, specific actions might have bodies) ### Request Example ```json { "Action": "Export" } ``` ### Response #### Success Response (200) - **Output Params** (object) - Description of output parameters. #### Response Example ```json { "Output Params": "Description of output parameters" } ``` ## Input Parameter Reference Parameter | Description | Supports Tokens | Default | Required ---|---|---|---|--- Input Param | Description | Yes | `empty string` | No ## Output Parameters Reference Parameter | Description ---|--- Output Params | Description ## Different Sections **Add note if need it** Different Sections Examples, Descriptions ## Examples ### 1. Example Name Example Description ```json { "Action": "Export" } ``` ``` -------------------------------- ### Action Configuration API Source: https://learn.plantanapp.com/docs/current/code Defines the structure for configuring platform actions, including input parameters, output definitions, and usage examples. ```APIDOC ## [POST] /actions/execute ### Description Executes a specific action within the Plant an App environment based on the provided configuration parameters. ### Method POST ### Endpoint /actions/execute ### Parameters #### Input Parameter Reference - **Input Param** (string) - Optional - Description of the input parameter. Supports tokens: Yes. Default: empty string. #### Output Parameters Reference - **Output Params** (object) - Description of the returned data structure. ### Request Example { "Action": "Export" } ### Response #### Success Response (200) - **status** (string) - Indicates the success status of the action execution. - **data** (object) - The resulting output parameters from the action. #### Response Example { "status": "success", "data": { "result": "Export completed" } } ``` -------------------------------- ### Execute Basic SQL Query Source: https://learn.plantanapp.com/docs/current/sql-console A sample SQL query used to retrieve user profile information from the application database. This query demonstrates the syntax for selecting specific columns from the Users table. ```SQL SELECT UserID, UserName, FirstName, LastName, Email, DisplayName FROM Users ``` -------------------------------- ### GET /api/oidc/user/claims Source: https://learn.plantanapp.com/docs/current/open-id-connector Retrieves the claims associated with the current authenticated user session, including mapped profile properties. ```APIDOC ## GET /api/oidc/user/claims ### Description Fetches the raw claims JSON and mapped tokens for the currently authenticated user session. ### Method GET ### Endpoint /api/oidc/user/claims ### Response #### Success Response (200) - **Claims** (object) - The raw JSON object containing all OIDC/OAuth user claims. - **UserToken** (string) - The authentication cookie/context token. #### Response Example { "Claims": { "sub": "1234567890", "name": "John Doe", "email": "john@example.com" }, "UserToken": "eyJhbGciOiJIUzI1Ni..." } ``` -------------------------------- ### Input Parameter Reference Source: https://learn.plantanapp.com/docs/current/actions Reference for input parameters used in the learn_plantanapp API. ```APIDOC ## Input Parameter Reference ### Description This section provides a detailed reference for all input parameters supported by the learn_plantanapp API. It includes information on parameter names, descriptions, token support, default values, and whether they are required. ### Method GET ### Endpoint /websites/learn_plantanapp/parameters/input ### Response #### Success Response (200) - **input_parameters** (array) - A list of input parameters. - **name** (string) - The name of the input parameter. - **description** (string) - A description of the parameter. - **supports_tokens** (boolean) - Indicates if the parameter supports tokens. - **default_value** (string) - The default value of the parameter. - **required** (boolean) - Indicates if the parameter is required. #### Response Example ```json { "input_parameters": [ { "name": "Input Param", "description": "Description", "supports_tokens": true, "default_value": "", "required": false } ] } ``` ``` -------------------------------- ### Configure Standard OpenID Connect Provider (Azure AD) Source: https://learn.plantanapp.com/docs/current/open-id-connector Configures a standard OpenID Connect provider, specifically Microsoft Azure AD, for authentication. It includes settings for enabling the provider, issuer URL, client credentials, scopes, and claim mappings. It also defines an 'OnAuthorizedActions' to send a welcome email upon successful authorization. ```json { "Portal": 0, "IsEnabled": true, "Providers": [ { "IsEnabled": true, "ProviderName": "Azure AD", "ProviderType": "OpenIdConnect", "Issuer": "https://login.microsoftonline.com/{tenantid}/v2.0", "ClientId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "ClientSecret": "SECRET123", "Scopes": "User.Read", "OAuth2ClaimMapping_Sub": "oid", "OAuth2ClaimMapping_Email": "email", "OAuth2ClaimMapping_GivenName": "given_name", "OAuth2ClaimMapping_FamilyName": "family_name", "OnAuthorizedActions": [ { "ActionType": "SendEmail", "Parameters": { "To": "[Claims:email]", "Subject": "Welcome!", "Body": "User [Claims:given_name] just logged in." } } ] } ] } ``` -------------------------------- ### Output Parameter Reference Source: https://learn.plantanapp.com/docs/current/actions Reference for output parameters used in the learn_plantanapp API. ```APIDOC ## Output Parameter Reference ### Description This section provides a detailed reference for all output parameters returned by the learn_plantanapp API. It includes information on parameter names and their descriptions. ### Method GET ### Endpoint /websites/learn_plantanapp/parameters/output ### Response #### Success Response (200) - **output_parameters** (array) - A list of output parameters. - **name** (string) - The name of the output parameter. - **description** (string) - A description of the parameter. #### Response Example ```json { "output_parameters": [ { "name": "Output Params", "description": "Description" } ] } ``` ``` -------------------------------- ### POST /api/oidc/provider/configure Source: https://learn.plantanapp.com/docs/current/open-id-connector Configures an OIDC or OAuth2 identity provider for the DNN portal, including client credentials, issuer URIs, and claim mapping settings. ```APIDOC ## POST /api/oidc/provider/configure ### Description Configures a specific OIDC/OAuth2 identity provider. This endpoint sets up the connection parameters required for the authentication handshake. ### Method POST ### Endpoint /api/oidc/provider/configure ### Parameters #### Request Body - **ProviderName** (string) - Required - The friendly display name for the provider. - **ProviderType** (string) - Required - Protocol implementation (e.g., "OpenIdConnect"). - **Issuer** (string) - Required - Provider's Issuer URI. - **ClientId** (string) - Required - OAuth client credential. - **ClientSecret** (string) - Required - OAuth secret. - **Scopes** (string) - Optional - Space-delimited list of extra scopes. - **AutoMatchExistingUsers** (boolean) - Optional - Whether to match users by email if they already exist in DNN. ### Request Example { "ProviderName": "AzureAD", "ProviderType": "OpenIdConnect", "Issuer": "https://sts.windows.net/tenant-id/", "ClientId": "client-id-value", "ClientSecret": "client-secret-value", "AutoMatchExistingUsers": true } ### Response #### Success Response (200) - **status** (string) - Success message indicating provider configuration updated. #### Response Example { "status": "success", "message": "Provider AzureAD configured successfully." } ``` -------------------------------- ### Export Action Configuration Source: https://learn.plantanapp.com/docs/code A basic JSON configuration object used to trigger the Export action. This snippet demonstrates the required structure for the action payload. ```json { "Action": "Export" } ```