diff --git a/custom-connectors/Tikit/Readme.md b/custom-connectors/Tikit/Readme.md new file mode 100644 index 000000000..ea9cfe91b --- /dev/null +++ b/custom-connectors/Tikit/Readme.md @@ -0,0 +1,149 @@ +# Tikit [Sample] Connector + + + + +Tikit supplies a basic ticket management system. Using this API, you can create tickets and files associated with it. Very often, you may want to use the business with tickets. This is the solution for it. + + + + +# Publisher: Celebal Technologies + + + + +Celebal Technologies is a premier software services company in the field of Data Science, Big Data, and Enterprise Cloud. + + + + +# Prerequisites + + + + +You will need the following prerequisites to go ahead: + + + + +* A Microsoft Power Apps or Power Automate plan with custom connector feature. + +* An API Key to use with custom connector. + +* The Power Platform CLI (Command Line Interface) tools. + + + + +# Supported operations + + + + +The connector supports the following operations: + + + + +* File: This let you add files to the previously added tickets. + + * AddFile: Add file to the specified ticket. + + * GetFile: Get file with a specified file id. + + * GetFiles: Get all the files with the help of apikey previously got. + + * UpdateFile: Update the ticket file with the help of unique fileId. + + + + +* Ticket: This lets you add tickets in the database. + + * GetTickets: Gets all the tickets. + + * AddTicket: Add ticket to the database. + + * UpdateTicket: Update the ticket with the help of unique ticket id. + + * GetTicket: Get ticket with the help of unique id of the ticket. + + + + +# Building the tools: Obtaining the credentials + + + + +Since Tikit is a ticket management system and is secured by API key do first you need an api key to interact with it. You will find more information about this [here](https://tikit/azurewebsites.net) and follow the steps below: + + + + +1. Get your API Key by registering yourself on [official](https://tikit.azurewebsites.net) website as a user. + +2. Add your [API Key](https://tikit.azurewebsites.net/APIKey) after registering as a user. + +3. Setup power automate and power apps for use with the tikit api. + + + + +At this point you will be able to access the connector with the api key previously got by the website. + + + + +# Known Issue and Limitations + + + + +None. + + + + + +# Deployment Instructions + + + + +You may use deploy connector by following of way: + + + + +> #### Microsoft Power Platform Connector CLI. + +>By using [paconn](https://docs.microsoft.com/en-us/connectors/custom-connectors/paconn-cli) cli by using following commands. + +>- Install python and install paconn. + +>- Download connector files from source. + +>- Use paconn to create a connector in environment of your choice. + + + + + + +# Frequently Asked Questions + +- Question: After deploying connector to my respective environment connector trigger is not working? + + - Answer: You need to change the parameters in the custom connector. Under definition section of your custom connector update the trigger configuration and select 'callbackURL' as a parameter. + +- Question: How do I get API Key to use this connector. + + - Answer: You may get the connector API Key by registering yourself with the [portal](https://tikit.azurewebsites.net/). + + + + + \ No newline at end of file diff --git a/custom-connectors/Tikit/apiDefinition.swagger.json b/custom-connectors/Tikit/apiDefinition.swagger.json new file mode 100644 index 000000000..291d78711 --- /dev/null +++ b/custom-connectors/Tikit/apiDefinition.swagger.json @@ -0,0 +1,1359 @@ +{ + + "swagger": "2.0", + + "info": { + + "title": "Tikit", + + "description": "Tikit provides a basic ticket management system. Using this API, you can create tickets and files associated with it. Very often, you may want to use the business with tickets. This is the solution for it.", + + "version": "1.0", + + "contact": { + + "name": "Celebaltech Support", + + "url": "https://www.celebaltech.com/support", + + "email": "support@celebaltech.com" + + } + + }, + + "host": "tikit.azurewebsites.net", + + "basePath": "/", + + "schemes": [ + + "https" + + ], + + "x-ms-connector-metadata": [ + + { + + "propertyName": "Website", + + "propertyValue": "https://www.celebaltech.com" + + }, + + { + + "propertyName": "Privacy Policy", + + "propertyValue": "https://www.celebaltech.com/privacypolicy" + + }, + + { + + "propertyName": "Categories", + + "propertyValue": "AI; Sales and CRM" + + } + + ], + + "consumes": [], + + "produces": [], + + "paths": { + + "/api/Ticket/AddTicket": { + + "post": { + + "consumes": [ + + "application/json" + + ], + + "produces": [ + + "application/json" + + ], + + "responses": { + + "200": { + + "description": "Success", + + "x-ms-summary": "Message", + + "schema": { + + "type": "object", + + "properties": { + + "name": { + + "type": "string", + + "description": "This is the name of the ticket that is being created." + + }, + + "comment": { + + "type": "string", + + "description": "This is the comment that is associated with a ticket." + + }, + + "ticketId": { + + "type": "integer", + + "description": "This is the unique ticket id number." + + }, + + "userAPIKey": { + + "type": "string", + + "description": "This is the unique api key that is associated with the created ticket." + + } + + } + + } + + }, + + "401": { + + "description": "Unauthorized", + + "x-ms-summary": "Message" + + } + + }, + + "summary": "This endpoint add ticket based on current api key", + + "description": "Adding ticket from the values provided by the user", + + "operationId": "AddTicket", + + "parameters": [ + + { + + "name": "body", + + "in": "body", + + "required": false, + + "schema": { + + "type": "object", + + "properties": { + + "name": { + + "type": "string", + + "description": "name" + + }, + + "comment": { + + "type": "string", + + "description": "comment" + + } + + } + + } + + } + + ] + + } + + }, + + "/api/Ticket/GetTickets": { + + "get": { + + "responses": { + + "200": { + + "description": "Success", + + "x-ms-summary": "Message", + + "schema": { + + "type": "object", + + "properties": { + + "name": { + + "type": "string", + + "description": "Name of the ticket." + + }, + + "comment": { + + "type": "string", + + "description": "Comment associated with that ticket." + + }, + + "ticketId":{ + + "type": "integer", + + "description": "This is the unique ticketId number." + + }, + + "userAPIKey":{ + + "type": "string", + + "description": "This is unique api key that is associated with all tickets." + + } + + } + + } + + }, + + "401": { + + "description": "Unauthorized", + + "x-ms-summary": "Message" + + } + + }, + + "summary": "Based on api key this endpoint creates collection of all tickets", + + "description": "This endpoint get all the tickets that is associated with user's api key", + + "operationId": "GetTickets", + + "parameters": [] + + } + + }, + + "/api/Ticket/GetTicket/": { + + "get": { + + "responses": { + + "200": { + + "description": "Success", + + "x-ms-summary": "Message", + + "schema": { + + "type": "object", + + "properties": { + + "name": { + + "type": "string", + + "description": "Name of the ticket." + + }, + + "comment": { + + "type": "string", + + "description": "Comment associated with that ticket." + + }, + + "ticketId":{ + + "type": "integer", + + "description": "This is the unique ticket id number." + + }, + + "userAPIKey":{ + + "type": "string", + + "description": "This is the unique api key that is associated with the created ticket." + + } + + } + + } + + }, + + "404": { + + "description": "Not Found", + + "x-ms-summary": "Message" + + }, + + "401": { + + "description": "Unauthorized", + + "x-ms-summary": "Message" + + } + + }, + + "summary": "Based on API key and ticket id, a single ticket is being returned", + + "description": "This endpoint gets a ticket based on user input", + + "operationId": "GetTicket", + + "parameters": [ + + { + + "name": "ticketId", + + "in": "query", + + "required": true, + + "type": "string", + + "x-ms-summary": "Get Ticket", + + "description": "Get a ticket with use of unique ticket id" + + } + + ] + + } + + }, + + "/api/Ticket/UpdateTicket": { + + "patch": { + + "responses": { + + "200": { + + "description": "Success", + + "x-ms-summary": "Message", + + "schema": { + + "type": "object", + + "properties": { + + "name": { + + "type": "string", + + "description": "Name of the ticket." + + }, + + "comment": { + + "type": "string", + + "description": "Comment associated with that ticket." + + }, + + "ticketId":{ + + "type": "integer", + + "description": "This is the unique ticket id number." + + }, + + "userAPIKey":{ + + "type": "string", + + "description": "This is the unique API key that is associated with the created ticket." + + } + + } + + } + + }, + + "404": { + + "description": "Not Found", + + "x-ms-summary": "Message" + + }, + + "401": { + + "description": "Unauthorized", + + "x-ms-summary": "Message" + + } + + }, + + "summary": "Based on api key and unique ticket id, user is returned with updated ticket", + + "description": "This endpoint update the ticket based on current ticket id", + + "consumes": [ + + "application/json" + + ], + + "produces": [ + + "application/json" + + ], + + "operationId": "UpdateTicket", + + "parameters": [ + + { + + "name": "id", + + "in": "query", + + "required": false, + + "type": "string", + + "x-ms-summary": "Update Ticket", + + "description": "Update ticket with use of unique ticket id." + + }, + + { + + "name": "body", + + "in": "body", + + "required": false, + + "schema": { + + "type": "object", + + "properties": { + + "name": { + + "type": "string", + + "description": "name" + + }, + + "comment": { + + "type": "string", + + "description": "comment" + + } + + } + + } + + } + + ] + + } + + }, + + "/api/File/GetFile": { + + "get": { + + "responses": { + + "200": { + + "description": "Success", + + "x-ms-summary": "Message", + + "schema": { + + "type": "object", + + "properties": { + + "fileId":{ + + "type": "integer", + + "description": "This is the unique file id in database." + + }, + + "base64EncodedStringFile": { + + "type": "string", + + "description": "This is the base 64 encoded string of the file." + + }, + + "filename": { + + "type": "string", + + "description": "This is the filename of file." + + }, + + "apiKeyAssociatedFile":{ + + "type": "string", + + "description": "This is the api key that is unique and is associated with file." + + }, + + "ticketId":{ + + "type": "integer", + + "description": "This is the unique ticket id that is associated with ticket." + + } + + } + + } + + }, + + "404": { + + "description": "Not Found", + + "x-ms-summary": "Message" + + }, + + "401": { + + "description": "Unauthorized", + + "x-ms-summary": "Message" + + } + + }, + + "summary": "Based on API key and unique file id, user is returned with file", + + "description": "This endpoint gets a file based on unique file id", + + "operationId": "GetFile", + + "parameters": [ + + { + + "name": "fileId", + + "in": "query", + + "required": false, + + "type": "string", + + "x-ms-summary": "Get File", + + "description": "Get a file with use of unique file id." + + } + + ] + + } + + }, + + "/api/File/GetFiles": { + + "get": { + + "responses": { + + "200": { + + "description": "Success", + + "x-ms-summary": "Message", + + "schema": { + + "type": "object", + + "properties": { + + "fileId":{ + + "type": "integer", + + "description": "This is the unique file id in database." + + }, + + "base64EncodedStringFile": { + + "type": "string", + + "description": "This is the base 64 encoded string of the file." + + }, + + "filename": { + + "type": "string", + + "description": "This is the filename of file." + + }, + + "apiKeyAssociatedFile":{ + + "type": "string", + + "description": "This is the api key that is unique and is associated with file." + + }, + + "ticketId":{ + + "type": "integer", + + "description": "This is the unique ticket id that is associated with ticket." + + } + + } + + } + + }, + + "404": { + + "description": "Not Found", + + "x-ms-summary": "Message" + + }, + + "401": { + + "description": "Unauthorized", + + "x-ms-summary": "Message" + + } + + }, + + "summary": "Based on unique API key provided on success it will get of files related to API id", + + "description": "This is used to get files based on unique api key", + + "operationId": "GetFiles", + + "parameters": [] + + } + + }, + + "/cc/Triggers/RegisterWebhookTicket": { + + "x-ms-notification-content": { + + "description": "Ticket" + + }, + + "post": { + + "responses": { + + "200": { + + "description": "Success", + + "x-ms-summary": "Message" + + }, + + "401": { + + "description": "Unauthorized", + + "x-ms-summary": "Message" + + } + + }, + + "x-ms-trigger": "single", + + "parameters": [ + + { + + "name": "body", + + "in": "body", + + "required": false, + + "schema": { + + "type": "object", + + "properties": { + + "callbackURL": { + + "type": "string", + + "description": "callbackURL", + + "title": "CallbackURL", + + "x-ms-notification-url": false, + + "x-ms-visibility": "internal" + + }, + + "entityName": { + + "type": "string", + + "description": "entityName", + + "title": "EntityName", + + "x-ms-visibility": "internal", + + "default": "Ticket" + + }, + + "triggerGroup": { + + "type": "string", + + "description": "triggerGroup", + + "title": "TriggerGroup", + + "enum": [ + + "Added", + + "Updated" + + ] + + } + + }, + + "required": [ + + "callbackURL", + + "entityName", + + "triggerGroup" + + ] + + } + + } + + ], + + "summary": "Ticket", + + "description": "This is triggered whenever a new or an update of ticket entity in the ticket management system", + + "operationId": "TicketAddedUpdated", + + "consumes": [ + + "application/json" + + ], + + "produces": [ + + "application/json" + + ] + + } + + }, + + "/cc/Triggers/RegisterWebhookFile": { + + "x-ms-notification-content": { + + "description": "FileResponse" + + }, + + "post": { + + "responses": { + + "200": { + + "description": "Success", + + "x-ms-summary": "Message" + + }, + + "401": { + + "description": "Unauthorized", + + "x-ms-summary": "Message" + + } + + }, + + "summary": "File", + + "description": "This is triggered whenever a new or an update of files entity in the ticket management system", + + "operationId": "FileAddedUpdated", + + "consumes": [ + + "application/json" + + ], + + "produces": [ + + "application/json" + + ], + + "x-ms-trigger": "single", + + "parameters": [ + + { + + "name": "body", + + "in": "body", + + "required": false, + + "schema": { + + "type": "object", + + "properties": { + + "callbackURL": { + + "type": "string", + + "description": "callbackURL", + + "title": "CallbackURL", + + "x-ms-notification-url": false, + + "x-ms-visibility": "internal" + + }, + + "entityName": { + + "type": "string", + + "description": "entityName", + + "title": "EntityName", + + "default": "File" + + }, + + "triggerGroup": { + + "type": "string", + + "description": "triggerGroup", + + "title": "TriggerGroup", + + "enum": [ + + "Added", + + "Updated" + + ] + + } + + }, + + "required": [ + + "callbackURL", + + "entityName", + + "triggerGroup" + + ] + + } + + } + + ] + + } + + }, + + "/api/File/AddFile": { + + "post": { + + "responses": { + + "200": { + + "description": "Success", + + "x-ms-summary": "Message", + + "schema": { + + "type": "object", + + "properties": { + + "fileId":{ + + "type": "integer", + + "description": "This is the unique file id in database." + + }, + + "base64EncodedStringFile": { + + "type": "string", + + "description": "This is the base 64 encoded string of the file." + + }, + + "filename": { + + "type": "string", + + "description": "This is the filename of file." + + }, + + "apiKeyAssociatedFile":{ + + "type": "string", + + "description": "This is the API key that is unique and is associated with file." + + }, + + "ticketId":{ + + "type": "integer", + + "description": "This is the unique ticket id that is associated with ticket." + + } + + } + + } + + }, + + "404": { + + "description": "Not Found", + + "x-ms-summary": "Message" + + }, + + "401": { + + "description": "Unauthorized", + + "x-ms-summary": "Message" + + } + + }, + + "summary": "Based on unique API key and unique ticket id file will be added to a ticket", + + "description": "This endpoint will bind file to a ticket", + + "operationId": "AddFile", + + "consumes": [ + + "application/json" + + ], + + "produces": [ + + "application/json" + + ], + + "parameters": [ + + { + + "name": "ticketId", + + "in": "query", + + "required": false, + + "type": "string", + + "x-ms-summary": "AddFile", + + "description": "Add a file and associate it with a ticket with used of ticket id." + + }, + + { + + "name": "body", + + "in": "body", + + "required": false, + + "schema": { + + "type": "object", + + "properties": { + + "FileName": { + + "type": "string", + + "description": "FileName" + + }, + + "FormFile": { + + "type": "string", + + "description": "FormFile" + + } + + } + + } + + } + + ] + + } + + }, + + "/api/File/UpdateFile": { + + "post": { + + "responses": { + + "200": { + + "description": "Success", + + "x-ms-summary": "Message", + + "schema": { + + "type": "object", + + "properties": { + + "fileId":{ + + "type": "integer", + + "description": "This is the unique file id in database." + + }, + + "base64EncodedStringFile": { + + "type": "string", + + "description": "This is the base 64 encoded string of the file." + + }, + + "filename": { + + "type": "string", + + "description": "This is the filename of file." + + }, + + "apiKeyAssociatedFile":{ + + "type": "string", + + "description": "This is the api key that is unique and is associated with file." + + }, + + "ticketId":{ + + "type": "integer", + + "description": "This is the unique ticket id that is associated with ticket." + + } + + } + + } + + }, + + "404": { + + "description": "Not Found", + + "x-ms-summary": "Message" + + }, + + "401": { + + "description": "Unauthorized", + + "x-ms-summary": "Message" + + } + + }, + + "summary": "Based on unique file id file is replaced with another file", + + "description": "This endpoint will update the existing file with another file with same ticket id", + + "operationId": "UpdateFile", + + "consumes": [ + + "application/json" + + ], + + "produces": [ + + "application/json" + + ], + + "parameters": [ + + { + + "name": "fileId", + + "in": "query", + + "required": false, + + "type": "string", + + "x-ms-summary": "UpdateFile", + + "description": "Update a file with the help of unique file id." + + }, + + { + + "name": "body", + + "in": "body", + + "required": false, + + "schema": { + + "type": "object", + + "properties": { + + "FileName": { + + "type": "string", + + "description": "FileName" + + }, + + "FormFile": { + + "type": "string", + + "description": "FormFile" + + } + + } + + } + + } + + ] + + } + + } + + }, + + "definitions": {}, + + "parameters": {}, + + "responses": {}, + + "securityDefinitions": { + + "API Key": { + + "type": "apiKey", + + "in": "header", + + "name": "ApiKey" + + } + + }, + + "security": [ + + { + + "API Key": [] + + } + + ], + + "tags": [] + +} + + \ No newline at end of file diff --git a/custom-connectors/Tikit/apiProperties.json b/custom-connectors/Tikit/apiProperties.json new file mode 100644 index 000000000..2bf7ea56a --- /dev/null +++ b/custom-connectors/Tikit/apiProperties.json @@ -0,0 +1,23 @@ +{ + "properties": { + "connectionParameters": { + "api_key": { + "type": "securestring", + "uiDefinition": { + "displayName": "ApiKey", + "description": "The ApiKey for this api", + "tooltip": "Provide your ApiKey", + "constraints": { + "tabIndex": 2, + "clearText": false, + "required": "true" + } + } + } + }, + "iconBrandColor": "#9ab5dd", + "capabilities": [], + "publisher": "Celebal Technologies", + "stackOwner": "Celebal Technologies" + } +} \ No newline at end of file