### Example API Request Source: https://docs.gleap.io/documentation/server/api-overview This example demonstrates how to make a GET request to fetch tickets, including the necessary Authorization and Project headers. ```bash curl -X GET https://api.gleap.io/v3/tickets \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Project: YOUR_PROJECT_ID" \ -H "Content-Type: application/json" ``` -------------------------------- ### Install GleapAdmin Package Source: https://docs.gleap.io/documentation/server/nodejs Install the GleapAdmin package using npm. This is the first step before using the SDK. ```bash npm install gleap-admin --save ``` -------------------------------- ### Install Gleap SDK via npm/yarn Source: https://docs.gleap.io/documentation/javascript/README Install the Gleap package using npm or yarn. Then, initialize the SDK in your JavaScript code. ```bash npm install gleap --save ``` ```javascript import Gleap from "gleap"; // Please make sure to call this method only once! Gleap.initialize("API_KEY"); ``` -------------------------------- ### Install Gleap Cordova Plugin Source: https://docs.gleap.io/documentation/cordova/README Install the Gleap package using the Cordova CLI. ```bash cordova plugin add cordova-plugin-gleap ``` -------------------------------- ### Detailed HttpUrlConnection Logging Example Source: https://docs.gleap.io/documentation/android/network-logs A comprehensive example demonstrating how to set up and log a POST request using HttpUrlConnection, including request body creation and response reading. ```java .... @Override protected Object doInBackground(Object[] objects) { HttpURLConnection conn = null; JSONObject result = null; try { URL url = new URL("YOUR_URL"); conn = (HttpURLConnection) url.openConnection(); conn.setRequestProperty("Accept", "application/json"); conn.setRequestProperty("Content-Type", "application/json"); conn.setRequestMethod("POST"); JSONObject requestBody = new JSONObject(); try { requestBody.put("Key", "Value"); requestBody.put("Key2", "Value"); } catch (JSONException e) { e.printStackTrace(); } try (OutputStream os = conn.getOutputStream()) { byte[] input = requestBody.toString().getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } try (BufferedReader br = new BufferedReader( new InputStreamReader(conn.getInputStream(), "utf-8"))) { String input; while ((input = br.readLine()) != null) { result = new JSONObject(input); } } catch (JSONException e) { e.printStackTrace(); } Gleap.getInstance().logNetwork((HttpsURLConnection) conn, requestBody, result); } catch(Exception e) { e.printStackTrace(); } ``` -------------------------------- ### Web Installation Snippet Source: https://docs.gleap.io/documentation/flutter/README Insert this JavaScript snippet into the head tag of your index.html file for web integration. Ensure you run 'flutter clean' and 'flutter pub get' afterwards. ```html ``` -------------------------------- ### Install Gleap SDK for Capacitor v3 Source: https://docs.gleap.io/documentation/ioniccapacitor/README Install the Gleap SDK package for Capacitor v3 using npm. Sync your Capacitor dependencies afterwards. ```bash npm install capacitor-gleap-plugin@8.2.3 ``` ```bash npx cap sync ``` -------------------------------- ### Open the Gleap Widget Source: https://docs.gleap.io/documentation/cordova/widget-control Call this method to display the Gleap widget to the user. No specific setup is required beyond plugin installation. ```javascript cordova.plugins.GleapPlugin.open(); ``` -------------------------------- ### Install Gleap SDK for Capacitor v5 Source: https://docs.gleap.io/documentation/ioniccapacitor/README Install the Gleap package using npm for Capacitor v5. Sync your Capacitor dependencies afterwards. ```bash npm install capacitor-gleap-plugin ``` ```bash npx cap sync ``` -------------------------------- ### Start a Product Tour Programmatically Source: https://docs.gleap.io/documentation/javascript/producttours Initiate a product tour using the Gleap API. This method is useful for starting tours based on specific user interactions or application states. ```javascript Gleap.startProductTour("PRODUCT_TOUR_ID"); ``` -------------------------------- ### Install Gleap SDK for Capacitor v4 Source: https://docs.gleap.io/documentation/ioniccapacitor/README Install the Gleap SDK package for Capacitor v4 using npm. Sync your Capacitor dependencies afterwards. ```bash npm install GleapSDK/Capacitor-SDK#capacitor-v4 --save ``` ```bash npx cap sync ``` -------------------------------- ### Start a Product Tour via URL Parameters Source: https://docs.gleap.io/documentation/javascript/producttours Launch a product tour by including specific parameters in the URL. This is ideal for sending direct links to users to start a particular tour with a defined delay. ```url https://yourapp.com/?gleap_tour={your-product-tour-id}&gleap_tour_delay={delay_in_seconds} ``` -------------------------------- ### Flutter v2 SDK Installation via Git Source: https://docs.gleap.io/documentation/flutter/README For projects using Flutter versions older than v3, specify the SDK installation using a Git URL and a specific branch. ```yaml dependencies: gleap_sdk: git: url: https://github.com/GleapSDK/Flutter-SDK.git ref: flutter-v2 ``` -------------------------------- ### OpenAPI Specification for Get All Tickets Source: https://docs.gleap.io/api-reference/ticket/get-all-tickets This OpenAPI specification defines the GET /tickets endpoint, including request parameters for filtering, sorting, and pagination, and an example response. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /tickets: get: tags: - Ticket summary: Get all tickets description: >- Get all tickets in a project with support for filtering, sorting, and pagination. **Filtering:** - Filter by type: `type=BUG` or `type=BUG,FEATURE_REQUEST` - Filter by status: `status=OPEN` - Filter by priority: `priority=HIGH` or `priority=HIGH,MEDIUM` - Filter by archived state: `archived=false` or `ignoreArchived=true` - Filter by spam: `isSpam=false` **Sorting:** - Sort by creation date: `sort=-createdAt` (newest first) or `sort=createdAt` (oldest first) - Sort by priority: `sort=priority` (ascending: LOW, MEDIUM, HIGH) or `sort=-priority` (descending) - Sort by updated date: `sort=-updatedAt` **Pagination:** - Limit results: `limit=20` (default up to 1000) - Skip results: `skip=0` (for pagination: `skip=(page-1)*limit`) operationId: GetTickets parameters: - in: header name: project required: true schema: type: string responses: '200': description: Ok content: application/json: schema: {} examples: Example 1: value: tickets: - _id: 507f1f77bcf86cd799439011 id: 507f1f77bcf86cd799439011 title: Login button not working formData: description: Users cannot log in when clicking the login button type: BUG status: OPEN priority: HIGH createdAt: '2024-01-15T10:30:00.000Z' updatedAt: '2024-01-15T11:45:00.000Z' processingUser: _id: 507f1f77bcf86cd799439012 email: support@example.com firstName: John lastName: Doe session: _id: 507f1f77bcf86cd799439013 email: user@example.com latestComment: _id: 507f1f77bcf86cd799439014 data: content: Any update on this issue? count: 1 totalCount: 42 security: - jwt: [] components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### Install Gleap SDK via Script Tag Source: https://docs.gleap.io/documentation/javascript/README Add this snippet to the of your HTML to load the Gleap widget asynchronously. Replace 'API_KEY' with your actual API key. ```html ``` -------------------------------- ### Get All Modals Source: https://docs.gleap.io/api-reference/engagement-modal/get-all-modals Fetches all engagement modals for a specified project. This is a GET request to the /engagement/modals endpoint. ```APIDOC ## GET /engagement/modals ### Description Retrieves a list of all engagement modals associated with a specific project. ### Method GET ### Endpoint /engagement/modals ### Parameters #### Header Parameters - **project** (string) - Required - The identifier of the project for which to retrieve modals. ### Response #### Success Response (200) - The response will contain a JSON object representing the list of engagement modals. The exact structure of the modal objects is not detailed here. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Alamofire Example Usage Source: https://docs.gleap.io/documentation/ios/network-logs Shows how to use the custom GleapSessionManager to make network requests, which will then be logged by the Gleap SDK. ```swift GleapSessionManager.sharedManager.request("https://www.sample.org/get").response { response in debugPrint(response) } ``` -------------------------------- ### Get all chat messages Source: https://docs.gleap.io/api-reference/engagement-chat-message/get-all-chat-messages Fetches all chat messages for a given project. This is a GET request to the /engagement/chat-messages endpoint. ```APIDOC ## GET /engagement/chat-messages ### Description Retrieves all chat messages for a specified project. ### Method GET ### Endpoint /engagement/chat-messages ### Parameters #### Header Parameters - **project** (string) - Required - The identifier of the project for which to retrieve chat messages. ### Response #### Success Response (200) - Description: Ok - Content: - application/json: Schema for the response body (empty schema provided in source). ``` -------------------------------- ### Start Custom Form Source: https://docs.gleap.io/documentation/cordova/feedback-flows Initiates a custom form using a specified key. Ensure the custom form is configured in the Gleap dashboard. ```javascript cordova.plugins.GleapPlugin.startClassicForm("CUSTOM_FORM_KEY"); ``` -------------------------------- ### Get a checklist Source: https://docs.gleap.io/api-reference/engagement-checklist/get-a-checklist Fetches a specific engagement checklist using its ID. This is a GET request to the /engagement/checklists/{checklistId} endpoint. ```APIDOC ## GET /engagement/checklists/{checklistId} ### Description Retrieves a specific engagement checklist by its unique identifier. ### Method GET ### Endpoint /engagement/checklists/{checklistId} ### Parameters #### Path Parameters - **checklistId** (string) - Required - The unique identifier of the checklist to retrieve. #### Header Parameters - **project** (string) - Required - The project identifier. ### Response #### Success Response (200) - Description: Ok - Content: - application/json: Schema for the checklist details. ``` -------------------------------- ### AFNetworking Example Usage Source: https://docs.gleap.io/documentation/ios/network-logs Demonstrates how to use the custom GleapAFURLSessionManager to make network requests and have them logged by Gleap. ```objectivec // Use the GleapAFURLSessionManager for all further requests NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; GleapAFURLSessionManager *manager = [[GleapAFURLSessionManager alloc] initWithSessionConfiguration: configuration]; [manager GET: @"https://www.example.org/get" parameters:nil headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { NSLog(@"JSON: %@", responseObject); } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { NSLog(@"Error: %@", error); }]; ``` -------------------------------- ### Get an chat message Source: https://docs.gleap.io/api-reference/engagement-chat-message/get-an-chat-message Retrieves a specific chat message by its ID. This is a GET request to the /engagement/chat-messages/{chatMessageId} endpoint. ```APIDOC ## GET /engagement/chat-messages/{chatMessageId} ### Description Retrieves a specific chat message by its ID. ### Method GET ### Endpoint /engagement/chat-messages/{chatMessageId} ### Parameters #### Path Parameters - **chatMessageId** (string) - Required - The unique identifier of the chat message. #### Header Parameters - **project** (string) - Required - The project identifier. ### Response #### Success Response (200) - Description: Ok #### Response Example (No example provided in source) ``` -------------------------------- ### Open Checklists Overview Source: https://docs.gleap.io/documentation/android/checklists Use this method to display the checklists overview to the user. Ensure the Gleap SDK is initialized. ```javascript Gleap.getInstance().openChecklists(true); ``` -------------------------------- ### Start a New Conversation Source: https://docs.gleap.io/documentation/android/conversations Manually initiate a new conversation. Call this method to programmatically start a new chat session. ```javascript Gleap.getInstance().startConversation(true); ``` -------------------------------- ### Start Network Recording (Swift) Source: https://docs.gleap.io/documentation/ios/network-logs Call this function to begin recording all network requests. Ensure it's called before any network activity you wish to log. ```swift Gleap.startNetworkRecording(); ``` -------------------------------- ### Open Checklists Overview Source: https://docs.gleap.io/documentation/ios/checklists Use this Objective-C method to display the checklists overview to the user. Ensure the Gleap SDK is initialized. ```objective-c [Gleap openChecklists]; ``` -------------------------------- ### Start Network Recording (Objective-C) Source: https://docs.gleap.io/documentation/ios/network-logs Use this Objective-C method to initiate network request recording. It's essential to call this before making network calls. ```objectivec [Gleap startNetworkRecording]; ``` -------------------------------- ### Get session Stripe info Source: https://docs.gleap.io/api-reference/session/get-session-stripe-info Fetches Stripe information for a specific session using its ID. This is a GET request to the /sessions/{sessionId}/stripe endpoint. ```APIDOC ## GET /sessions/{sessionId}/stripe ### Description Get Stripe information for a session. ### Method GET ### Endpoint /sessions/{sessionId}/stripe ### Parameters #### Path Parameters - **sessionId** (string) - Required - The ID of the session to retrieve Stripe information for. #### Header Parameters - **project** (string) - Required - The project identifier. ### Response #### Success Response (200) - **(object)** - Ok ### Security - **jwt** (bearer) - JWT authentication ``` -------------------------------- ### Start Custom Form Source: https://docs.gleap.io/documentation/android/feedback-flows Initiates a custom form using a provided key. The first parameter is the custom form key, and the second controls the visibility of the back button. ```javascript Gleap.getInstance().startClassicForm("CUSTOM_FORM_KEY", true); ``` -------------------------------- ### Initialize Gleap SDK in Objective-C Source: https://docs.gleap.io/documentation/ios/README Call this method in your applicationDidFinishLaunchingWithOptions delegate or init() method (SwiftUI) to initialize the Gleap SDK with your API token. ```objectivec [Gleap initializeWithToken: @"API-TOKEN"]; ``` -------------------------------- ### Start a new conversation Source: https://docs.gleap.io/documentation/android/conversations Manually initiates a new conversation within the Gleap widget. This method allows developers to programmatically start a conversation flow. ```APIDOC ## Start a new conversation ### Description Manually starts a new conversation with the Gleap widget. ### Method Signature `Gleap.getInstance().startConversation(boolean)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters * **`boolean`** (boolean) - Required - Determines if the conversation should be shown immediately. ``` -------------------------------- ### Install React Native Gleap SDK Source: https://docs.gleap.io/documentation/reactnative/README Install the Gleap ReactNative SDK using npm. This is the first step to integrate Gleap into your React Native app. ```javascript npm install react-native-gleapsdk --save ``` -------------------------------- ### Start Custom Form Source: https://docs.gleap.io/documentation/flutter/feedback-flows Initiates a custom form using a specified key. This is useful when the default forms do not meet specific data collection needs. ```javascript Gleap.startClassicForm(formId: "CUSTOM_FORM_KEY"); ``` -------------------------------- ### OpenAPI Specification for Get Users Source: https://docs.gleap.io/api-reference/project/get-all-users-for-a-project This OpenAPI 3.0 specification defines the GET /projects/users endpoint for retrieving all users of a project. It requires a 'project' header for authentication. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /projects/users: get: tags: - Project summary: Get all users for a project description: Get all users for a project. operationId: GetUsers parameters: - in: header name: project required: true schema: type: string responses: '200': description: Ok content: application/json: schema: items: {} type: array security: - jwt: [] components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### OpenAPI Specification for Get All Invitations Source: https://docs.gleap.io/api-reference/invitation/get-all-invitations-for-a-user This OpenAPI specification defines the GET /invitations endpoint for retrieving all invitations for a user. It includes details on the request, responses, and security. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /invitations: get: tags: - Invitation summary: Get all invitations for a user description: Get all invitations for a user. operationId: GetMyInvitations parameters: [] responses: '200': description: Ok content: application/json: schema: items: $ref: '#/components/schemas/InvitationDocument' type: array security: - jwt: [] components: schemas: InvitationDocument: allOf: - $ref: '#/components/schemas/Invitation' - $ref: '#/components/schemas/Document' Invitation: $ref: '#/components/schemas/InferSchemaType_typeofinvitationSchema_' Document: $ref: '#/components/schemas/FlattenMaps_T_' description: >- Generic types for Document: * T - the type of _id * TQueryHelpers - Object with any helpers that should be mixed into the Query type * DocType - the type of the actual Document created InferSchemaType_typeofinvitationSchema_: $ref: >- #/components/schemas/IfAny_typeofinvitationSchema.any.ObtainSchemaGeneric_typeofinvitationSchema.DocType__ FlattenMaps_T_: properties: {} type: object IfAny_typeofinvitationSchema.any.ObtainSchemaGeneric_typeofinvitationSchema.DocType__: allOf: - properties: updatedAt: $ref: '#/components/schemas/NativeDate' createdAt: $ref: '#/components/schemas/NativeDate' required: - updatedAt - createdAt type: object - properties: project: properties: isValid: properties: {} type: object createFromHexString: properties: {} type: object createFromTime: properties: {} type: object generate: properties: {} type: object cacheHexString: {} type: object email: type: string organisation: properties: isValid: properties: {} type: object createFromHexString: properties: {} type: object createFromTime: properties: {} type: object generate: properties: {} type: object cacheHexString: {} type: object role: type: string name: type: string type: type: string enum: - organisation - project required: - role - name - type type: object NativeDate: type: string securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### Initialize GleapAdmin SDK Source: https://docs.gleap.io/documentation/server/nodejs Initialize the GleapAdmin SDK with your secret API token before making any requests. The token can be found in your project settings. ```javascript GleapAdmin.initialize("secret-api-token"); ``` -------------------------------- ### Get a WhatsApp Message OpenAPI Specification Source: https://docs.gleap.io/api-reference/engagement-whatsapp-messages/get-a-whatsapp-message This OpenAPI specification defines the GET endpoint for retrieving a WhatsApp message. It requires the message ID and project ID as parameters. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /engagement/whatsapp-messages/{whatsappMessageId}: get: tags: - Engagement Whatsapp Messages summary: Get a whatsapp message operationId: GetWhatsappMessage parameters: - in: path name: whatsappMessageId required: true schema: type: string - in: header name: project required: true schema: type: string responses: '200': description: Ok content: application/json: schema: {} security: - jwt: [] components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### OpenAPI Specification for Get All Checklists Source: https://docs.gleap.io/api-reference/engagement-checklist/get-all-checklists This OpenAPI 3.0 specification defines the GET /engagement/checklists endpoint for retrieving all engagement checklists. It includes details on parameters, responses, and security. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /engagement/checklists: get: tags: - Engagement Checklist summary: Get all checklists operationId: GetChecklists parameters: - in: header name: project required: true schema: type: string responses: '200': description: Ok content: application/json: schema: {} security: - jwt: [] components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### Allow Gleap Media in CSP Source: https://docs.gleap.io/documentation/javascript/content-security-policy Use the `media-src` directive to specify allowed sources for media files. This example allows media from Gleap's domain. ```javascript media-src 'self' https://*.gleap.io; ``` -------------------------------- ### OpenAPI Specification for Get Banner Source: https://docs.gleap.io/api-reference/engagement-banner/get-an-banner This OpenAPI 3.0 specification defines the GET endpoint for retrieving an engagement banner. It requires the banner ID and project ID as parameters. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /engagement/banners/{bannerId}: get: tags: - Engagement Banner summary: Get an banner operationId: GetBanner parameters: - in: path name: bannerId required: true schema: type: string - in: header name: project required: true schema: type: string responses: '200': description: Ok content: application/json: schema: {} security: - jwt: [] components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### Initialize Gleap SDK Source: https://docs.gleap.io/documentation/reactnative/README Initialize the Gleap SDK with your API token. Ensure this code is executed only once in your application. ```javascript Gleap.initialize("Your_TOKEN"); ``` -------------------------------- ### Create a new product tour Source: https://docs.gleap.io/api-reference/engagement-product-tour/create-a-new-product-tour Creates a new product tour for a given project. Requires authentication with a JWT token. ```APIDOC ## POST /engagement/product-tours ### Description Creates a new product tour for a given project. ### Method POST ### Endpoint /engagement/product-tours ### Parameters #### Header Parameters - **project** (string) - Required - The project ID for which to create the product tour. #### Request Body - **(object)** - Required - The schema for the request body is not specified in the documentation. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **(object)** - Description of the response body is not specified in the documentation. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Initialize Gleap SDK Source: https://docs.gleap.io/documentation/android/README Initialize the Gleap SDK in your main activity's onCreate method using your API key. ```java @Override protected void onCreate(Bundle savedInstanceState) { .... Gleap.initialize("YOUR_API_KEY", this); } ``` -------------------------------- ### Get Ticket Count OpenAPI Specification Source: https://docs.gleap.io/api-reference/ticket/get-ticket-count This OpenAPI specification defines the GET /tickets/ticketscount endpoint. It requires a 'project' header and returns a 200 OK response with a JSON schema. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /tickets/ticketscount: get: tags: - Ticket summary: Get ticket count operationId: GetTicketCount parameters: - in: header name: project required: true schema: type: string responses: '200': description: Ok content: application/json: schema: {} security: - jwt: [] components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### Initialize Gleap SDK in Swift Source: https://docs.gleap.io/documentation/ios/README Call this method in your app delegate or main App class (SwiftUI) to initialize the Gleap SDK with your API token. ```swift Gleap.initialize(withToken: "API-TOKEN") ``` -------------------------------- ### OpenAPI Specification for Get Sessions Source: https://docs.gleap.io/api-reference/session/get-all-sessions This OpenAPI 3.0 specification defines the GET /sessions endpoint for retrieving all sessions associated with a project. It includes details on parameters, responses, and security. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /sessions: get: tags: - Session summary: Get all sessions description: Get all sessions associated with a project. operationId: GetSessions parameters: - in: header name: project required: true schema: type: string responses: '200': description: Ok content: application/json: schema: items: {} type: array security: - jwt: [] components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### Initialize Gleap SDK for Capacitor v5 Source: https://docs.gleap.io/documentation/ioniccapacitor/README Initialize the Gleap SDK in your main component or index file. Ensure this method is called only once. ```typescript import { Gleap } from 'capacitor-gleap-plugin'; // Please make sure to call this method only once! Gleap.initialize("ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV"); ``` -------------------------------- ### OpenAPI Specification for Get Tooltip Source: https://docs.gleap.io/api-reference/engagement-tooltip/get-a-tooltip This OpenAPI 3.0 specification defines the GET /engagement/tooltips/{tooltipId} endpoint for retrieving a tooltip. It includes parameters, expected responses, and security schemes. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /engagement/tooltips/{tooltipId}: get: tags: - Engagement Tooltip summary: Get a tooltip operationId: GetTooltip parameters: - in: path name: tooltipId required: true schema: type: string - in: header name: project required: true schema: type: string responses: '200': description: Ok content: application/json: schema: {} security: - jwt: [] components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### Initialize Gleap SDK Source: https://docs.gleap.io/documentation/flutter/README Call this method to initialize the Gleap SDK with your API key. Ensure `WidgetsFlutterBinding.ensureInitialized()` is called first if initializing in `main.dart`. ```dart Gleap.initialize(token: 'YOUR_API_KEY'); ``` -------------------------------- ### OpenAPI Specification for Get All Surveys Source: https://docs.gleap.io/api-reference/engagement-survey/get-all-survey This OpenAPI 3.0 specification defines the GET /engagement/surveys endpoint for retrieving all engagement surveys. It includes details on parameters, responses, and security schemes. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /engagement/surveys: get: tags: - Engagement Survey summary: Get all survey operationId: GetSurveys parameters: - in: header name: project required: true schema: type: string responses: '200': description: Ok content: application/json: schema: {} security: - jwt: [] components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### Open Help Center Article Source: https://docs.gleap.io/documentation/ioniccapacitor/helpcenter Opens a specific help center article directly within the Gleap widget. Requires an article ID and allows control over navigation button visibility. ```APIDOC ## Open a help center article by code If you'd like to open a help center article directly withing the Gleap widget, you can do so by calling the following method: ```javascript Gleap.openHelpCenterArticle({ articleId: "articleId", showBackButton: false, }); ``` *The first parameter **articleId** can be found at the bottom of your article editor in the **Share this article** banner.* *The second parameter **showBackButton** sets whether or not the main tabbar and back buttons will be shown.* ``` -------------------------------- ### OpenAPI Specification for Get Survey Source: https://docs.gleap.io/api-reference/engagement-survey/get-a-survey This OpenAPI specification defines the GET /engagement/surveys/{surveyId} endpoint for retrieving survey details. It requires the survey ID and project ID as parameters. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /engagement/surveys/{surveyId}: get: tags: - Engagement Survey summary: Get a survey operationId: GetSurvey parameters: - in: path name: surveyId required: true schema: type: string - in: header name: project required: true schema: type: string responses: '200': description: Ok content: application/json: schema: {} security: - jwt: [] components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### OpenAPI Specification for Get All Emails Source: https://docs.gleap.io/api-reference/engagement-email/get-all-emails This OpenAPI specification defines the GET /engagement/emails endpoint, which allows you to retrieve all engagement emails for a given project. It requires a 'project' header for authentication. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /engagement/emails: get: tags: - Engagement Email summary: Get all emails operationId: GetEngagementEmails parameters: - in: header name: project required: true schema: type: string responses: '200': description: Ok content: application/json: schema: {} security: - jwt: [] components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### Import Gleap SDK Source: https://docs.gleap.io/documentation/reactnative/README Import the Gleap SDK into your application's entry point (index.js). This makes the Gleap functionalities available. ```javascript import Gleap from 'react-native-gleapsdk'; ``` -------------------------------- ### OpenAPI Specification for Get Entry Source: https://docs.gleap.io/api-reference/translations/get-a-single-translatable-entry This OpenAPI specification defines the GET request for retrieving a single translatable entry. It includes parameters for project, entry ID, and an optional language code. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /translations/entries/{entryId}: get: tags: - Translations summary: Get a single translatable entry operationId: GetEntry parameters: - in: header name: project required: true schema: type: string - in: path name: entryId required: true schema: type: string - in: query name: language required: false schema: type: string responses: '200': description: Ok content: application/json: schema: {} security: - jwt: [] components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### OpenAPI Specification for Get Statistics Heatmap Source: https://docs.gleap.io/api-reference/statistics/get-statisticsheatmap This OpenAPI specification defines the GET /statistics/heatmap endpoint. Use this to understand the request parameters, including chart types, date filtering, and pagination. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /statistics/heatmap: get: tags: - Statistics description: Get heatmap data for activity patterns operationId: GetHeatmapData parameters: - description: >- - Type of heatmap data (BUSIEST_HOURS_PER_WEEKDAY, BUSIEST_COMMENTS_PER_WEEKDAY) in: query name: chartType required: true schema: $ref: '#/components/schemas/HeatmapTypes' - description: '- Timezone for date calculations' in: query name: timezone required: false schema: type: string - in: query name: groupInterval required: false schema: type: string enum: - day - month - year - in: query name: skip required: false schema: type: number format: double - in: query name: limit required: false schema: type: number format: double - in: query name: groupedBy required: false schema: type: string - in: query name: aggsType required: false schema: type: string - description: '- Start date for filtering (ISO format)' in: query name: startDate required: false schema: type: string - description: '- End date for filtering (ISO format)' in: query name: endDate required: false schema: type: string - in: query name: createdAt required: false schema: type: string - in: query name: updatedAt required: false schema: type: string responses: '200': description: Ok content: application/json: schema: {} security: - jwt: [] components: schemas: HeatmapTypes: enum: - BUSIEST_HOURS_PER_WEEKDAY - BUSIEST_COMMENTS_PER_WEEKDAY type: string securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### Open Checklists Overview Source: https://docs.gleap.io/documentation/javascript/checklists Opens the main overview of all available checklists within the Gleap widget. This provides users with a central place to view and access their onboarding checklists. ```APIDOC ## Open Checklists Overview ### Description Opens the main overview of all available checklists within the Gleap widget. This provides users with a central place to view and access their onboarding checklists. ### Method ```javascript Gleap.openChecklists(); ``` ``` -------------------------------- ### Open the help center Source: https://docs.gleap.io/documentation/android/helpcenter Manually opens the news section of the Gleap widget. ```APIDOC ## Open the help center by code ### Description Manually opens the news section of the Gleap widget. ### Method Signature `Gleap.getInstance().openHelpCenter(showBackButton: boolean)` ### Parameters * **showBackButton** (boolean) - Sets whether or not the main tabbar and back buttons will be shown. ``` -------------------------------- ### OpenAPI Specification for Get Statistics Raw Data Source: https://docs.gleap.io/api-reference/statistics/get-statisticsraw-data This OpenAPI specification defines the GET /statistics/raw-data endpoint, including parameters for filtering and grouping data. Use this to understand the API contract. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /statistics/raw-data: get: tags: - Statistics description: Get raw statistics data operationId: GetRawStatistics parameters: - description: '- Timezone for date calculations' in: query name: timezone required: false schema: type: string - in: query name: groupInterval required: false schema: type: string enum: - day - month - year - in: query name: skip required: false schema: type: number format: double - in: query name: limit required: false schema: type: number format: double - in: query name: groupedBy required: false schema: type: string - in: query name: aggsType required: false schema: type: string - description: '- Start date for filtering (ISO format)' in: query name: startDate required: false schema: type: string - description: '- End date for filtering (ISO format)' in: query name: endDate required: false schema: type: string - in: query name: createdAt required: false schema: type: string - in: query name: updatedAt required: false schema: type: string - description: '- Type of raw data to retrieve' in: query name: type required: false schema: type: string responses: '200': description: Ok content: application/json: schema: {} security: - jwt: [] components: securitySchemes: jwt: type: http scheme: bearer bearerFormat: JWT ``` -------------------------------- ### OpenAPI Specification for Get Help Center Sources Source: https://docs.gleap.io/api-reference/help-center/get-help-center-sources This OpenAPI 3.0 specification defines the GET /shared/helpcenter/sources endpoint. It outlines the request parameters, response structure, and potential status codes. ```yaml openapi: 3.0.0 info: title: gleap-server version: 14.0.0 contact: {} servers: - url: https://api.gleap.io/v3 security: [] paths: /shared/helpcenter/sources: get: tags: - Help center summary: Get help center sources operationId: GetHelpcenterSources parameters: [] responses: '200': description: Ok content: application/json: schema: properties: sources: items: properties: sourceType: {} type: type: string extract: {} url: {} title: {} id: {} required: - sourceType - type - extract - url - title - id type: object type: array required: - sources type: object security: [] ``` -------------------------------- ### Initialize Gleap SDK in Cordova Source: https://docs.gleap.io/documentation/cordova/README Initialize the Gleap SDK once the Cordova device is ready. Replace 'YOUR_API_KEY' with your actual API key. ```javascript function onDeviceReady() { // Cordova is now initialized. // Initialize the Gleap SDK & have fun! cordova.plugins.GleapPlugin.initialize("YOUR_API_KEY"); } ```