Articles on: Connectors

Example - BASIC Authentication Type

Example: Security type - BASIC



In this example, We will create a custom by using Github - API Docs.

Steps


Create a Connector
Configure Connectivity
Create an Operation



Create a Connector



Navigate to, Left panel --> More --> My Apps
Click Cerate a new connector
In the Modal, fill out the following elements, then click Save

Title - Github
Description -
To get your Access Token, please follow the steps below:<br/><br/>- Login to <a href='https://github.com/' target='_blank' style='color:#0057ff;'>Github</a><br/>- Navigate to profile picture > Settings > Developer Settings > Personal Access Tokens.

Image URL - https://easyflow-assets.s3-us-west-2.amazonaws.com/stencils/APP_GITHUB_128x128.svg
Host URL - api.github.com
Security Type - basic
Active - true





Configure Connectivity



Navigate to, Left panel --> More --> My Apps
Click on Clockify connector
In the Manage modal options, Click Configure Connectivity
Modify the fields and click Save

items [ ] - The BASIC keys name in Github Docs are username, password & Authorisation, the following configuration modified based on it.

{
  "annotation": [
    {
      "key": "note_general",
      "value": "To get your Access Token, please follow the steps below:<br/><br/>- Login to <a href='https://github.com/' target='_blank' style='color:#0057ff;'>Github</a><br/>- Navigate to profile picture > Settings > Developer Settings > Personal Access Tokens."
    }
  ],
  "items": [
    {
      "component": "ascx_connection_component_textbox",
      "id": "txt_connection_username",
      "name": "username",
      "placeholder": "username...",
      "required": "optional",
      "subTitle": null,
      "tabindex": "0",
      "title": "Username",
      "type": "text",
      "validationNote": "validation note here!",
      "isDisabled": "false",
      "defaultValue": null
    },
    {
      "component": "ascx_connection_component_textbox",
      "id": "txt_connection_password",
      "name": "password",
      "placeholder": "Password...",
      "required": "optional",
      "subTitle": null,
      "tabindex": "1",
      "title": "Password",
      "type": "text",
      "validationNote": null,
      "isDisabled": "false",
      "defaultValue": null
    },
    {
      "component": "ascx_connection_component_textbox",
      "id": "txt_connection_authorisationcode",
      "name": "Authorisation",
      "placeholder": "Authorisation Code...",
      "required": "true",
      "subTitle": null,
      "tabindex": "2",
      "title": "Authorisation Code",
      "type": "text",
      "validationNote": null,
      "isDisabled": "false",
      "defaultValue": null
    }
  ],
  "urls": [],
  "parameters": [],
  "headers": [],
  "data": [],
  "settings": []
}





Create an Operation



Navigate to, Left panel --> More --> My Apps
Click the connector to be modified
In the Manage modal options, Click Create an Operation (API Endpoint)
In the Modal, modify the fields and click Save

Title - Create an Issue
Description - Creates a new issue.
Method - POST
Path - /repos/{repository}/issues
Popular - true
Parameters - JSON editor to add the endpoint parameters

[
  {
    "label": "Data",
    "name": "body",
    "in": "body",
    "type": "object",
    "required": true,
    "isHidden": false,
    "default": "{'title': 'YOUR_ISSUE_TITLE'}"
  },
  {
    "description": "",
    "name": "Accept",
    "in": "header",
    "type": "string",
    "required": true,
    "isHidden": true,
    "default": "application/vnd.github.v3+json"
  },
  {
    "label": "Repository",
    "name": "repository",
    "in": "path",
    "type": "string",
    "required": true,
    "isHidden": false,
    "default": "YOUR_REPOSITORY_NAME"
  }
]





Updated on: 15/11/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!