PowerPlatformConnectors/certified-connectors/Lang-ai/apiDefinition.swagger.json

427 строки
14 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "Lang.ai",
"description": "Lang.ai is a SaaS platform that automate time-consuming manual tasks like tagging, prioritization and routing.AI that literally takes minutes to implement as you build your tags combining concepts visually instead of spending months using a traditional AI approach.",
"version": "1.0",
"contact": {
"name": "Lang.ai",
"url": "https://lang.ai",
"email": "support@lang.ai"
}
},
"host": "us.app.lang.ai",
"basePath": "/",
"schemes": [
"https"
],
"consumes": [],
"produces": [],
"paths": {
"/api/v1/analyze": {
"post": {
"consumes": [
"application/json"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The ID of the tag.",
"title": "Tag Id"
},
"name": {
"type": "string",
"description": "The name of the tag.",
"title": "Tag Name"
}
}
},
"description": "An array of tags."
},
"intents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the intent.",
"title": "Intent Name"
},
"features": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of features. The sign “>” indicates a second-level feature."
}
}
},
"description": "An array of intents."
}
}
}
},
"default": {
"description": "default",
"schema": {}
}
},
"operationId": "Analyze",
"summary": "Analyze document",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"required": true,
"type": "string",
"default": "application/json",
"x-ms-visibility": "internal",
"x-ms-summary": "Content-Type",
"description": "Content-Type header value has to be set to application/json."
},
{
"name": "body",
"in": "body",
"required": false,
"schema": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "The text to be classified.",
"title": "Text to analyze"
},
"projectId": {
"type": "string",
"description": "The project to be used to classify the text.",
"title": "Project ID"
}
},
"required": [
"projectId",
"text"
]
}
}
],
"description": "Returns the classification for a given document and the specified project."
}
},
"/api/v1/documents": {
"post": {
"consumes": [
"application/json"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The ID of the tag.",
"title": "Tag Id"
},
"name": {
"type": "string",
"description": "The name of the tag.",
"title": "Tag Name"
}
}
},
"description": "An array of tags."
},
"intents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the intent.",
"title": "Intent Name"
},
"features": {
"type": "array",
"items": {
"type": "string"
},
"description": "The list of features. The sign “>” indicates a second-level feature."
}
}
},
"description": "An array of intents."
}
}
}
},
"default": {
"description": "default",
"schema": {}
}
},
"summary": "Save Documents",
"operationId": "Documents",
"description": "Saves a given document into the specified project. It supports passing metadata that can be later used in the project's Dashboard. New metadata values passed via API will be available to use in the project's setup section.",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"required": true,
"type": "string",
"default": "application/json",
"x-ms-visibility": "internal",
"description": "Content-Type header value has to be set to application/json.",
"x-ms-summary": "Content-Type"
},
{
"name": "body",
"in": "body",
"required": false,
"schema": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "The text to be classified.",
"title": "Text to save"
},
"projectId": {
"type": "string",
"description": "The project to be used to classify the text.",
"title": "Project ID"
},
"id": {
"type": "string",
"description": "Document ID to save in Lang.ai with the text.",
"title": "Document ID"
},
"date": {
"type": "string",
"description": "The date of the document. It supports valid IS0 8601 dates. If not passed, the request time is used.",
"title": "Date",
"format": "date-time"
},
"metadata": {
"type": "object",
"description": "The metadata information of the document. Object parameter. \"Key\":\"Value\" format",
"title": "Metadata",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"projectId",
"text"
]
}
}
]
}
},
"/api/v1/projects": {
"get": {
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "The project status: Errored, Processing, Completed.",
"title": "Status"
},
"id": {
"type": "string",
"description": "The ID of the project.",
"title": "Project ID"
},
"name": {
"type": "string",
"description": "The name of the project.",
"title": "Project Name"
},
"createdAt": {
"type": "string",
"description": "The creation date of the project.",
"title": "Project created at",
"format": "date-time"
}
}
}
}
},
"default": {
"description": "default",
"schema": {}
}
},
"summary": "List Projects",
"operationId": "Projects",
"description": "Returns the list of projects.",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"required": true,
"type": "string",
"default": "application/json",
"x-ms-visibility": "internal"
}
]
}
},
"/api/v1/projects/{projectId}": {
"get": {
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "The project status: Errored, Processing, Completed.",
"title": "Status"
},
"id": {
"type": "string",
"description": "The ID of the project.",
"title": "Project ID"
},
"name": {
"type": "string",
"description": "The name of the project.",
"title": "Project Name"
},
"createdAt": {
"type": "string",
"description": "The creation date of the project.",
"title": "Project Created At",
"format": "date-time"
},
"tags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The ID of the tag.",
"title": "Tag ID"
},
"name": {
"type": "string",
"description": "The name of the tag.",
"title": "Tag Name"
},
"createdAt": {
"type": "string",
"description": "The creation date of the tag.",
"title": "Tag Created At",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"description": "The last update date of the tag.",
"title": "Tag Updated At",
"format": "date-time"
},
"isDraft": {
"type": "boolean",
"description": "Whether or not the tag is draft.",
"title": "isDraft"
}
}
},
"description": "An array of tags."
}
}
}
},
"default": {
"description": "default",
"schema": {}
}
},
"summary": "List project tags",
"description": "Returns the list of the project's tags.",
"operationId": "Tags",
"parameters": [
{
"name": "projectId",
"in": "path",
"required": true,
"type": "string",
"description": "The project to be used to retrieve the tags.",
"x-ms-summary": "ProjectID",
"x-ms-url-encoding": "single"
},
{
"name": "Content-Type",
"in": "header",
"required": true,
"type": "string",
"default": "application/json",
"x-ms-visibility": "internal",
"description": "Content-Type header value has to be set to application/json.",
"x-ms-summary": "Content-Type"
}
]
}
},
"/api/v1/project": {}
},
"definitions": {},
"parameters": {},
"responses": {},
"securityDefinitions": {
"API Key": {
"type": "apiKey",
"in": "header",
"name": "Authorization"
}
},
"security": [
{
"API Key": []
}
],
"tags": [],
"x-ms-connector-metadata": [
{
"propertyName": "Website",
"propertyValue": "https://lang.ai"
},
{
"propertyName": "Privacy policy",
"propertyValue": "https://lang.ai/legal/privacy"
},
{
"propertyName": "Categories",
"propertyValue": "AI;Productivity"
}
]
}