PowerPlatformConnectors/certified-connectors/CobbleStone - Contract Insight/apiDefinition.swagger.json

966 строки
26 KiB
JSON

{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "CobbleStone Contract Insight",
"description": "The Cobblestone - Contract Insight connector allows you to connect our contract management software with many popular web and data services. The basic out of the box (OOB) endpoints will allow you to review Schema table names and whether they can be searched, edited, and updated. You can pull Entity information on table names, and Query, add, and update Customer record data.",
"contact": {
"name": "Matthew Friebis",
"url": "https://www.cobblestonesoftware.com",
"email": "mefriebis@cobblestonesystems.com"
}
},
"x-ms-connector-metadata": [
{
"propertyName": "Website",
"propertyValue": "https://www.cobblestonesoftware.com"
},
{
"propertyName": "Privacy Policy",
"propertyValue": "https://www.cobblestonesoftware.com/company/privacy-policy"
},
{
"propertyName": "Categories",
"propertyValue": "Business Management;Sales and CRM"
}
],
"host": "csconfig.cobblestonesystems.com",
"basePath": "/",
"schemes": [
"http",
"https"
],
"paths": {
"/CSSAPI/v2/{entityName}/Add": {
"post": {
"tags": [
"Core Actions"
],
"summary": "Create a new a record for a specified entity",
"description": "Add a record (limited to one record per call) to specified entity. The response will be the system generated ID.",
"operationId": "CSSAPIAddEntity",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "entityName",
"in": "path",
"description": "Table name name to add record to.",
"required": true,
"type": "string",
"x-ms-summary": "Entity Name",
"x-ms-url-encoding": "single",
"x-ms-dynamic-values": {
"operationId": "CSSAPIEntityListInsert",
"value-path": "EntityNameForAPI",
"value-title": "EntityNameDisplay"
}
},
{
"name": "add",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/APIAddRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
}
}
}
},
"/CSSAPI/v2/{entityName}/Get": {
"post": {
"tags": [
"Core Actions"
],
"summary": "Pull list of record(s) for a given entity",
"description": "Pull list of records for a given entity with specific criteria, order by tag, group by tag and number of records. Note: There is no limit on number of records to be pulled but the user has to consider that larger results will be slower to process.",
"operationId": "CSSAPIQueryEntity",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "entityName",
"in": "path",
"description": "Table name to query data from.",
"required": true,
"type": "string",
"x-ms-summary": "Entity Name",
"x-ms-url-encoding": "single",
"x-ms-dynamic-values": {
"operationId": "CSSAPIEntityListSelect",
"value-path": "EntityNameForAPI",
"value-title": "EntityNameDisplay"
}
},
{
"name": "query",
"in": "body",
"description": "Query Model",
"required": true,
"schema": {
"$ref": "#/definitions/APIQueryRequest"
}
}
],
"responses": {
"200": {
"description": "Array of Objects",
"schema": {
"$ref": "#/definitions/APIQueryResponse"
}
},
"400": {
"description": "Customized CCS REST API response.",
"schema": {
"$ref": "#/definitions/APIBadResponseExample"
}
}
}
}
},
"/CSSAPI/v2/{entityName}/Schema": {
"post": {
"tags": [
"Discovery"
],
"summary": "Pull metadata about all columns in specific entity",
"description": "Lists columns, data types, and any restrictions or flags (NULL, Length, Primary Key, etc.) in a table.",
"operationId": "CSSAPIEntitySchema",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "entityName",
"in": "path",
"description": "Name of the Table to retrieve schema for.",
"required": true,
"type": "string",
"x-ms-summary": "Entity Name",
"x-ms-url-encoding": "single",
"x-ms-dynamic-values": {
"operationId": "CSSAPIEntityList",
"value-path": "EntityNameForAPI",
"value-title": "EntityNameDisplay"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/APISchemaResponse"
}
}
}
}
}
},
"/CSSAPI/v2/{entityName}/Update": {
"post": {
"tags": [
"Core Actions"
],
"summary": "Update record(s) for a specified entity",
"description": "Update record(s) for a specified entity/area with specific criteria and a TriggerWorkflow as flag to run workflow after the update request succeeds or not. Maximum number of records that can be updated is 500 per call.",
"operationId": "CSSAPIUpdateEntity",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "entityName",
"in": "path",
"required": true,
"type": "string",
"description": "Table name to update record(s) in.",
"x-ms-summary": "Entity Name",
"x-ms-url-encoding": "single",
"x-ms-dynamic-values": {
"operationId": "CSSAPIEntityListUpdate",
"value-path": "EntityNameForAPI",
"value-title": "EntityNameDisplay"
}
},
{
"name": "update",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/APIUpdateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/APIUpdateResponse"
}
}
}
}
},
"/CSSAPI/v2/EntityList": {
"get": {
"tags": [
"Discovery"
],
"summary": "Pull list of entities that API is allowed to work with",
"description": "Returns the list of names and three flagged properties indicating whether it can be edited, updated, or viewed/queried.",
"operationId": "CSSAPIEntityList",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "purpose",
"in": "query",
"required": false,
"x-ms-summary": "Purpose",
"description": "Purpose of List (Select/Insert/Update)",
"type": "string",
"enum": [
"select",
"insert",
"update"
]
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/APIEntityListResponse"
}
}
},
"400": {
"description": "BadRequest",
"schema": {
"$ref": "#/definitions/CSSAPICustomMessage"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "string"
}
},
"505": {
"description": "HttpVersionNotSupported",
"schema": {
"$ref": "#/definitions/CSSAPICustomMessage"
}
}
}
}
},
"/CSSAPI/v2/PowerAutomate/EntityListForSelect": {
"get": {
"tags": [
"Internal"
],
"summary": "Retrieve List of available Entities for Select Purpose",
"description": "Retrieve List of available Entities for Select Purpose",
"operationId": "CSSAPIEntityListSelect",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/APIEntityListResponse"
}
}
},
"400": {
"description": "BadRequest",
"schema": {
"$ref": "#/definitions/CSSAPICustomMessage"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "string"
}
},
"505": {
"description": "HttpVersionNotSupported",
"schema": {
"$ref": "#/definitions/CSSAPICustomMessage"
}
}
},
"x-ms-visibility": "internal"
}
},
"/CSSAPI/v2/PowerAutomate/EntityListForUpdate": {
"get": {
"tags": [
"Internal"
],
"summary": "Retrieve List of available Entities for Update Purpose",
"description": "Retrieve List of available Entities for Update Purpose",
"operationId": "CSSAPIEntityListUpdate",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/APIEntityListResponse"
}
}
},
"400": {
"description": "BadRequest",
"schema": {
"$ref": "#/definitions/CSSAPICustomMessage"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "string"
}
},
"505": {
"description": "HttpVersionNotSupported",
"schema": {
"$ref": "#/definitions/CSSAPICustomMessage"
}
}
},
"x-ms-visibility": "internal"
}
},
"/CSSAPI/v2/PowerAutomate/EntityListForInsert": {
"get": {
"tags": [
"Internal"
],
"summary": "Retrieve List of available Entities for Insert Purpose",
"description": "Retrieve List of available Entities for Insert Purpose",
"operationId": "CSSAPIEntityListInsert",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/APIEntityListResponse"
}
}
},
"400": {
"description": "BadRequest",
"schema": {
"$ref": "#/definitions/CSSAPICustomMessage"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "string"
}
},
"505": {
"description": "HttpVersionNotSupported",
"schema": {
"$ref": "#/definitions/CSSAPICustomMessage"
}
}
},
"x-ms-visibility": "internal"
}
},
"/CSSAPI/v2/PowerAutomate/{entityName}/Schema": {
"get": {
"tags": [
"Internal"
],
"summary": "Retrieve List of attributes in a given entity for Select Purpose",
"description": "Retrieve List of attributes in a given entity for Select Purpose",
"operationId": "CSSAPIEntitySchemaAttributeDefinitionSelectPurpose",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "entityName",
"in": "path",
"required": true,
"type": "string",
"x-ms-url-encoding": "single",
"x-ms-dynamic-values": {
"operationId": "CSSAPIEntityListSelect",
"value-path": "EntityNameForAPI",
"value-title": "EntityNameDisplay"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/APIAttributeDefinitionResponse"
}
}
},
"400": {
"description": "BadRequest",
"schema": {
"$ref": "#/definitions/CSSAPICustomMessage"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "string"
}
},
"505": {
"description": "HttpVersionNotSupported",
"schema": {
"$ref": "#/definitions/CSSAPICustomMessage"
}
}
},
"x-ms-visibility": "internal"
}
},
"/CSSAPI/v2/PowerAutomate/PollTriggers/{entityName}/NewRecords": {
"post": {
"tags": [
"Poll Triggers"
],
"summary": "A scheduled trigger that query created (new) records on a given interval",
"description": "A scheduled trigger that query created (new) records on a given interval.",
"operationId": "CSSAPINewRecordsPollTrigger",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"x-ms-trigger": "batch",
"x-ms-trigger-metadata": {
"mode": "polling",
"kind": "query"
},
"parameters": [
{
"name": "entityName",
"in": "path",
"required": true,
"type": "string",
"x-ms-summary": "Entity Name",
"x-ms-url-encoding": "single",
"description": "Table name to pull new record(s) from.",
"x-ms-dynamic-values": {
"operationId": "CSSAPIEntityListUpdate",
"value-path": "EntityNameForAPI",
"value-title": "EntityNameDisplay"
}
},
{
"name": "since",
"in": "query",
"required": false,
"type": "string",
"format": "date-time",
"x-ms-visibility": "internal"
},
{
"name": "query",
"in": "body",
"description": "Query Model",
"required": true,
"schema": {
"$ref": "#/definitions/APIQueryRequest"
}
}
],
"responses": {
"200": {
"description": "default",
"schema": {
"$ref": "#/definitions/APITriggerQueryResponse"
}
}
}
}
},
"/CSSAPI/v2/PowerAutomate/PollTriggers/{entityName}/UpdatedRecords": {
"post": {
"tags": [
"Poll Triggers"
],
"summary": "A scheduled trigger that shows records updated since a specific datetime",
"operationId": "CSSAPIUpdatedRecordsPollTrigger",
"description": "A scheduled trigger that shows records which have been updated since a given amount of time.",
"x-ms-trigger": "batch",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"x-ms-trigger-metadata": {
"mode": "polling",
"kind": "query"
},
"parameters": [
{
"name": "entityName",
"in": "path",
"required": true,
"type": "string",
"x-ms-summary": "Entity Name",
"x-ms-url-encoding": "single",
"description": "Table name to pull updated record(s) from.",
"x-ms-dynamic-values": {
"operationId": "CSSAPIEntityListUpdate",
"value-path": "EntityNameForAPI",
"value-title": "EntityNameDisplay"
}
},
{
"name": "since",
"in": "query",
"required": false,
"type": "string",
"format": "date-time",
"x-ms-visibility": "internal"
},
{
"name": "query",
"in": "body",
"description": "Query Model",
"required": true,
"schema": {
"$ref": "#/definitions/APIQueryRequest"
}
}
],
"responses": {
"200": {
"description": "default",
"schema": {
"$ref": "#/definitions/APITriggerQueryResponse"
}
}
}
}
},
"/CSSAPI/v2/PowerAutomate/PollTriggers/{entityName}/NewAndUpdated": {
"post": {
"tags": [
"Poll Triggers"
],
"summary": "A scheduled trigger for created and updated records",
"description": "A scheduled trigger that shows both created (new) records and any records which have been updated since a given amount of time.",
"operationId": "CSSAPINewAndUpdatedRecordsPollTrigger",
"x-ms-trigger": "batch",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"x-ms-trigger-metadata": {
"mode": "polling",
"kind": "query"
},
"parameters": [
{
"name": "entityName",
"in": "path",
"required": true,
"type": "string",
"x-ms-summary": "Table Name",
"x-ms-url-encoding": "single",
"description": "Table name to pull updated record(s) from.",
"x-ms-dynamic-values": {
"operationId": "CSSAPIEntityListUpdate",
"value-path": "EntityNameForAPI",
"value-title": "EntityNameDisplay"
}
},
{
"name": "since",
"in": "query",
"required": false,
"type": "string",
"format": "date-time",
"x-ms-visibility": "internal"
},
{
"name": "query",
"in": "body",
"description": "Query Model",
"required": true,
"schema": {
"$ref": "#/definitions/APIQueryRequest"
}
}
],
"responses": {
"200": {
"description": "default",
"schema": {
"$ref": "#/definitions/APITriggerQueryResponse"
}
}
}
}
}
},
"definitions": {
"APIEntityListResponse": {
"description": "List of Entities",
"type": "object",
"properties": {
"EntityName": {
"description": "Entity name as it is in database",
"type": "string"
},
"EntityNameDisplay": {
"description": "Entity display name",
"type": "string"
},
"AllowAdd": {
"description": "Indicates if allowed to add new record",
"type": "boolean"
},
"AllowEdit": {
"description": "Indicates if allowed to edit record(S)",
"type": "boolean"
},
"AllowView": {
"description": "Indicates if allowed to view record(s)",
"type": "boolean"
},
"EntityNameForAPI": {
"description": "Entity name that is used in CSS API",
"type": "string"
}
}
},
"CSSAPICustomMessage": {
"required": [
"LogId",
"Message"
],
"type": "object",
"properties": {
"LogId": {
"type": "string"
},
"Message": {
"type": "string"
},
"Exception": {
"type": "object"
}
}
},
"APISchemaResponse": {
"description": "List of columns, data types, and any restrictions or flags (NULL, Length, Primary Key, etc.) in a table",
"type": "object",
"properties": {
"Name": {
"type": "string"
},
"IsPrimaryKey": {
"type": "boolean"
},
"IsIdentity": {
"type": "boolean"
},
"IsNullable": {
"type": "boolean"
},
"DBType": {
"type": "string"
},
"MaxLength": {
"format": "int32",
"type": "integer"
},
"DataPrecision": {
"format": "int32",
"type": "integer"
},
"DataScale": {
"format": "int32",
"type": "integer"
},
"HasDefaultValue": {
"type": "boolean"
},
"IsComputedColumn": {
"type": "boolean"
},
"IsPassword": {
"type": "boolean"
}
}
},
"APIQueryRequest": {
"type": "object",
"properties": {
"Fields": {
"description": "Empty collecitons means all fields or '*' in SQL language except Image and VARBINARY attributes",
"type": "array",
"items": {
"$ref": "#/definitions/APIQueryField"
}
},
"Clause": {
"type": "string"
},
"OrderByTag": {
"$ref": "#/definitions/APIQueryOrderByTag"
},
"GroupByTag": {
"type": "array",
"items": {
"type": "string"
}
},
"StartIndex": {
"format": "int32",
"description": "What index to start at, Default = 0",
"type": "integer"
},
"Length": {
"format": "int32",
"description": "Row count starting from StartIndex, cannot excceed 1000, Default = 100",
"type": "integer"
}
}
},
"APIQueryField": {
"type": "object",
"properties": {
"Attribute": {
"type": "string"
},
"Alias": {
"type": "string"
}
}
},
"APIQueryOrderByTag": {
"type": "object",
"title": "Order By Tag",
"properties": {
"Fields": {
"type": "array",
"items": {
"type": "string"
}
},
"Direction": {
"type": "string",
"title": "Direction",
"enum": [
"Asc",
"Desc"
],
"default": "Asc"
}
}
},
"APIBadResponseExample": {
"required": [
"Message"
],
"type": "object",
"properties": {
"Message": {
"type": "string"
}
}
},
"APIUpdateRequest": {
"type": "object",
"properties": {
"Clause": {
"type": "string"
},
"Tuples": {
"type": "array",
"items": {
"$ref": "#/definitions/APIUpdateRequestTuple"
}
},
"TriggerWorkflow": {
"type": "boolean"
}
}
},
"APIUpdateRequestTuple": {
"type": "object",
"properties": {
"Name": {
"type": "string"
},
"Value": {
"type": "object"
}
}
},
"APIAddRequestTuple": {
"type": "object",
"properties": {
"Name": {
"type": "string"
},
"Value": {
"type": "object"
}
}
},
"APIUpdateResponse": {
"type": "object",
"properties": {
"TotalAffected": {
"format": "int32",
"type": "integer"
},
"TotalFailed": {
"format": "int32",
"type": "integer"
},
"Message": {
"type": "string"
}
}
},
"APIAddRequest": {
"type": "object",
"properties": {
"Tuples": {
"type": "array",
"items": {
"$ref": "#/definitions/APIAddRequestTuple"
}
}
}
},
"APIAttributeDefinitionResponse": {
"type": "object",
"properties": {
"Name": {
"type": "string"
},
"Display": {
"type": "string"
}
}
},
"APIQueryResponse": {
"type": "array",
"items": {
"type": "object"
}
},
"APITriggerQueryResponse": {
"description": "Query response for triggers",
"type": "object",
"properties": {
"Records": {
"description": "List of records",
"type": "array",
"items": {
"type": "object",
"properties": {
"DateUpdated": {
"type": "string",
"format": "date-time",
"description": "date updated"
}
}
}
}
}
}
},
"securityDefinitions": {
"oauth2_auth": {
"type": "oauth2",
"flow": "accessCode",
"authorizationUrl": "https://csconfig.cobblestonesystems.com/_ReleaseQA/TestSystemAPI/Authorization",
"tokenUrl": "https://csconfig.cobblestonesystems.com/_ReleaseQA/TestSystemAPI/oauth/token",
"scopes": {}
}
},
"tags": [
{
"name": "RoutingApi",
"description": "This is a description for the api routes"
}
],
"security": [
{
"oauth2_auth": []
}
]
}