From f942476d5ed26b9cfe2548749c9b3807bb37d85f Mon Sep 17 00:00:00 2001 From: sachinira Date: Mon, 30 May 2022 06:24:17 +0530 Subject: [PATCH] Add SugarCRM connector --- openapi/sugarcrm/.gitignore | 1 + openapi/sugarcrm/Ballerina.toml | 10 + openapi/sugarcrm/Dependencies.toml | 273 ++ openapi/sugarcrm/Module.md | 53 + openapi/sugarcrm/Package.md | 19 + openapi/sugarcrm/client.bal | 511 ++ openapi/sugarcrm/icon.png | Bin 0 -> 8526 bytes openapi/sugarcrm/openapi.yaml | 7331 ++++++++++++++++++++++++++++ openapi/sugarcrm/types.bal | 139 + openapi/sugarcrm/utils.bal | 217 + 10 files changed, 8554 insertions(+) create mode 100644 openapi/sugarcrm/.gitignore create mode 100644 openapi/sugarcrm/Ballerina.toml create mode 100644 openapi/sugarcrm/Dependencies.toml create mode 100644 openapi/sugarcrm/Module.md create mode 100644 openapi/sugarcrm/Package.md create mode 100644 openapi/sugarcrm/client.bal create mode 100644 openapi/sugarcrm/icon.png create mode 100644 openapi/sugarcrm/openapi.yaml create mode 100644 openapi/sugarcrm/types.bal create mode 100644 openapi/sugarcrm/utils.bal diff --git a/openapi/sugarcrm/.gitignore b/openapi/sugarcrm/.gitignore new file mode 100644 index 000000000..eb5a316cb --- /dev/null +++ b/openapi/sugarcrm/.gitignore @@ -0,0 +1 @@ +target diff --git a/openapi/sugarcrm/Ballerina.toml b/openapi/sugarcrm/Ballerina.toml new file mode 100644 index 000000000..52a550258 --- /dev/null +++ b/openapi/sugarcrm/Ballerina.toml @@ -0,0 +1,10 @@ +[package] +license = ["Apache-2.0"] +keywords = ["Sales & CRM", "Customer Relationship Management"] +org = "ballerinax" +name = "sugarcrm" +icon = "icon.png" +distribution = "2201.0.3" +repository = "https://github.com/ballerina-platform/ballerinax-openapi-connectors" +version = "1.0.0" +authors = ["Ballerina"] diff --git a/openapi/sugarcrm/Dependencies.toml b/openapi/sugarcrm/Dependencies.toml new file mode 100644 index 000000000..f4da8bfec --- /dev/null +++ b/openapi/sugarcrm/Dependencies.toml @@ -0,0 +1,273 @@ +# AUTO-GENERATED FILE. DO NOT MODIFY. + +# This file is auto-generated by Ballerina for managing dependency versions. +# It should not be modified by hand. + +[ballerina] +dependencies-toml-version = "2" + +[[package]] +org = "ballerina" +name = "auth" +version = "2.2.1" +dependencies = [ + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.array"}, + {org = "ballerina", name = "lang.string"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "regex"} +] + +[[package]] +org = "ballerina" +name = "cache" +version = "3.2.1" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "task"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "crypto" +version = "2.2.1" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "file" +version = "1.2.2" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "os"}, + {org = "ballerina", name = "regex"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "http" +version = "2.2.1" +dependencies = [ + {org = "ballerina", name = "auth"}, + {org = "ballerina", name = "cache"}, + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "file"}, + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "jwt"}, + {org = "ballerina", name = "lang.array"}, + {org = "ballerina", name = "lang.decimal"}, + {org = "ballerina", name = "lang.int"}, + {org = "ballerina", name = "lang.runtime"}, + {org = "ballerina", name = "lang.string"}, + {org = "ballerina", name = "lang.value"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "mime"}, + {org = "ballerina", name = "oauth2"}, + {org = "ballerina", name = "observe"}, + {org = "ballerina", name = "regex"}, + {org = "ballerina", name = "time"}, + {org = "ballerina", name = "url"} +] +modules = [ + {org = "ballerina", packageName = "http", moduleName = "http"} +] + +[[package]] +org = "ballerina" +name = "io" +version = "1.2.1" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.value"} +] + +[[package]] +org = "ballerina" +name = "jballerina.java" +version = "0.0.0" + +[[package]] +org = "ballerina" +name = "jwt" +version = "2.2.1" +dependencies = [ + {org = "ballerina", name = "cache"}, + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.int"}, + {org = "ballerina", name = "lang.string"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "regex"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "lang.__internal" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.object"} +] + +[[package]] +org = "ballerina" +name = "lang.array" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.__internal"} +] + +[[package]] +org = "ballerina" +name = "lang.decimal" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.int" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.object" +version = "0.0.0" + +[[package]] +org = "ballerina" +name = "lang.runtime" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.string" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.value" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "log" +version = "2.2.1" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.value"}, + {org = "ballerina", name = "observe"} +] + +[[package]] +org = "ballerina" +name = "mime" +version = "2.2.2" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.int"} +] + +[[package]] +org = "ballerina" +name = "oauth2" +version = "2.2.1" +dependencies = [ + {org = "ballerina", name = "cache"}, + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "observe" +version = "1.0.4" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "os" +version = "1.2.1" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "regex" +version = "1.2.1" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "task" +version = "2.2.1" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "time" +version = "2.2.1" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "url" +version = "2.2.1" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] +modules = [ + {org = "ballerina", packageName = "url", moduleName = "url"} +] + +[[package]] +org = "ballerinax" +name = "sugarcrm" +version = "1.0.0" +dependencies = [ + {org = "ballerina", name = "http"}, + {org = "ballerina", name = "url"} +] +modules = [ + {org = "ballerinax", packageName = "sugarcrm", moduleName = "sugarcrm"} +] + + diff --git a/openapi/sugarcrm/Module.md b/openapi/sugarcrm/Module.md new file mode 100644 index 000000000..5bfcec65a --- /dev/null +++ b/openapi/sugarcrm/Module.md @@ -0,0 +1,53 @@ +## Overview +This is a generated connector for [SugarCRM REST API v12.0](https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_12.0/Integration/Web_Services/REST_API/) OpenAPI Specification. +SugarCRM REST API provides capabilities to effectively manage the customer lifecycle with a set of modules that support each stage of the funnel. + +## Prerequisites + +Before using this connector in your Ballerina application, complete the following: + +* Create a [SugarCRM](https://www.sugarcrm.com/au/?utm_source=google.com&utm_medium=organic) account +* Obtain tokens by following [this guide](https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_12.0/Integration/Web_Services/REST_API/#Authentication) + +## Quickstart + +To use the SugarCRM connector in your Ballerina application, update the .bal file as follows: + +### Step 1: Import connector +First, import the `ballerinax/sugarcrm` module into the Ballerina project. +```ballerina +import ballerinax/sugarcrm; +``` + +### Step 2: Create a new connector instance +Create a `sugarcrm:ApiKeysConfig` with the API key obtained, and initialize the connector with it. +```ballerina +sugarcrm:ClientConfig config = { + auth: { + tokenUrl: "" + username: "" + password: "" + clientId: "" + clientSecret: "" + } +} +sugarcrm:Client sugarCrmClient = check new Client(config, serviceUrl = "https:///rest/v{version}/"); +``` + +### Step 3: Invoke connector operation +1. Now you can use the operations available within the connector. Note that they are in the form of remote operations. + + Following is an example on how to list set of records filtered by an expression using the connector. + + Creates a ticket for the company + + ```ballerina + public function main() returns error? { + string module = "Account"; + string[] filter = [{"id":"1"}]; + FilteredRecordDetails records = check sugarCrmClient -> listRecords(module, filter); + io:println(records); + } + ``` + +2. Use `bal run` command to compile and run the Ballerina program. diff --git a/openapi/sugarcrm/Package.md b/openapi/sugarcrm/Package.md new file mode 100644 index 000000000..de8b59f79 --- /dev/null +++ b/openapi/sugarcrm/Package.md @@ -0,0 +1,19 @@ +Connects to [SugarCRM API](https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_12.0/Integration/Web_Services/REST_API/) from Ballerina + +## Package overview +The `ballerinax/sugarcrm` is a [Ballerina](https://ballerina.io/) connector for SugarCRM API. +This package provides the capability to access SugarCRM instance. + +### Compatibility +| | Version | +|-----------------------------|--------------------------------| +| Ballerina Language | Ballerina Swan Lake 2201.0.3 | +| SugarCRM API | v12.0 | + +## Report issues +To report bugs, request new features, start new discussions, view project boards, etc., go to the [Ballerina Extended Library repository](https://github.com/ballerina-platform/ballerina-extended-library) + +## Useful links +- Discuss code changes of the Ballerina project in [ballerina-dev@googlegroups.com](mailto:ballerina-dev@googlegroups.com). +- Chat live with us via our [Slack channel](https://ballerina.io/community/slack/). +- Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag diff --git a/openapi/sugarcrm/client.bal b/openapi/sugarcrm/client.bal new file mode 100644 index 000000000..6bb3a04ca --- /dev/null +++ b/openapi/sugarcrm/client.bal @@ -0,0 +1,511 @@ +// Copyright (c) 2022 WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +// +// WSO2 Inc. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +import ballerina/http; + +# Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint. +public type ClientConfig record {| + # Configurations related to client authentication + http:OAuth2PasswordGrantConfig auth; + # The HTTP version understood by the client + string httpVersion = "1.1"; + # Configurations related to HTTP/1.x protocol + http:ClientHttp1Settings http1Settings = {}; + # Configurations related to HTTP/2 protocol + http:ClientHttp2Settings http2Settings = {}; + # The maximum time to wait (in seconds) for a response before closing the connection + decimal timeout = 60; + # The choice of setting `forwarded`/`x-forwarded` header + string forwarded = "disable"; + # Configurations associated with Redirection + http:FollowRedirects? followRedirects = (); + # Configurations associated with request pooling + http:PoolConfiguration? poolConfig = (); + # HTTP caching related configurations + http:CacheConfig cache = {}; + # Specifies the way of handling compression (`accept-encoding`) header + http:Compression compression = http:COMPRESSION_AUTO; + # Configurations associated with the behaviour of the Circuit Breaker + http:CircuitBreakerConfig? circuitBreaker = (); + # Configurations associated with retrying + http:RetryConfig? retryConfig = (); + # Configurations associated with cookies + http:CookieConfig? cookieConfig = (); + # Configurations associated with inbound response size limits + http:ResponseLimitConfigs responseLimits = {}; + # SSL/TLS-related options + http:ClientSecureSocket? secureSocket = (); +|}; + +# This is a generated connector for [SugarCRM REST API v12.0](https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_12.0/Integration/Web_Services/REST_API/) OpenAPI Specification. +# SugarCRM REST API provides capabilities to effectively manage the customer lifecycle with a set of modules that support each stage of the funnel. +@display {label: "SugarCRM", iconPath: "icon.png"} +public isolated client class Client { + final http:Client clientEp; + # Gets invoked to initialize the `connector`. + # The connector initialization requires setting the API credentials. + # Create [SugarCRM account](https://www.sugarcrm.com/au/?utm_source=google.com&utm_medium=organic) and obtain tokens by following [this guide](https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_12.0/Integration/Web_Services/REST_API/#Authentication). + # + # + clientConfig - The configurations to be used when initializing the `connector` + # + serviceUrl - URL of the target service + # + return - An error if connector initialization failed + public isolated function init(ClientConfig clientConfig, string serviceUrl) returns error? { + http:Client httpEp = check new (serviceUrl, clientConfig); + self.clientEp = httpEp; + return; + } + # Return a set of records filtered by an expression. + # + # + 'module - The name of the module. + # + filter - The [filter expression](https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_11.3/Integration/Web_Services/REST_API/End + # + filterId - Identifier for a preexisting filter. If filter is also set, the two filters are joined with an AND. + # + q - A search expression, will search on this module. Cannot be used at the same time as a filter expression or id. + # + maxNum - A maximum number of records to return. The default is all records. + # + offset - The number of records to skip over before records are returned. The default is 0. The parameter will be ignored if the max_num parameter is missing. + # + fields - Comma delimited list of fields to return. The field date_modified will always be returned. `name,account_type,description` + # + orderBy - How to sort the returned records, in a comma delimited list with the direction appended to the column name after a colon. `name:DESC,account_type:DESC,date_modified:ASC` + # + deleted - Boolean to show deleted records in the result set. + # + view - Instead of defining the fields argument, the view argument can be used instead. The field list is constructed at the server side based on the view definition which is requested. This argument can be used in combination with the fields argument. + # + nullsLast - Boolean to return records with null values in order_by fields last in the result set. + # + return - ok + remote isolated function listRecords(string 'module, string[]? filter = (), string? filterId = (), string? q = (), string? maxNum = (), string? offset = (), string? fields = (), string? orderBy = (), boolean? deleted = (), string? view = (), boolean? nullsLast = ()) returns FilteredRecordDetails|error { + string resourcePath = string `/${'module}`; + map queryParam = {"filter": filter, "filter_id": filterId, "q": q, "max_num": maxNum, "offset": offset, "fields": fields, "order_by": orderBy, "deleted": deleted, "view": view, "nulls_last": nullsLast}; + map queryParamEncoding = {"filter": {style: FORM, explode: true}}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam, queryParamEncoding); + FilteredRecordDetails response = check self.clientEp->get(resourcePath); + return response; + } + # Create a new record of the specified type + # + # + 'module - The name of the module. + # + payload - Filter options + # + return - ok + remote isolated function createRecord(string 'module, json payload) returns json|error { + string resourcePath = string `/${'module}`; + http:Request request = new; + request.setPayload(payload, "application/json"); + json response = check self.clientEp->post(resourcePath, request); + return response; + } + # Return a set of records filtered by an expression. The filter can be applied to multiple fields and have multiple and/or conditions in it. + # + # + 'module - The name of the module. + # + payload - Filter options + # + return - ok + remote isolated function listFilteredRecords(string 'module, FilterOptions payload) returns FilteredRecordDetails|error { + string resourcePath = string `/${'module}/filter`; + http:Request request = new; + json jsonBody = check payload.cloneWithType(json); + request.setPayload(jsonBody, "application/json"); + FilteredRecordDetails response = check self.clientEp->post(resourcePath, request); + return response; + } + # Returns a single record + # + # + 'module - The name of the module. + # + 'record - The record id. + # + return - ok + remote isolated function retrieveRecord(string 'module, string 'record) returns json|error { + string resourcePath = string `/${'module}/${'record}`; + json response = check self.clientEp->get(resourcePath); + return response; + } + # Update a record of the specified type + # + # + 'module - The name of the module. + # + 'record - The record id. + # + payload - Record Details + # + return - ok + remote isolated function updateRecord(string 'module, string 'record, json payload) returns json|error { + string resourcePath = string `/${'module}/${'record}`; + http:Request request = new; + request.setPayload(payload, "application/json"); + json response = check self.clientEp->put(resourcePath, request); + return response; + } + # Delete a record of the specified type + # + # + 'module - The name of the module. + # + 'record - The record id. + # + return - ok + remote isolated function deleteRecord(string 'module, string 'record) returns SuccessResponseID|error { + string resourcePath = string `/${'module}/${'record}`; + SuccessResponseID response = check self.clientEp->delete(resourcePath); + return response; + } + # View audit log in record view + # + # + 'module - The name of the module. + # + 'record - The record id. + # + maxNum - A maximum number of records to return. The default is all records. + # + offset - The number of records to skip over before records are returned. The default is 0. The parameter will be ignored if the max_num parameter is missing. + # + return - ok + remote isolated function viewChangeLog(string 'module, string 'record, string? maxNum = (), string? offset = ()) returns FilteredRecordDetails|error { + string resourcePath = string `/${'module}/${'record}/audit`; + map queryParam = {"max_num": maxNum, "offset": offset}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + FilteredRecordDetails response = check self.clientEp->get(resourcePath); + return response; + } + # Expose the global search capability using solely the Elasticsearch backend as an alternative to the /search endpoint. + # + # + payload - Filter options + # + return - ok + remote isolated function globalSearchElasticsearch(SearchOptions payload) returns FilteredRecordDetails|error { + string resourcePath = string `/globalsearch`; + http:Request request = new; + json jsonBody = check payload.cloneWithType(json); + request.setPayload(jsonBody, "application/json"); + FilteredRecordDetails response = check self.clientEp->post(resourcePath, request); + return response; + } + # Globally search records + # + # + q - A search expression, will search on this module. Cannot be used at the same time as a filter expression or id. + # + maxNum - A maximum number of records to return. The default is all records. + # + offset - The number of records to skip over before records are returned. The default is 0. The parameter will be ignored if the max_num parameter is missing. + # + fields - Comma delimited list of fields to return. The field date_modified will always be returned. `name,account_type,description` + # + orderBy - How to sort the returned records, in a comma delimited list with the direction appended to the column name after a colon. `name:DESC,account_type:DESC,date_modified:ASC` + # + favorites - Only fetch the current users favorited records. + # + myItems - Only fetch items assigned to the current user. + # + return - ok + remote isolated function globalSearch(string? q = (), string? maxNum = (), string? offset = (), string? fields = (), string? orderBy = (), boolean? favorites = (), boolean? myItems = ()) returns FilteredRecordDetails|error { + string resourcePath = string `/search`; + map queryParam = {"q": q, "max_num": maxNum, "offset": offset, "fields": fields, "order_by": orderBy, "favorites": favorites, "my_items": myItems}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + FilteredRecordDetails response = check self.clientEp->get(resourcePath); + return response; + } + # Create a single event or a series of event records of the specified type + # + # + payload - The name value list of fields to populate. + # + return - ok + remote isolated function createCallEvent(json payload) returns json|error { + string resourcePath = string `/Calls`; + http:Request request = new; + request.setPayload(payload, "application/json"); + json response = check self.clientEp->post(resourcePath, request); + return response; + } + # Update a calendar event record of the specified type. + # + # + 'record - The record id. + # + allRecurrences - Flag to update all events in a series. + # + return - ok + remote isolated function updateCallEvent(string 'record, boolean? allRecurrences = ()) returns json|error { + string resourcePath = string `/Calls/${'record}`; + map queryParam = {"all_recurrences": allRecurrences}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + http:Request request = new; + //TODO: Update the request as needed; + json response = check self.clientEp-> put(resourcePath, request); + return response; + } + # Deletes either a single event record or a series of event records. + # + # + 'record - The record id. + # + allRecurrences - Flag to delete all events in a series. + # + return - ok + remote isolated function deleteCallEvent(string 'record, boolean? allRecurrences = ()) returns SuccessResponseID|error { + string resourcePath = string `/Calls/${'record}`; + map queryParam = {"all_recurrences": allRecurrences}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + SuccessResponseID response = check self.clientEp->delete(resourcePath); + return response; + } + # Returns a single parent record of the given commentlog + # + # + 'record - CommentLog ID + # + return - ok + remote isolated function retrieveCommentlogParent(string 'record) returns json|error { + string resourcePath = string `/CommentLog/${'record}`; + json response = check self.clientEp->get(resourcePath); + return response; + } + # Saves configuration changes in the database. + # + # + payload - Update account payload + # + return - ok + remote isolated function configSave(json payload) returns json|error { + string resourcePath = string `/ConsoleConfiguration/config`; + http:Request request = new; + request.setPayload(payload, "application/json"); + json response = check self.clientEp->post(resourcePath, request); + return response; + } + # Return the original metadata for the module. + # + # + modules - Comma-separated module names + # + 'type - The type of the desired metadata. The following types are supported- 'filter', 'layout', 'menu', 'view'. + # + name - The name of the metadata. Examples- 'list', 'record', or 'multi-line-list'. + # + return - ok + remote isolated function getDefaultMetadata(string modules, string 'type, string name) returns json|error { + string resourcePath = string `/ConsoleConfiguration/default-metadata`; + map queryParam = {"modules": modules, "type": 'type, "name": name}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + json response = check self.clientEp->get(resourcePath); + return response; + } + # Get a contact's related cases, filtered by an expression, which are accessible to a contact with portal visibility. + # + # + 'record - Contact ID + # + filter - The [filter expression](https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_11.3/Integration/Web_Services/REST_API/End + # + filterId - Identifier for a preexisting filter. If filter is also set, the two filters are joined with an AND. + # + maxNum - A maximum number of records to return. The default is all records. + # + offset - The number of records to skip over before records are returned. The default is 0. The parameter will be ignored if the max_num parameter is missing. + # + fields - Comma delimited list of fields to return. The field date_modified will always be returned. `name,account_type,description` + # + orderBy - How to sort the returned records, in a comma delimited list with the direction appended to the column name after a colon. `name:DESC,account_type:DESC,date_modified:ASC` + # + deleted - Boolean to show deleted records in the result set. + # + return - ok + remote isolated function getContactCases(string 'record, string[]? filter = (), string? filterId = (), string? maxNum = (), string? offset = (), string? fields = (), string? orderBy = (), boolean? deleted = ()) returns FilteredRecordDetails|error { + string resourcePath = string `/Contact/${'record}/Cases`; + map queryParam = {"filter": filter, "filter_id": filterId, "max_num": maxNum, "offset": offset, "fields": fields, "order_by": orderBy, "deleted": deleted}; + map queryParamEncoding = {"filter": {style: FORM, explode: true}}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam, queryParamEncoding); + FilteredRecordDetails response = check self.clientEp->get(resourcePath); + return response; + } + # Returns a list of time slots for which the specified person is busy. + # + # + 'record - Contact ID + # + return - ok + remote isolated function getFreeBusySchedule(string 'record) returns FreeBusyData|error { + string resourcePath = string `/Contacts/${'record}/freebusy`; + FreeBusyData response = check self.clientEp->get(resourcePath); + return response; + } + # Return the Currencies defined in the application + # + # + return - ok + remote isolated function getCurrencies() returns FilteredRecordDetails|error { + string resourcePath = string `/Currencies`; + FilteredRecordDetails response = check self.clientEp->get(resourcePath); + return response; + } + # Return a set of User records filtered by an expression. + # + # + filter - The [filter expression](https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_11.3/Integration/Web_Services/REST_API/End + # + filterId - Identifier for a preexisting filter. If filter is also set, the two filters are joined with an AND. + # + q - A search expression, will search on this module. Cannot be used at the same time as a filter expression or id. + # + maxNum - A maximum number of records to return. The default is all records. + # + offset - The number of records to skip over before records are returned. The default is 0. The parameter will be ignored if the max_num parameter is missing. + # + fields - Comma delimited list of fields to return. The field date_modified will always be returned. `name,account_type,description` + # + orderBy - How to sort the returned records, in a comma delimited list with the direction appended to the column name after a colon. `name:DESC,account_type:DESC,date_modified:ASC` + # + deleted - Boolean to show deleted records in the result set. + # + view - Instead of defining the fields argument, the view argument can be used instead. The field list is constructed at the server side based on the view definition which is requested. This argument can be used in combination with the fields argument. + # + nullsLast - Boolean to return records with null values in order_by fields last in the result set. + # + return - ok + remote isolated function getUsers(string[]? filter = (), string? filterId = (), string? q = (), string? maxNum = (), string? offset = (), string? fields = (), string? orderBy = (), boolean? deleted = (), string? view = (), boolean? nullsLast = ()) returns FilteredRecordDetails|error { + string resourcePath = string `/Users`; + map queryParam = {"filter": filter, "filter_id": filterId, "q": q, "max_num": maxNum, "offset": offset, "fields": fields, "order_by": orderBy, "deleted": deleted, "view": view, "nulls_last": nullsLast}; + map queryParamEncoding = {"filter": {style: FORM, explode: true}}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam, queryParamEncoding); + FilteredRecordDetails response = check self.clientEp->get(resourcePath); + return response; + } + # Delete a User record + # + # + 'record - User ID + # + return - ok + remote isolated function deleteUser(string 'record) returns SuccessResponseID|error { + string resourcePath = string `/Users/${'record}`; + SuccessResponseID response = check self.clientEp->delete(resourcePath); + return response; + } + # Retrieve a list of calendar event start and end times for specified person + # + # + 'record - User ID + # + return - ok + remote isolated function getUserFreeBusySchedule(string 'record) returns FreeBusyData|error { + string resourcePath = string `/Users/${'record}/freebusy`; + FreeBusyData response = check self.clientEp->get(resourcePath); + return response; + } + # Create a single event record or a series of event records + # + # + return - ok + remote isolated function createCalendarEvent() returns json|error { + string resourcePath = string `/Meetings`; + http:Request request = new; + //TODO: Update the request as needed; + json response = check self.clientEp-> post(resourcePath, request); + return response; + } + # Update a single event record or a series of event records + # + # + 'record - Meeting ID + # + allRecurrences - Flag to update all events in a series. + # + return - ok + remote isolated function updateCalendarEvent(string 'record, boolean? allRecurrences = ()) returns json|error { + string resourcePath = string `/Meetings/${'record}`; + map queryParam = {"all_recurrences": allRecurrences}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + http:Request request = new; + //TODO: Update the request as needed; + json response = check self.clientEp-> put(resourcePath, request); + return response; + } + # Delete a single event record or a series of event records + # + # + 'record - Meeting ID + # + allRecurrences - Flag to delete all events in a series. + # + return - ok + remote isolated function deleteCalendarEvent(string 'record, boolean? allRecurrences = ()) returns SuccessResponseID|error { + string resourcePath = string `/Meetings/${'record}`; + map queryParam = {"all_recurrences": allRecurrences}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + SuccessResponseID response = check self.clientEp->delete(resourcePath); + return response; + } + # Retrieve info about launching an external meeting + # + # + 'record - Meeting ID + # + return - ok + remote isolated function getExternalMeetingInfo(string 'record) returns json|error { + string resourcePath = string `/Meetings/${'record}/external`; + json response = check self.clientEp->get(resourcePath); + return response; + } + # Update a record of the specified type + # + # + 'record - Opportunity ID + # + return - ok + remote isolated function updateOpportunity(string 'record) returns json|error { + string resourcePath = string `/Opportunities/${'record}`; + http:Request request = new; + //TODO: Update the request as needed; + json response = check self.clientEp-> put(resourcePath, request); + return response; + } + # Create a Lead with the optional post-save actions for Convert Target/Prospect and Create Lead from Email operations + # + # + prospectId - Pass a prospect id if Lead is being created as part of a Convert Target/Prospect process + # + inboundEmailId - Pass an inbound email id if Lead is being created from an Email + # + return - ok + remote isolated function createLead(string prospectId, string inboundEmailId) returns json|error { + string resourcePath = string `/Leads`; + map queryParam = {"prospect_id": prospectId, "inbound_email_id": inboundEmailId}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + http:Request request = new; + //TODO: Update the request as needed; + json response = check self.clientEp-> post(resourcePath, request); + return response; + } + # Convert Lead to a Contact and optionally link it to a new or existing module such as an Account or Opportunity + # + # + leadId - Lead ID + # + payload - An object containing the Contacts module to be created as part of the conversion, along with (optionally) any modules that this new Contact record is to be related to. + # + return - ok + remote isolated function convertLead(string leadId, json payload) returns json|error { + string resourcePath = string `/Leads/${leadId}/convert`; + http:Request request = new; + json jsonBody = check payload.cloneWithType(json); + request.setPayload(jsonBody, "application/json"); + json response = check self.clientEp->post(resourcePath, request); + return response; + } + # Retrieve a list of calendar event start and end times for specified person + # + # + 'record - Lead ID + # + return - ok + remote isolated function getLeadFreeBusySchedule(string 'record) returns FreeBusyData|error { + string resourcePath = string `/Leads/${'record}/freebusy`; + FreeBusyData response = check self.clientEp->get(resourcePath); + return response; + } + # Create lead + # + # + return - ok + remote isolated function createLeadRecord() returns InlineResponse200|error { + string resourcePath = string `/Leads/register`; + http:Request request = new; + //TODO: Update the request as needed; + InlineResponse200 response = check self.clientEp-> post(resourcePath, request); + return response; + } + # Lists related filtered records. + # + # + linkName - a link name + # + 'record - a record name + # + filter - The [filter expression](https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_11.3/Integration/Web_Services/REST_API/End + # + maxNum - A maximum number of records to return. The default is all records. + # + offset - The number of records to skip over before records are returned. The default is 0. The parameter will be ignored if the max_num parameter is missing. + # + fields - Comma delimited list of fields to return. The field date_modified will always be returned. `name,account_type,description` + # + orderBy - How to sort the returned records, in a comma delimited list with the direction appended to the column name after a colon. `name:DESC,account_type:DESC,date_modified:ASC` + # + view - Instead of defining the fields argument, the view argument can be used instead. The field list is constructed at the server side based on the view definition which is requested. This argument can be used in combination with the fields argument. + # + return - ok + remote isolated function listFilteredRelatedRecords(string linkName, string 'record, string[]? filter = (), string? maxNum = (), string? offset = (), string? fields = (), string? orderBy = (), string? view = ()) returns FilteredRecordDetails|error { + string resourcePath = string `/Accounts/${'record}/link/${linkName}/filter`; + map queryParam = {"filter": filter, "max_num": maxNum, "offset": offset, "fields": fields, "order_by": orderBy, "view": view}; + map queryParamEncoding = {"filter": {style: FORM, explode: true}}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam, queryParamEncoding); + FilteredRecordDetails response = check self.clientEp->get(resourcePath); + return response; + } + # Get a filtered list of homepage activities for a user + # + # + maxNum - A maximum number of records to return. The default is all records. + # + offset - The number of records to skip over before records are returned. The default is 0. The parameter will be ignored if the max_num parameter is missing. + # + return - ok + remote isolated function getHomeActivities(string? maxNum = (), string? offset = ()) returns FilteredRecordDetails|error { + string resourcePath = string `/Activities/filter`; + map queryParam = {"max_num": maxNum, "offset": offset}; + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + FilteredRecordDetails response = check self.clientEp->get(resourcePath); + return response; + } + # Get configuration values for Amazon Web Services. This is only available to administrators of Sugar Serve. + # + # + return - ok + remote isolated function getAwsConfig() returns AWSConfig|error { + string resourcePath = string `/Administration/aws`; + AWSConfig response = check self.clientEp->get(resourcePath); + return response; + } + # Set configuration values for Amazon Web Services. This is only available to administrators of Sugar Serve. + # + # + payload - Amazon Web Services configs + # + return - ok + remote isolated function setAwsConfig(AWSConfig payload) returns AWSConfig|error { + string resourcePath = string `/Administration/aws`; + http:Request request = new; + json jsonBody = check payload.cloneWithType(json); + request.setPayload(jsonBody, "application/json"); + AWSConfig response = check self.clientEp->post(resourcePath, request); + return response; + } + # Get configuration values for a given category. This is only available to administrators. + # + # + category - The category + # + return - ok + remote isolated function getConfig(string category) returns json|error { + string resourcePath = string `/Administration/config/${category}`; + json response = check self.clientEp->get(resourcePath); + return response; + } + # Set configuration values for a given category. This is only available to administrators. + # + # + category - The category + # + return - ok + remote isolated function setConfig(string category) returns json|error { + string resourcePath = string `/Administration/config/${category}`; + http:Request request = new; + //TODO: Update the request as needed; + json response = check self.clientEp-> post(resourcePath, request); + return response; + } +} diff --git a/openapi/sugarcrm/icon.png b/openapi/sugarcrm/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..27862f113da42b482a4d6eb92a296c9c20fff38f GIT binary patch literal 8526 zcmdU#Wl)?k+wYOZT^27a?(VLOdvPztU5iT>cUz=IiWH}~yF=09P~4@^g#sz#I|8is=5K( z)f%L{7>?tD$IuiSSV+e)(;ul}2Sqs~Za|_Z)tG1Z8|GFbW-k|)5e`B^Im$wu#K^4E z+Q+3t6Q}ymYk_v1&Q3FPr@Gwww_!_`E5ErT$3H2^(18e2(Uk!VNQ8)S;r}hmOQ1bM zJZY@^#k6h4_l;bKw7132FuUp5NA4#e*EqX`WU!~zH{Os?I>8;MYIrSeG~_*JolnAu=*kcV1RHOH1j8>AN40r(;WI1Adj*!F6DwA%jMrl(7MMVBC4d4^<&*Scs7(fm1eR`Qi3#J?#F#BL74%$5cWAU9G7-mb|fqQ?E!$kh7!+c9Sj1 zzX8$$$AvQ}L;KC2SBn`7*!s#`2S`K20}~pn>zGf%k_aCtUdOsm|FR7e@j8f=mOaEY zO=M8U)-bgQ^vbL|A*?FB`t~m;_Q!L53YoJJIlN=pz^uZqbcXQJ}JDHZal`a0eskwk*9J`-`!;>4CymgOpFfx}jf0x8lQ%6h@L;N#KRa;%t zp?QZ{uM161f%AXIF%NdVXvVJIpTeF-_$Q2Zu!saw2W2knVS*Pmsk{!=I0OZU! z{AmFe)GZ-u#dstMFf>!&3=?os=qr=ntbeS7V9 z1DWnLM^q}HvbI(eM&ABJ&w}CAlJW@ZVx18{)yVQ5k15<*M9D%)I9b5zT1u$YX-J>DDN9Iv1onnOV7atSKDZS*x(T zVgUD#2Ax3sf~`!77ln6kpppDC-n&m{9*q*ojLH^qkMC+l6As76WRqQ(g(3aEE3#R_ zb4_=un2nZ>Zf?|mA8V57ly@7Q)tciba~nV?rdaQi7Wy?$A9TOREDiOjew-BkHaCAx z%;BPi|MO~pf#^c|v)G}0#UoI@_*enxx!SEfq3< z$nLv|=T75-)hm(U`aY{BvJ`#ikTRO$CG_O|J!+?^bhChW0$&qQHomI**fAn|<*nO* zWax%dS|T4M8YsNuAbW!xET%&l6l6NHUOLeVLKnJrTlW2en$f}h?d?<(mPjM@SDA24 zE23Y1P}W|{7oP>nuNGXI6tX0S`kWuhmW6pIg0Q??`98{JIl2Stk(T2MN~I(vOKRJm zje_``a6dLCDc}L36^EIxCrWT5mmMN zv8uT_BZTstoy94gM|FrIgP!hgn}U8GI?*H!jxfDFZ7@)j;{Mn6j2Ze|5R=k=oYhiC zBjO>GzyyoMX!Kvh{4+d!C*)&qI`@_%u1xzrQ2~^OzQYI`Wm_!}$Tso&sjlYCU>gHY zjgR;JKsqW;Z7a5(T)Nh!En_qb)+Gq2Qve~NTM=YZ?M{w#kgHi@GPCH6lSZFzkk&2nRY$*GX*
PBn_bw z0dj16rqlybQ`+$CZnToZ=$q!7?@h0mHNmYHox9$aJ-hWhA0}#d` zAf5Vv&Sdh7JA;wUIrAH`Trp%5RST_~3u}H+mu0-l;Fah5Psgz|ND@8**6(>*me0P; zWf2Zz%LD}YzQn!@z*25{RkUie$jUFm=Zb>_El^0&$<7)$`x46}__}mY5#RgGeW`xi zNoQ*WVJEfC2m4;81;Y2S_=P^$@5S*d<4uBkn@}309Lx;$iRAE+!;8<(0$$$lG85bc zq8+hs3(QQGD1eBO{B?2(?nZOJ*a^OSCxjQ-xn1=GgE6*aKHxA@7+-o_kUWohJ6NNP z5s3=1J8$TO8kgmS^WVXvj>@J&A4^*^w*U2nW_fx4@2i};VBy#VPkrjwgovtAMGBRr zq7&Cw@nO_lwJOZ99mNS*{#8s&H|CKixtE75yp|b`4Fvs9H*^NY1%5g!Kd(1A|28Ky zx6;KTPIUVIF#AL!eNCV5aH4<5#GsP|{|O{W{)o~Lir218U)Q%cHwCPPPhC{-`IS)) zCnp8|`s2*Fj(l2&PxV#2jP|{6-Jn?uau4U<#wOxc=2*n71Ezx>F?w;&pRzTOQp%Ns zIRf;{!&Un3HkNS%+?M9%MA4$qY%4Ys0_N?xhkOOGH3J>q27@X!5=eR z6i3?}a2n7D%i&4~) zPX1ZoF1O{Dm#w6R?+|qsGn<*FAJ*GLevQo=MvI|qZl1rju_5u(=L&0*E!&ymh%M43 z+H=Lad@=+2;0=}?wJ^|YX@z6NrawF8sOhN3)tEjFj zgq3+Azoq&Mi3C?SA7mvalx+$Q4~6Y6??t(PQIUK^C!9)m zHlD{)hS{=R;rh0O*yZ`15fG^zuFU>?E=aaO$#_7M{U}gALFnDXde3aDO`KOQk?jH= z$g!104LJO%KRnB6wpR9m#AQz|m7NWDS}p3Ey)ntAwEr0~b8<=8$VfpkFL*sZKd=|0 zV}5Qh()hlx7!)Eqa#C1V-oiRH<`P8NCO(gDPWce7Rd^c1!=oW9y|!DFrv?G0z;v&Qkl7 zrAfYxwvJzW=ro9Kjf!I<8m+SV)2HnG$Azn?d+*V(kApw(R_ax5+u|F~-P|o)$#R$eni%C+4q8q2hHNV6&uzoaPZg%|=2#;F z(IkUkgTY=Yz?b+kZ%xgrW*^tzv0HuAURU~QrWvmjv`gokax4Yf&4z<|uNS{+`>j8V zeWFPwa^=sm7d>LHsi<>BwAIEg4EL#Z?xx{h{u5j-WA%QKe8ot%AF~!MLsRLQ^2rl z!{^XAzDG)ogeX*=k_SC#hOK2(kcwCw5*yak$P6RA@a_g_*)%&^Fn@vy2EHka72n$+y8z2EE?V#1VyV(ycOi zbYQBn^)xnQbSpur;8>4R{jQEu#!b&`{%9T zS+)~^_uxp44t+!U$AXztKG8F;28Q*%g4K&apeKEvkOvz1`}>TfYVo&Ax>+D50iN=5 z^yg}Stj5zxI+n8!HfpL~6QtyCQ^tx}a-b8I`V|bZ8Bk8 z=>APMp^-1k4eqqbv>zD8IWCfE$r7U~45ufz!g@RI=Q-L+Zyd369o_^inTr`d7akB) z15qvzY8jMc4f;R75HfLav((qYU@ng$!xyZcA7XBoN5|^-@sN4t*uW%W?;udUU`Qqg zoGqi)20@dg+Cz2u3E5qgDiqmdJQK*8>x}qHYLAn%)}+;=jsObA|%HnKewt%#7Sy* zpy=_9csD5aOXR6Xr{ehZXuv?qmtYiijY$W5S?{bipdqmfj9LLu*B>d)n0LGjPGL*e zR{-!5(OQAWM*ZGk0G$9TZN>bCoSKfu>lVbBh8FwBQpM=&PH5l(5y3^D)>s>q$%&9i z)~=Ey8=#0)z|FOVv2{Z8P=-Sk zVw5p)YH%GM8k&tc!>rhi1-2VfT1`EybojiG&JL0zd$4b8GfrvEKicHkSj?ZDb0a|P zc4}I0e3iv9CFR1*yd9ucRa+j~iaf;fQ%CzwC=p zFj#?wG1pxNTfr`1`3d5vmdvGS>__?_8zE zs^NCvz-0pxwRW^@5-jAP68iS!3XHWS^HeDsjk;Jx~yHjOcDTTN!4=I{CS6 zEUDi2n4+1rUMn+C*#J&$R}c@*Z$(!{)3M@%D_gHBQJlsJe-c=B&(^=itK;l={Jt*z z3iD4#HEfdoOJ^o(mOU~xN>g1g*Un#+B%4fPNDgH~VfP-BMv3?iB-~xDtp75+zmz~S z7B7O-2^aREA&1l4ptW(QQOb=4(?WbbWH1j;p^+};VyBSq6u?U%C^GPbnVVWD6r;R&YkYlIxGP0Xxt7wYCmdLv0S&sbr@>N7(_r5sVA@IaE@( zjZ^%V8K*e};c&JfT3zl`yAD0RQ8s8Qq7{(EE<*mvgQh5S;(?!}^4ykm{fkT#2^6KB zRwGA?pAHIM;4(g2FJhyazAem;?0wCQ7&9@ruA&ezxAN(O9&zMp1A1Bw_C2O*ZAWY0 z@j>?JU;bC}gaA(t9#|>tEo>mW!Qn+MPJ6qcve@9$wZ8=UGrib$|pb`{s7Z)&D@olP}^Aphwu+MFbf9~SieIIcCz`)iz^ytbxiCbX zRFRoSBmiZLKG<*j-F~iSO0(0rzIJc7`T|os@ZepZH{~%{3__gE+bDrhQfop$XMEMV zd$iTJwdsM^Jm@?aS6zSrQSaj;8}=(vtM%?!lq`;<+R05tvCX9NaFH{i84soC0hF~D zgOG63)H}5zl?|vw{qrp2?+=8=M+Dikq7&@oFs!SHY1)3ZANNw(UQOob)9k7pK5c*A zB|KskWAZ-`V^*=5qR~G$HFAB)<)CVB_0#%0E`R57h4H7SLTQ+*JRO|MI`xf*RQuvs zulV7i(^Tq1=gy@{m7YgY)6A(N5oxIY21!u?_-$_{_huU zV!d|>glJLwHDQ9d*@{L5E#FGhzM%8n>H@L|*Jx4X>p#K1KjAVNJS+;LF_UC<7{10~ z8iGp39S%puk)Z6u{#@#RnVvR!&<%PdSnU=6E4=o4rLa7D7U@TjQxM_sqMO4aZX(SO zK7M}6!1a`tTrN=|@!5&!s_S%P8GU=aSQ9cd2vomnDI$ zPAd28%b9RcAD*;jFh5MzDw70DW>@M514Ml?lDApz#G;IF+sb}@?i6cA14W27<&*3< zqCe}KgU3{cJs|11sn2^dU+vBt+RI7D<6>TOZ#Pv*Ufy1uoE`3~E0sKzRL7_G=tb!c z&oH+m2&uJayWI@mnq$RowmeRlxW&6(yFLzu5J>%Vf)gVII$ z>n$`V@6$B~UmRs`0b-1ERq%VtAPlz5ZUacD#Et;<&IVSXl7P4_E z2NjPO=Pk2(wqs1pLrQ=9D+khb(?O%_(Ogm|e}I$45t6Q9LNk+Z&(Y!cf56knnQ6pU zz8s6;g125?%8n2-3{lr2%qcacd*-RkC|P=vh=iXDvR$HW_j5Bpk!jnv303z(96NtLkl(6RfgnX z#caY{Pc-oLftJ}KCr7!Hjq(&S)DgRBvzg%E7O&{0ac>h!am@mL!KGq!dfDBp2-?KR zRcf;`1A#asG~gGS$OLmZYw_V2&6(%;J9z~MmUvoh?Ayc&kok*lHd(zfKJ>zQ&<2f= zU@gHe)^B(f8{^|ab^=HSK8cb^yDO-31|m~l6pjeX5hK%*T>6#L+W}{vJ-24Y=I2}1 z=mY--PBpZjja|H}tp@rI@!ZpWKLG%9aGdaIeITRK&60}zCMwA>y>ROsTd)TpUl}OLD1@K}~))z0V zaoweVhhlE}UnYPpwd>z*ZwH;h>^KPXkFIpMPKUJKxDCYURKtmHa5BN0p}HM^7$Hsz zkU}l~%wrIB$Mjk+G$FA&&kJDOyE8fRVX>vI>k(jBnD~gdI{(iy+~osq0bbLUi3!h! zeiE->8P~xbU62s31@QKfUurf0dN62^uMdZ9kDTSoA~Xvvi}WfVM;3Bli1B7QWhWI} zDLoD+n}BkA{!!X-DK?or5Hc@K%426T$_1JtPa^9)cj%`?`rdcwV)ADT^YcGu3#7J4 z)Lt#un&&PrOWy5#_8Y5kS%1qajWNq4n65vFVU3z&I+w&6>JaG_@qE|m$D5ryEYO+) z;WGAK$fk}T_5}h{{`Ub^*_qVaaHs9_4bu`gn18A07DDHap1}t=G?Lm?rbjsSS zbW9y=NUNbz!ry1a;P88gBT*yYf}+qtc?{hDDDfSDhzLivEYOi50=v~DG#rnq5ttF= zqC8>Qh#$^0V5m(T`5ot$$@F3r6Fc(m%u8todDHdp)ns{_p0<7f0*()v6FQLr0>d>r z9wPp}d%T?AXYP-dNO*i&2{O1`9r%*t>Kg6i7Zwt{qe~_y@304`c86V=risedKk{D(T0% zQW=wWWdnm|xB-gIVqj=k{s$XZy0}T^+#5aypXMOA@nexni4>#PkP=S({lH#)Ch+as zx4|gbYNMa0f~OlChra93wmh4cZ#7mI7rwg81Yk4)%l51sT$qp8{zUN9^3b$QyXKgB zDEV)xGk&4f`TeVvKx!gh8KQt_21=h_wKbCUqG|p8Zb`I~#UKB+CX-i}&fP^Nb(}Xh z5Gjb2I5*Yr3=WhG=*})Q_OoO{A<-W)goP#jKC$dJm4|Ct$q^3I)oZ*|wAZaua!d#n zyVMH=VSL_+hqM%*$bkVeRBl;-IOGbHL!huD#b%mFhVerK1f%U^_Oo?Wv|Fq^KWZZs z5J%cL-d52WSRf?wi^xCcpl3oOiv;NNP@mGy({|z_?&P?|*Tf3y3@I@NKFxP2(K1F5TZ zaM<*uA3E2QV{{U`N9X`@!pUHiuP(jG{cs0#6-HP;`G&#y7pR#pT5#E1+YWx$vUyfm zdu62xMYuVNHr-1mKm{;CJAtkkBo-n)Vutek)k#40ZJ=Uw-9P7AtkR+FfA{|XzqK-Y b=ugt?s|l(tw$+mV-ZH3wH5F>*tRVjb+xF@0 literal 0 HcmV?d00001 diff --git a/openapi/sugarcrm/openapi.yaml b/openapi/sugarcrm/openapi.yaml new file mode 100644 index 000000000..020ed593f --- /dev/null +++ b/openapi/sugarcrm/openapi.yaml @@ -0,0 +1,7331 @@ +openapi: 3.0.1 +info: + title: SugarCRM REST API + x-ballerina-display: + label: SugarCRM + iconPath: "icon.png" + description: | + This is a generated connector for [SugarCRM REST API v12.0](https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_12.0/Integration/Web_Services/REST_API/) OpenAPI Specification. + SugarCRM REST API provides capabilities to effectively manage the customer lifecycle with a set of modules that support each stage of the funnel. + x-ballerina-init-description: | + The connector initialization requires setting the API credentials. + Create [SugarCRM account](https://www.sugarcrm.com/au/?utm_source=google.com&utm_medium=organic) and obtain tokens by following [this guide](https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_12.0/Integration/Web_Services/REST_API/#Authentication). + termsOfService: https://support.sugarcrm.com/Resources/Sugar_Cloud_Policy_Guide/ + contact: + name: SugarCRM Developer Advocacy Team + email: developers@sugarcrm.com + license: + name: MIT + version: '12.0' +servers: + - description: The base endpoint for the REST service. `Version` refers to the version of the API you are accessing. + url: / +components: + parameters: + Q: + in: query + name: q + description: A search expression, will search on this module. Cannot be used at the same time as a filter expression or id. + schema: + type: string + Max_Num: + in: query + name: max_num + description: A maximum number of records to return. The default is all records. + schema: + type: string + Offset: + in: query + name: offset + description: The number of records to skip over before records are returned. The default is 0. The parameter will be ignored if the max_num parameter is missing. + schema: + type: string + Fields: + in: query + name: fields + description: Comma delimited list of fields to return. The field date_modified will always be returned. `name,account_type,description` + schema: + type: string + Order_By: + in: query + name: order_by + description: How to sort the returned records, in a comma delimited list with the direction appended to the column name after a colon. `name:DESC,account_type:DESC,date_modified:ASC` + schema: + type: string + Favourites: + in: query + name: favorites + description: Only fetch the current users favorited records. + schema: + type: boolean + My_Items: + in: query + name: my_items + description: Only fetch items assigned to the current user. + schema: + type: boolean + Filter: + in: query + name: filter + description: The [filter expression](https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_11.3/Integration/Web_Services/REST_API/End + schema: + type: array + items: + type: string + Filter_ID: + in: query + name: filter_id + description: Identifier for a preexisting filter. If filter is also set, the two filters are joined with an AND. + schema: + type: string + View: + in: query + name: view + description: Instead of defining the fields argument, the view argument can be used instead. The field list is constructed at the server side based on the view definition which is requested. This argument can be used in combination with the fields argument. + schema: + type: string + Deleted: + in: query + name: deleted + description: Boolean to show deleted records in the result set. + schema: + type: boolean + Nulls_Last: + in: query + name: nulls_last + description: Boolean to return records with null values in order_by fields last in the result set. + schema: + type: boolean + schemas: + FilterOptions: + type: object + properties: + filter: + type: array + items: + type: object + description: The [filter expression](https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_11.3/Integration/Web_Services/REST_API/Endpoints/Accountsrecordlinklink_namefilter_GET/#Filter_Expressions). + filter_id: + type: string + description: Identifier for a preexisting filter. If filter is also set, the two filters are joined with an AND. + max_num: + type: integer + description: A maximum number of records to return. Default is 20. + default: 20 + offset: + type: integer + description: The number of records to skip over before records are returned. Default is 0. + fields: + type: string + description: Comma delimited list of fields to return. The field date_modified will always be returned. This argument can be combined with the view argument. + Example `name,account_type,description` + view: + type: string + description: Instead of defining the fields argument, the view argument can be used instead. The field list is constructed at the server side based on the view definition which is requested. + This argument can be used in combination with the fields argument. Common views are "record" and "list". Example- `record ` + order_by: + type: string + description: How to sort the returned records, in a comma delimited list with the direction appended to the column name after a colon. Example- `name:DESC,account_type:DESC,date_modified:ASC` + q: + type: string + description: A search expression, will search on this module. Cannot be used at the same time as a filter expression or id. + deleted: + type: boolean + description: Boolean to show deleted records in the result set. + SearchOptions: + type: object + properties: + max_num: + type: integer + description: A maximum number of records to return. Default is 20. + default: 20 + offset: + type: integer + description: The number of records to skip over before records are returned. Default is 0. + q: + type: string + description: A search expression, will search on this module. Cannot be used at the same time as a filter expression or id. + sort: + type: array + items: + {} + description: Wether or not to return highlighted results. Default is true. + highlights: + type: boolean + description: A search expression, will search on this module. Cannot be used at the same time as a filter expression or id. + module_list: + type: string + description: Comma delimited list of modules to search. If omitted, all search enabled modules will be queried. + FilteredRecordDetails: + type: object + properties: + next_offset: + type: integer + description: Displays the next offset for retrieval of additional results. -1 will be returned when there are no more records. + records: + type: array + items: + {} + description: An array of results containing matched records + AWSConfig: + type: object + properties: + aws_connect_instance_name: + type: string + description: The name of the AWS Connect instance + aws_connect_region: + type: string + description: The region assigned to the AWS Connect instance + SuccessResponseStatus: + type: object + properties: + success: + type: boolean + description: The success status + LicenseLimitData: + type: object + properties: + default_limit: + type: integer + limit_enforced: + type: integer + default_license_type: + type: string + seats: + type: object + properties: + CURRENT: + type: integer + SUGAR_SERVE: + type: integer + SUGAR_SELL: + type: integer + available_seats: + type: object + properties: + CURRENT: + type: integer + SUGAR_SERVE: + type: integer + SUGAR_SELL: + type: integer + PackageManagerList: + type: object + properties: + packages: + type: array + items: + $ref: '#/components/schemas/Package' + Package: + type: object + properties: + name: + type: string + version: + type: string + type: + type: string + published_date: + type: string + description: + type: string + uninstallable: + type: boolean + file_install: + type: string + file: + type: string + enabled: + type: string + id: + type: string + installed: + type: boolean + unFile: + type: string + FileUploadResponse: + type: object + properties: + file_install: + type: string + unFile: + type: string + SuccessResponseID: + type: object + properties: + id: + type: string + SearchBackendStatus: + type: object + properties: + available: + type: boolean + enabled_modules: + type: array + items: + type: string + FreeBusyData: + type: object + properties: + id: + type: string + module: + type: string + freebusy: + type: array + items: + $ref: '#/components/schemas/FreeBusySchedule' + FreeBusySchedule: + type: object + properties: + start: + type: string + end: + type: string + DashboardData: + type: object + properties: + dashboard_module: + type: string + description: The module dashboard belongs to (e.g. Home, Cases, Accounts) + dashboard: + type: string + description: The dashboard name (e.g. portal-home) + securitySchemes: + OAuth2: + type: oauth2 + description: Azure Active Directory OAuth2 Flow + flows: + password: + tokenUrl: https://rest//oauth2/token + scopes: + user_impersonation: impersonate your user account +security: + - OAuth2: [] +tags: + - name: module + description: Endpoint paths relating to the ModuleApi + - name: relate + description: Endpoint paths relating to the RelateApi +paths: + /{module}: + get: + description: Return a set of records filtered by an expression. + operationId: list Records + tags: + - ModuleApi + parameters: + - name: module + in: path + description: The name of the module. + required: true + schema: + type: string + - $ref: "#/components/parameters/Filter" + - $ref: "#/components/parameters/Filter_ID" + - $ref: "#/components/parameters/Q" + - $ref: "#/components/parameters/Max_Num" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Order_By" + - $ref: "#/components/parameters/Deleted" + - $ref: "#/components/parameters/View" + - $ref: "#/components/parameters/Nulls_Last" + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/FilteredRecordDetails' + post: + description: Create a new record of the specified type + operationId: create Record + tags: + - ModuleApi + parameters: + - name: module + in: path + description: The name of the module. + required: true + schema: + type: string + requestBody: + description: Filter options + content: + application/json: + {} + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + /{module}/filter: + post: + description: Return a set of records filtered by an expression. + The filter can be applied to multiple fields and have multiple and/or conditions in it. + operationId: list filtered records + tags: + - DataArchiverFilterApi + parameters: + - name: module + in: path + description: The name of the module. + required: true + schema: + type: string + requestBody: + description: Filter options + content: + application/json: + schema: + $ref: '#/components/schemas/FilterOptions' + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/FilteredRecordDetails' + /{module}/{record}: + get: + description: Returns a single record + operationId: retrieve Record + tags: + - ModuleApi + parameters: + - name: module + in: path + description: The name of the module. + required: true + schema: + type: string + - name: record + in: path + description: The record id. + required: true + schema: + type: string + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + put: + description: Update a record of the specified type + operationId: update Record + tags: + - ModuleApi + parameters: + - name: module + in: path + description: The name of the module. + required: true + schema: + type: string + - name: record + in: path + description: The record id. + required: true + schema: + type: string + requestBody: + description: Record Details + content: + application/json: + schema: + {} + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + delete: + description: Delete a record of the specified type + operationId: delete Record + tags: + - ModuleApi + parameters: + - name: module + in: path + description: The name of the module. + required: true + schema: + type: string + - name: record + in: path + description: The record id. + required: true + schema: + type: string + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponseID' + /{module}/{record}/audit: + get: + description: View audit log in record view + operationId: view Change Log + tags: + - AuditApi + parameters: + - name: module + in: path + description: The name of the module. + required: true + schema: + type: string + - name: record + in: path + description: The record id. + required: true + schema: + type: string + - $ref: "#/components/parameters/Max_Num" + - $ref: "#/components/parameters/Offset" + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/FilteredRecordDetails' + /globalsearch: + post: + description: Expose the global search capability using solely the Elasticsearch backend as an alternative to the /search endpoint. + operationId: global Search Elasticsearch + tags: + - GlobalSearchApi + requestBody: + description: Filter options + content: + application/json: + schema: + $ref: '#/components/schemas/SearchOptions' + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/FilteredRecordDetails' + /search: + get: + description: Globally search records + operationId: global Search + tags: + - UnifiedSearchApi + parameters: + - $ref: "#/components/parameters/Q" + - $ref: "#/components/parameters/Max_Num" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Order_By" + - $ref: "#/components/parameters/Favourites" + - $ref: "#/components/parameters/My_Items" + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/FilteredRecordDetails' + /Calls: + post: + description: Create a single event or a series of event records of the specified type + operationId: create Call Event + tags: + - CallsApi + requestBody: + description: The name value list of fields to populate. + required: true + content: + application/json: + {} + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + /Calls/{record}: + put: + description: Update a calendar event record of the specified type. + tags: + - CallsApi + operationId: update Call Event + parameters: + - name: record + in: path + description: The record id. + required: true + schema: + type: string + - name: all_recurrences + in: query + description: Flag to update all events in a series. + schema: + type: boolean + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + delete: + description: Deletes either a single event record or a series of event records. + tags: + - CallsApi + operationId: delete Call Event + parameters: + - name: record + in: path + description: The record id. + required: true + schema: + type: string + - name: all_recurrences + in: query + description: Flag to delete all events in a series. + schema: + type: boolean + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponseID' + # /Cases/clients/portal: + # put: + # description: Ssets a case as 'Requested for Close' in the portal on a Sugar Serve instance. + # operationId: set case as Requested for Close + # tags: + # - CallsApi + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + /CommentLog/{record}: + get: + description: Returns a single parent record of the given commentlog + operationId: retrieve CommentLog Parent + tags: + - CommentLogApi + parameters: + - name: record + in: path + description: CommentLog ID + required: true + schema: + type: string + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + /ConsoleConfiguration/config: + post: + description: Saves configuration changes in the database. + tags: + - ConsoleConfigModuleApi + operationId: config Save + requestBody: + description: Update account payload + content: + application/json: + {} + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + # put: + # description: Creates the config entries for the ConsoleConfiguration module + # operationId: ConsoleConfigModuleApi-PUT-configSave + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + /ConsoleConfiguration/default-metadata: + get: + description: Return the original metadata for the module. + operationId: get Default Metadata + tags: + - ConsoleConfigDefaultMetaDataApi + parameters: + - name: modules + in: query + description: Comma-separated module names + required: true + schema: + type: string + - name: type + in: query + description: The type of the desired metadata. The following types are supported- 'filter', 'layout', 'menu', 'view'. + required: true + schema: + type: string + - name: name + in: query + description: The name of the metadata. Examples- 'list', 'record', or 'multi-line-list'. + required: true + schema: + type: string + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + /Contact/{record}/Cases: + get: + description: Get a contact's related cases, filtered by an expression, which are accessible to a contact with portal visibility. + operationId: get Contact Cases + tags: + - CasesFilterApi + parameters: + - name: record + in: path + description: Contact ID + required: true + schema: + type: string + - $ref: "#/components/parameters/Filter" + - $ref: "#/components/parameters/Filter_ID" + - $ref: "#/components/parameters/Max_Num" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Order_By" + - $ref: "#/components/parameters/Deleted" + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/FilteredRecordDetails' + /Contacts/{record}/freebusy: + get: + description: Returns a list of time slots for which the specified person is busy. + operationId: get Free Busy Schedule + tags: + - ContactsApi + parameters: + - name: record + in: path + description: Contact ID + required: true + schema: + type: string + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/FreeBusyData' + /Currencies: + get: + description: Return the Currencies defined in the application + operationId: get currencies + tags: + - CurrenciesFilterApi + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/FilteredRecordDetails' + # /Dashboards/Activities: + # get: + # description: List current user's filtered Activity Stream dashboards. + # operationId: get Dashboards + # tags: + # - DashboardListApi + # # requestBody: + # # description: Amazon Web Services configs + # # content: + # # application/json: + # # schema: + # # $ref: '#/components/schemas/FilterOptions' + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/FilteredRecordDetails' + # /Dashboards/{id}/restore-metadata: + # put: + # description: Restores the metadata for a module's dashboard to the default metadata. + # operationId: restore Metadata + # tags: + # - DashboardDefaultMetadataApi + # parameters: + # - name: id + # in: path + # description: Dashboard ID + # required: true + # schema: + # type: string + # # requestBody: + # # description: Amazon Web Services configs + # # content: + # # application/json: + # # schema: + # # $ref: '#/components/schemas/DashboardData' + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + /Users: + get: + description: Return a set of User records filtered by an expression. + operationId: get Users + tags: + - PersonFilterApi + parameters: + - $ref: "#/components/parameters/Filter" + - $ref: "#/components/parameters/Filter_ID" + - $ref: "#/components/parameters/Q" + - $ref: "#/components/parameters/Max_Num" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Order_By" + - $ref: "#/components/parameters/Deleted" + - $ref: "#/components/parameters/View" + - $ref: "#/components/parameters/Nulls_Last" + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/FilteredRecordDetails' + /Users/{record}: + delete: + description: Delete a User record + operationId: delete User + tags: + - UsersApi + parameters: + - name: record + in: path + description: User ID + required: true + schema: + type: string + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponseID' + /Users/{record}/freebusy: + get: + description: Retrieve a list of calendar event start and end times for specified person + operationId: get User Free Busy Schedule + tags: + - UsersApi + parameters: + - name: record + in: path + description: User ID + required: true + schema: + type: string + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/FreeBusyData' + /Meetings: + post: + description: Create a single event record or a series of event records + operationId: create Calendar Event + tags: + - MeetingsApi + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + /Meetings/{record}: + put: + description: Update a single event record or a series of event records + operationId: update Calendar Event + tags: + - MeetingsApi + parameters: + - name: record + in: path + description: Meeting ID + required: true + schema: + type: string + - name: all_recurrences + in: query + description: Flag to update all events in a series. + schema: + type: boolean + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + delete: + description: Delete a single event record or a series of event records + operationId: delete Calendar Event + tags: + - MeetingsApi + parameters: + - name: record + in: path + description: Meeting ID + required: true + schema: + type: string + - name: all_recurrences + in: query + description: Flag to delete all events in a series. + schema: + type: boolean + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponseID' + /Meetings/{record}/external: + get: + description: Retrieve info about launching an external meeting + operationId: get External Meeting Info + tags: + - MeetingsApi + parameters: + - name: record + in: path + description: Meeting ID + required: true + schema: + type: string + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + # /Notifications: + # get: + # description: List of all records in this module + # operationId: NotificationsFilterApi-GET-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + /Opportunities/{record}: + put: + description: Update a record of the specified type + operationId: update Opportunity + tags: + - OpportunitiesApi + parameters: + - name: record + in: path + description: Opportunity ID + required: true + schema: + type: string + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + /Leads: + post: + description: Create a Lead with the optional post-save actions for Convert Target/Prospect and Create Lead from Email operations + operationId: create Lead + tags: + - LeadsApi + parameters: + - name: prospect_id + in: query + description: Pass a prospect id if Lead is being created as part of a Convert Target/Prospect process + required: true + schema: + type: string + - name: inbound_email_id + in: query + description: Pass an inbound email id if Lead is being created from an Email + required: true + schema: + type: string + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + /Leads/{leadId}/convert: + post: + description: Convert Lead to a Contact and optionally link it to a new or existing module such as an Account or Opportunity + operationId: convert Lead + tags: + - LeadConvertApi + parameters: + - name: leadId + in: path + description: Lead ID + required: true + schema: + type: string + requestBody: + description: An object containing the Contacts module to be created as part of the conversion, along with (optionally) any modules that this new Contact record is to be related to. + content: + application/json: + schema: + type: object + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + /Leads/{record}/freebusy: + get: + description: >- + Retrieve a list of calendar event start and end times for specified + person + operationId: get Lead Free Busy Schedule + tags: + - LeadsApi + parameters: + - name: record + in: path + description: Lead ID + required: true + schema: + type: string + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/FreeBusyData' + /Leads/register: + post: + description: Create lead + operationId: create Lead Record + tags: + - RegisterLeadApi + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + properties: + modules: + type: object + properties: + {} + /Accounts/{record}/link/{link_name}/filter: + get: + description: Lists related filtered records. + operationId: list filtered Related records + tags: + - AccountsRelateApi + parameters: + - name: link_name + in: path + description: a link name + required: true + schema: + type: string + - name: record + in: path + description: a record name + required: true + schema: + type: string + - $ref: "#/components/parameters/Filter" + - $ref: "#/components/parameters/Max_Num" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Fields" + - $ref: "#/components/parameters/Order_By" + - $ref: "#/components/parameters/View" + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/FilteredRecordDetails' + # /Accounts/{record}/opportunity_stats: + # get: + # description: Get opportunity statistics for current record + # operationId: get opportunity Stats + # tags: + # - AccountsApi + # parameters: + # - name: record + # in: path + # description: The record ID of the Account from which to get Opportunity Stats + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + /Activities/filter: + get: + description: Get a filtered list of homepage activities for a user + operationId: get Home Activities + tags: + - ActivitiesApi + parameters: + - $ref: "#/components/parameters/Max_Num" + - $ref: "#/components/parameters/Offset" + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/FilteredRecordDetails' + # post: + # description: Lists filtered records. + # operationId: NotesFilterApi-POST-filterList + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /integrate/{module}/{lhs_sync_key_field_name}/{lhs_sync_key_field_value}/link/{link_name}/{rhs_sync_key_field_name}/{rhs_sync_key_field_value}: + # post: + # description: >- + # Create a relationship based on fields.n If both the + # LHS and RHS records can be found with the respective + # fields,n then relate the RHS record to the LHS + # record. + # operationId: IntegrateRelateApi-POST-relateByFields + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: rhs_sync_key_field_value + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: rhs_sync_key_field_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: lhs_sync_key_field_value + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: lhs_sync_key_field_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # delete: + # description: >- + # Remove a relationship based on fields.n If both the + # LHS and RHS records can be found with the respective + # fields,n and those records are related, then remove + # the relationship of the RHS record to the LHS record. + # operationId: IntegrateRelateApi-DELETE-unrelateByFields + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: rhs_sync_key_field_value + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: rhs_sync_key_field_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: lhs_sync_key_field_value + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: lhs_sync_key_field_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/children: + # get: + # description: This method returns children categories for selected record + # operationId: TreeApi-GET-children + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/collection/{collection_name}: + # get: + # description: Lists collection records. + # operationId: RelateCollectionApi-GET-getCollection + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: collection_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/collection/{collection_name}/count: + # get: + # description: Counts collection records. + # operationId: RelateCollectionApi-GET-getCollectionCount + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: collection_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/favorite: + # put: + # description: This method sets a record of the specified type as a favorite + # operationId: ModuleApi-PUT-setFavorite + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # delete: + # description: This method unsets a record of the specified type as a favorite + # operationId: ModuleApi-DELETE-unsetFavorite + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/file: + # get: + # description: Gets a listing of files related to a field for a module record. + # operationId: FileApi-GET-getFileList + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/file/{field}: + # get: + # description: >- + # Gets the contents of a single file related to a field for a module + # record. + # operationId: FileApi-GET-getFile + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Saves a file. The file can be a new file or a file override. + # operationId: FileApi-POST-saveFilePost + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # delete: + # description: Removes a file from a field. + # operationId: FileApi-DELETE-removeFile + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: >- + # Saves a file. The file can be a new file or a file override. (This is an + # alias of the POST method save.) + # operationId: FileApi-PUT-saveFilePut + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/link: + # post: + # description: Relates existing records to this module. + # operationId: RelateRecordApi-POST-createRelatedLinks + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/link/{link_name}/filter: + # get: + # description: Lists related filtered records. + # operationId: RelateApi-GET-filterRelated + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/link/{link_name}: + # post: + # description: Create a single record and relate it to this module + # operationId: RelateRecordApi-POST-createRelatedRecord + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/link/{link_name}/{remote_id}: + # get: + # description: Fetch a single record related to this module + # operationId: RelateRecordApi-GET-getRelatedRecord + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: remote_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Relates an existing record to this module + # operationId: RelateRecordApi-POST-createRelatedLink + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: remote_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: 'Updates relationship specific information ' + # operationId: RelateRecordApi-PUT-updateRelatedLink + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: remote_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # delete: + # description: Deletes a relationship between two records + # operationId: RelateRecordApi-DELETE-deleteRelatedLink + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: remote_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/link/{link_name}/add_record_list/{remote_id}: + # post: + # description: Relates existing records from a record list to this record. + # operationId: RelateRecordApi-POST-createRelatedLinksFromRecordList + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: remote_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/link/{link_name}/filter/count: + # get: + # description: Lists related filtered records. + # operationId: RelateApi-GET-filterRelatedCount + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/link/{link_name}/leancount: + # get: + # description: >- + # Gets the "lean" count of related items.The count should always + # be in the range: 0..max_num. The response has a boolean flag + # "has_more" that defines if there are more rows, than max_num + # parameter value. + # operationId: RelateApi-GET-filterRelatedLeanCount + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/link/activities/filter: + # get: + # description: This method retrieves a filtered list of a record's activities + # operationId: ActivitiesApi-GET-getRecordActivities + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/link/commentlog_link: + # post: + # description: Add a comment to this module's record + # operationId: CommentLogRelateRecordApi-POST-addComment + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/link/history: + # get: + # description: Get the history records for a specific record + # operationId: HistoryApi-GET-filterModuleList + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/link/related_activities: + # get: + # description: Get the related activity records for a specific record + # operationId: RelatedActivitiesApi-GET-getRelatedActivities + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/moveafter/{target}: + # put: + # description: This method record as next sibling of target + # operationId: TreeApi-PUT-moveAfter + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: target + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/movebefore/{target}: + # put: + # description: This method record as previous sibling of target + # operationId: TreeApi-PUT-moveBefore + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: target + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/movefirst/{target}: + # put: + # description: This method record as first child of target + # operationId: TreeApi-PUT-moveFirst + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: target + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/movelast/{target}: + # put: + # description: This method record as last child of target + # operationId: TreeApi-PUT-moveLast + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: target + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/next: + # get: + # description: This method returns next sibling of selected record + # operationId: TreeApi-GET-next + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/parent: + # get: + # description: This method returns parent node of selected record + # operationId: TreeApi-GET-getParent + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/path: + # get: + # description: This method returns full path of selected record + # operationId: TreeApi-GET-path + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/pii: + # get: + # description: Returns pii fields + # operationId: ModuleApi-GET-getPiiFields + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/prev: + # get: + # description: This method returns previous sibling of selected record + # operationId: TreeApi-GET-prev + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/subscribe: + # post: + # description: >- + # This method subscribes the user to the current record, for activity + # stream updates. + # operationId: SubscriptionsApi-POST-subscribeToRecord + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/unfavorite: + # put: + # description: This method unsets a record of the specified type as a favorite + # operationId: ModuleApi-PUT-unsetFavorite + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/unsubscribe: + # delete: + # description: >- + # This method unsubscribes the user from the current record, for activity + # stream updates. + # operationId: SubscriptionsApi-DELETE-unsubscribeFromRecord + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{record}/vcard: + # get: + # description: An API to download a contact as a vCard. + # operationId: vCardApi-GET-vCardDownload + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/{root}/tree: + # get: + # description: This method returns formatted tree for selected root + # operationId: TreeApi-GET-tree + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: root + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/Activities/filter: + # get: + # description: This method retrieves a filtered list of a module's activities + # operationId: ActivitiesApi-GET-getModuleActivities + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/MassUpdate: + # put: + # description: An API to handle mass update. + # operationId: MassUpdateApi-PUT-massUpdate + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # delete: + # description: An API to handle mass delete. + # operationId: MassUpdateApi-DELETE-massDelete + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/append/{target}: + # post: + # description: This method append record to target as last child + # operationId: TreeApi-POST-append + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: target + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/audit/export: + # get: + # description: Export Audit records for module + # operationId: AuditApi-GET-exportAudit + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/chart/pipeline/{timeperiod_id}/{type}: + # get: + # description: Get the current opportunity pipeline data for the current timeperiod + # operationId: PipelineChartApi-GET-pipeline + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: type + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: timeperiod_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/config: + # get: + # description: Retrieves the config settings for a given module + # operationId: KBContentsConfigApi-GET-config + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Creates the config entries for the given module + # operationId: ConfigModuleApi-POST-configSave + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: Updates the config entries for given module + # operationId: ConfigModuleApi-PUT-configSave + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /KBContents/config: + # post: + # description: Creates the config entries for the KBContents module. + # operationId: KBContentsConfigApi-POST-configSave + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: Updates the config entries for the KBContents module + # operationId: KBContentsConfigApi-PUT-configSave + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/filter/count: + # get: + # description: Lists filtered records. + # operationId: NotesFilterApi-GET-getFilterListCount + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Lists filtered records. + # operationId: NotesFilterApi-POST-filterListCount + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/customfield: + # post: + # description: This method creates a new custom field of the specified module + # operationId: FieldApi-POST-createCustomField + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/customfield/{field}: + # delete: + # description: This method deletes the custom field of specified module + # operationId: FieldApi-DELETE-deleteCustomField + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/duplicateCheck: + # post: + # description: Check for duplicate records within a module + # operationId: DuplicateCheckApi-POST-checkForDuplicates + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/enum/{field}: + # get: + # description: This method returns enum values for a specified field + # operationId: ModuleApi-GET-getEnumValues + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/export/{record_list_id}: + # get: + # description: >- + # Returns a record set in CSV format along with HTTP headers to indicate + # content type. + # operationId: ExportApi-GET-export + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record_list_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/favorites: + # get: + # description: Get all the favorite items in alphabetical order + # operationId: FavoritesApi-GET-getFavoriteRecords + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Get all the favorite items in alphabetical order + # operationId: FavoritesApi-POST-getFavoriteRecords + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/file/vcard_import: + # post: + # description: Imports a person record from a vcard + # operationId: vCardApi-POST-vCardImport + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/insertafter/{target}: + # post: + # description: This method insert record as next sibling of target + # operationId: TreeApi-POST-insertAfter + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: target + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/insertbefore/{target}: + # post: + # description: This method insert record as previous sibling of target + # operationId: TreeApi-POST-insertBefore + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: target + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/prepend/{target}: + # post: + # description: This method prepend record to target as first child + # operationId: TreeApi-POST-prepend + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: target + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/recent-product: + # get: + # description: Get top 10 recently used items in reverse Chronological order + # operationId: RecentProductApi-GET-getRecentRecords + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Get top 10 recently used items in reverse Chronological order + # operationId: RecentProductApi-POST-getRecentRecords + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/record_list: + # post: + # description: An API to create and save lists of records + # operationId: RecordListApi-POST-recordListCreate + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/record_list/{record_list_id}: + # get: + # description: An API to fetch a previously created record list + # operationId: RecordListApi-GET-recordListGet + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record_list_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # delete: + # description: An API to delete an old record list + # operationId: RecordListApi-DELETE-recordListDelete + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record_list_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /integrate/{module}/{sync_key_field_name}/{sync_key_field_value}: + # get: + # description: Retrieve record with given field. + # operationId: IntegrateApi-GET-getByField + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: sync_key_field_value + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: sync_key_field_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: >- + # Upsert based on a field. If the record can be found with the provided + # field, then update.n If the record does not exist, + # then create it. Recommended use of PATCH HTTP verb. + # operationId: IntegrateApi-PUT-upsertByField + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: sync_key_field_value + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: sync_key_field_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # delete: + # description: Delete record with given field. + # operationId: IntegrateApi-DELETE-deleteByField + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: sync_key_field_value + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: sync_key_field_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # patch: + # description: >- + # Upsert based on a field. If the record can be found with the provided + # field, then update.n If the record does not exist, + # then create it. Recommended use of PATCH HTTP verb. + # operationId: IntegrateApi-PATCH-upsertByField + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: sync_key_field_value + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: sync_key_field_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/temp/file/{field}: + # post: + # description: Saves an image to a temporary folder. + # operationId: FileTempApi-POST-saveTempImagePost + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /{module}/temp/file/{field}/{temp_id}: + # get: + # description: Reads a temporary image and deletes it. + # operationId: FileTempApi-GET-getTempImage + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: temp_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + + /Administration/aws: + get: + description: Get configuration values for Amazon Web Services. + This is only available to administrators of Sugar Serve. + operationId: get AWS Config + tags: + - AdministrationApi + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/AWSConfig' + post: + description: Set configuration values for Amazon Web Services. + This is only available to administrators of Sugar Serve. + operationId: set AWS Config + tags: + - AdministrationApi + requestBody: + description: Amazon Web Services configs + content: + application/json: + schema: + $ref: '#/components/schemas/AWSConfig' + responses: + '200': + description: ok + content: + application/json: + schema: + $ref: '#/components/schemas/AWSConfig' + /Administration/config/{category}: + get: + description: Get configuration values for a given category. + This is only available to administrators. + operationId: get Config + tags: + - ConfigApi + - Admin + parameters: + - name: category + in: path + description: The category + required: true + schema: + type: string + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + post: + description: Set configuration values for a given category. + This is only available to administrators. + operationId: set Config + tags: + - ConfigApi + - Admin + parameters: + - name: category + in: path + description: The category + required: true + schema: + type: string + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + # /Administration/csp: + # get: + # description: Gets configuration settings for Content Security Policy + # operationId: AdministrationApi-GET-getCSPSConfig + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Sets configuration settings for Content Security Policy + # operationId: AdministrationApi-POST-setCSPConfig + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/denormalization/abort: + # post: + # description: Abort the current process + # operationId: DenormalizationApi-POST-abortProcess + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/denormalization/apply: + # post: + # description: Apply configuration + # operationId: DenormalizationApi-POST-runProcess + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/denormalization/configuration: + # get: + # description: Get modules and fields configuration + # operationId: DenormalizationApi-GET-getConfiguration + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/denormalization/fields: + # get: + # description: Get denormalized field list + # operationId: DenormalizationApi-GET-getDenormFieldList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/denormalization/pre-check: + # post: + # description: Check configuration + # operationId: DenormalizationApi-POST-preCheck + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/denormalization/status: + # get: + # description: Get the current process status + # operationId: DenormalizationApi-GET-getStatus + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/elasticsearch/indices: + # get: + # description: Returns the index statistics for the Elasticsearch backend. + # This endpoint is only available to administrators. + # operationId: get elastic Search Indices + # tags: + # - AdministrationApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/elasticsearch/mapping: + # get: + # description: Returns the mapping for every available index. + # This endpoint is only available to administrators. + # operationId: get elastic Search Mapping + # tags: + # - AdministrationApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/elasticsearch/queue: + # get: + # description: Returns the queue statistics for the Elasticsearch backend. + # This endpoint is only available to administrators. + # operationId: get elastic Search Queue + # tags: + # - AdministrationApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/elasticsearch/refresh/enable: + # post: + # description: Enable refresh_interval for all indices managed by SugarCRM. + # This endpoint is only available to administrators. + # operationId: Enable elastic Search Refresh + # tags: + # - AdministrationApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/elasticsearch/refresh/status: + # get: + # description: Returns the current refresh_interval for every index managed by SugarCRM. + # This endpoint is only available to administrators. + # operationId: get elastic Search Refresh Status + # tags: + # - AdministrationApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/elasticsearch/refresh/trigger: + # post: + # description: Trigger an explicit index refresh for all indices managed by SugarCRM. + # This endpoint is only available to administrators. + # operationId: Trigger elastic Search Refresh + # tags: + # - AdministrationApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/elasticsearch/replicas/enable: + # post: + # description: Enable replicas for all indices managed by SugarCRM. This endpoint is only available to administrators. + # This requires reindex_zero_replica to be enabled. + # operationId: Enable elastic Search Replicas + # tags: + # - AdministrationApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/elasticsearch/replicas/status: + # get: + # description: Returns the number of replicas for every index managed by SugarCRM. + # This endpoint is only available to administrators. + # operationId: get elastic Search Replicas Status + # tags: + # - AdministrationApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/elasticsearch/routing: + # get: + # description: Returns an overview of the current read and write indices per module. + # This routing information is based on the configured index routing strategies and the index configuration per module. + # Note that this output shows the default routing only as no context is available to determine dynamic routing strategies. + # This endpoint is only available to administrators. + # operationId: get elastic Search Routing + # tags: + # - AdministrationApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/idm/migration/disable: + # post: + # description: Disables Idm migrations. This endpoint is only available to administrators. + # operationId: disable Idm Migration + # tags: + # - AdministrationApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/SuccessResponseStatus' + # /Administration/idm/migration/enable: + # post: + # description: This endpoint enables Idm migrations. This endpoint is only available to administrators. + # operationId: enable Idm Migration + # tags: + # - AdministrationApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/SuccessResponseStatus' + # /Administration/idm/users: + # get: + # description: Fetch users for IDM migration + # operationId: get Idm Users + # tags: + # - IdmUserFilterApi + # - Admin + # # requestBody: + # # description: Amazon Web Services configs + # # content: + # # application/json: + # # schema: + # # $ref: '#/components/schemas/FilterOptions' + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/FilteredRecordDetails' + # /Administration/license/limits: + # get: + # description: This endpoint gets the license limits, the number of unused licensed seats for each license type. + # This endpoint is only available to administrators. + # operationId: get License Limits + # tags: + # - AdministrationApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/LicenseLimitData' + # /Administration/packages: + # get: + # description: Lists all packages in the system. + # operationId: get Packages + # tags: + # - PackageApiRest + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/PackageManagerList' + # post: + # description: Uploads a module loadable package via a multi-part form request. + # operationId: upload Package + # tags: + # - PackageApiRest + # requestBody: + # description: Amazon Web Services configs + # content: + # multipart/form-data: + # schema: + # type: object + # properties: + # upgrade_zip: + # format: binary + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/FileUploadResponse' + # # /Administration/packages/{id}: + # # delete: + # # description: Delete the given package by file hash + # # operationId: PackageApiRest-DELETE-deletePackage + # # parameters: + # # - name: id + # # in: path + # # description: '' + # # required: true + # # schema: + # # type: string + # # responses: + # # '200': + # # description: ok + # # content: + # # application/json: + # # schema: + # # type: object + # /Administration/packages/{id}/disable: + # get: + # description: Disable the specified package. + # Package id hash must be provided. Package id could be found in installed package list. + # operationId: disable Package + # tags: + # - PackageApiRest + # parameters: + # - name: id + # in: path + # description: Package ID + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/SuccessResponseID' + # /Administration/packages/{id}/enable: + # get: + # description: Enable the specified package. + # Package id hash must be provided. Package id could be found in installed package list. + # operationId: enable Package + # tags: + # - PackageApiRest + # parameters: + # - name: id + # in: path + # description: Package ID + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/SuccessResponseID' + # /Administration/packages/{file_install}/install: + # get: + # description: Installs the specified package. + # Package 'file_install' hash must be provided. file_install hash could be found in staging package list. + # operationId: install Package + # tags: + # - PackageApiRest + # parameters: + # - name: file_install + # in: path + # description: File install hash + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/SuccessResponseID' + # # /Administration/packages/{id}/installation-status: + # # get: + # # description: Get a package installation status + # # operationId: PackageApiRest-GET-getStatus + # # parameters: + # # - name: id + # # in: path + # # description: '' + # # required: true + # # schema: + # # type: string + # # responses: + # # '200': + # # description: ok + # # content: + # # application/json: + # # schema: + # # type: object + # /Administration/packages/{id}/uninstall: + # get: + # description: Uninstalls the specified package. + # Package id hash must be provided. Package id could be found in installed package list. + # operationId: unInstall Package + # tags: + # - PackageApiRest + # parameters: + # - name: id + # in: path + # description: Package ID + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/SuccessResponseID' + # /Administration/packages/installed: + # get: + # description: Lists installed packages in the system. + # operationId: get Installed Packages + # tags: + # - PackageApiRest + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/PackageManagerList' + # /Administration/packages/staged: + # get: + # description: Lists staged packages in the system. + # operationId: get Staged Packages + # tags: + # - PackageApiRest + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/PackageManagerList' + # /Administration/portalmodules: + # get: + # description: Gets an array of modules currently enabled for Sugar Portal. This endpoint is only available to administrators. + # operationId: get Portal Modules + # tags: + # - AdministrationApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: array + # items: + # type: string + # /Administration/search/fields: + # get: + # description: Lists the full text search configuration of all fields for the full text search enabled modules. + # This endpoint is only available to administrators. + # operationId: get search Fields + # tags: + # - AdministrationApi + # - Admin + # parameters: + # - name: module_list + # in: query + # description: Comma delimited list of modules to return. If omitted, all search enabled modules will be returned. + # required: false + # schema: + # type: string + # - name: search_only + # in: query + # description: When set, only searchable fields are returned. Defaults to false. + # required: false + # schema: + # type: boolean + # - name: order_by_boost + # in: query + # description: When set, a flat list of searchable fields is returned ordered by boost value. + # required: false + # schema: + # type: boolean + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/SuccessResponseStatus' + # /Administration/search/reindex: + # post: + # description: This endpoint schedules a reindex. + # This endpoint is only available to administrators. + # operationId: search Reindex + # tags: + # - AdministrationApi + # - Admin + # parameters: + # - name: module_list + # in: query + # description: Comma delimited list of modules to return. If omitted, all search enabled modules will be returned. + # required: false + # schema: + # type: string + # - name: clear_data + # in: query + # description: If set the records of the selected modules will be removed from the search backend and the schema will be recreated. + # All records from given modules will be queued to be reindexed which is orchestrated by the job queue. + # If not set, nothing is dropped from the search backend and all records of the selected modules are queued for reindexing. + # This is the default behavior. + # required: false + # schema: + # type: boolean + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/search/status: + # get: + # description: Returns the status of the search backend including a list of the activated full text search modules. + # This endpoint is only available to administrators. + # operationId: get search Status + # tags: + # - AdministrationApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/SearchBackendStatus' + # /Administration/settings/auth: + # get: + # description: Return auth settings. + # This is only available to administrators when IDM migration is turned on. + # operationId: get auth Settings + # tags: + # - AuthSettingsApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object #################### + # /Administration/settings/idmMode: + # delete: + # description: Switches IDM mode off. + # This is only available to administrators when IDM migration is turned on and intended for internal use for IDM integration. + # operationId: switch Off Idm Mode + # tags: + # - AuthSettingsApi + # - Admin + # # requestBody: + # # description: Amazon Web Services configs + # # content: + # # application/json: + # # schema: + # # type: object + # # properties: + # # upgrade_zip: + # # format: binary + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Switches IDM mode on. + # This is only available to administrators when IDM migration is turned on and intended for internal use for IDM integration. + # operationId: switch On Idm Mode + # tags: + # - AuthSettingsApi + # - Admin + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Administration/settings/validateIPAddress: + # get: + # description: Gets value of Validate IP Address setting + # operationId: AdministrationApi-GET-getValidateIPAddress + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Bugs: + # post: + # description: Deprecated api kept for backward compatibility + # operationId: BugsApi-POST-createRecord + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Calendar/calendars: + # post: + # description: Lists my calendars and others + # operationId: CalendarApi-POST-listCalendars + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Calendar/getCalendarDefs: + # post: + # description: Get Calendar Definitions. + # operationId: CalendarApi-POST-getCalendarDefs + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Calendar/getEvents: + # post: + # description: Retrieve events to show in calendar + # operationId: CalendarApi-POST-getEvents + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Calendar/getICalConfigurationsUID: + # post: + # description: getICalConfigurationsUID + # operationId: CalendarApi-POST-getICalConfigurationsUID + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Calendar/getICalData: + # get: + # description: getICalData + # operationId: CalendarApi-GET-getICalData + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Calendar/getICalPublishUrl: + # post: + # description: getICalPublishUrl + # operationId: CalendarApi-POST-getICalPublishUrl + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Calendar/invitee_search: + # get: + # description: This method searches for people to invite to an event + # operationId: CalendarApi-GET-inviteeSearch + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Calendar/modules: + # get: + # description: Get modules with Calendar Configurations + # operationId: CalendarApi-GET-getCalendarModules + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Calendar/updateRecord/{recordId}: + # post: + # description: update record + # operationId: CalendarApi-POST-updateRecord + # parameters: + # - name: recordId + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Calendar/usersAndTeams: + # get: + # description: Get Users And Teams + # operationId: CalendarApi-GET-getUsersAndTeams + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /CommentLog: + # post: + # description: This method is not available + # operationId: CommentLogApi-POST-accessBlocker + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # get: + # description: This method is not available + # operationId: CommentLogApi-GET-accessBlocker + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Dashboards/{id}/restore-tab-metadata: + # put: + # description: This method updates a tab on a dashboard to the default metadata + # operationId: DashboardDefaultMetadataApi-PUT-restoreDefaultMetadataForTabbedDashboard + # parameters: + # - name: id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /DataArchiver/{record}/run: + # post: + # description: Performs the archiving process for the given archive definition. This endpoint is only available to administrators. + # operationId: perform Archive + # tags: + # - DataArchiverApi + # parameters: + # - name: record + # in: path + # description: Data archiver ID + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /DocumentMerge/createDocument: + # post: + # description: Create the document + # operationId: DocumentMergeApi-POST-createDocument + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /DocumentMerge/getCurrencySymbol/{module}/{record_id}: + # get: + # description: Retrieves the currency symbol from a certain record + # operationId: DocumentMergeApi-GET-getCurrencySymbol + # parameters: + # - name: record_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /DocumentMerge/merge: + # post: + # description: Merge the document + # operationId: DocumentMergeApi-POST-merge + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Documents/{record}/file/{field}: + # post: + # description: Attaches a file to a field on a record. + # operationId: DocumentsFileApi-POST-saveFilePost + # parameters: + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: >- + # Saves a file. The file can be a new file or a file override. (This is an + # alias of the POST method save.) + # operationId: DocumentsFileApi-PUT-saveFilePut + # parameters: + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /EAPM/auth: + # get: + # description: Get auth info for an application + # operationId: AuthApi-GET-getAuthInfo + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /EmailAddresses: + # post: + # description: This method creates a new EmailAddresses record + # operationId: EmailAddressesApi-POST-createRecord + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /EmailAddresses/{record}: + # put: + # description: This method updates an EmailAddresses record + # operationId: EmailAddressesApi-PUT-updateRecord + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Emails: + # post: + # description: This method creates a new Emails record + # operationId: EmailsApi-POST-createRecord + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Emails/filter: + # get: + # description: Lists filtered records. + # operationId: EmailsFilterApi-GET-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Lists filtered records. + # operationId: EmailsFilterApi-POST-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Emails/{record}: + # get: + # description: Returns a single Emails record + # operationId: EmailsApi-GET-retrieveRecord + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: This method updates an Emails record + # operationId: EmailsApi-PUT-updateRecord + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Emails/{record}/link: + # post: + # description: Relates existing records to an email + # operationId: EmailsRelateRecordApi-POST-createRelatedLinks + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Emails/{record}/link/{link_name}/{remote_id}: + # post: + # description: Relates an existing record to an email + # operationId: EmailsRelateRecordApi-POST-createRelatedLink + # parameters: + # - name: remote_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # delete: + # description: Deletes a relationship between an email and another record + # operationId: EmailsRelateRecordApi-DELETE-deleteRelatedLink + # parameters: + # - name: remote_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Emails/{record}/link/{link_name}/add_record_list/{remote_id}: + # post: + # description: Relates existing records from a record list to an email + # operationId: EmailsRelateRecordApi-POST-createRelatedLinksFromRecordList + # parameters: + # - name: remote_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Emails/filter/count: + # get: + # description: Lists filtered records. + # operationId: EmailsFilterApi-GET-getFilterListCount + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Lists filtered records. + # operationId: EmailsFilterApi-POST-filterListCount + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /EmbeddedFiles/{record}/file/{field}: + # get: + # description: >- + # Gets the contents of a single file related to a field for a module + # record. + # operationId: EmbeddedFileApi-GET-getFile + # parameters: + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Saves a file. The file can be a new file or a file override. + # operationId: EmbeddedFileApi-POST-saveFilePost + # parameters: + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: >- + # Saves a file. The file can be a new file or a file + # override.n (This is an alias of the POST method + # save.) + # operationId: EmbeddedFileApi-PUT-saveFilePut + # parameters: + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /ExpressionEngine/{record}/related: + # get: + # description: >- + # Retrieve the Chart data for the given data in the Forecast Module + # (deprecated) + # operationId: RelatedValueApi-GET-deprecatedGetRelatedValues + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Retrieves the related fields for a given module record + # operationId: RelatedValueApi-POST-getRelatedValues + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /ExpressionEngine/functions: + # get: + # description: Retrieve the js for SugarLogic Expressions and Actions + # operationId: SugarLogicFunctionsApi-GET-getSugarLogicFunctions + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Filters: + # get: + # description: List of all records in this module + # operationId: FiltersFilterApi-GET-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Filters/{module_name}/used: + # get: + # description: This method gets the used filter for the current user + # operationId: PreviouslyUsedFiltersApi-GET-getUsed + # parameters: + # - name: module_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: This method sets the filter as used for the current user + # operationId: PreviouslyUsedFiltersApi-PUT-setUsed + # parameters: + # - name: module_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Filters/{module_name}/used/{record}: + # delete: + # description: This method deletes the used filter for the current user + # operationId: PreviouslyUsedFiltersApi-DELETE-deleteUsed + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: module_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /ForecastManagerWorksheets/{timeperiod_id}/{user_id}: + # get: + # description: Filter records from a single module + # operationId: ForecastManagerWorksheetsFilterApi-GET-ForecastManagerWorksheetsGet + # parameters: + # - name: user_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: timeperiod_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /ForecastManagerWorksheets/assignQuota: + # post: + # description: Assign the Quota for Users with out actually committing + # operationId: ForecastManagerWorksheetsApi-POST-assignQuota + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /ForecastManagerWorksheets/chart/{timeperiod_id}/{user_id}: + # get: + # description: Filter records and reformat data for chart presentation + # operationId: ForecastManagerWorksheetsFilterApi-GET-forecastManagerWorksheetsChartGet + # parameters: + # - name: user_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: timeperiod_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /ForecastManagerWorksheets/export: + # get: + # description: >- + # Returns a record set in CSV format along with HTTP headers to indicate + # content type. + # operationId: ForecastManagerWorksheetsExportApi-GET-export + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /ForecastManagerWorksheets/filter: + # get: + # description: Filter records from a single module + # operationId: ForecastManagerWorksheetsFilterApi-GET-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Filter records from a single module + # operationId: ForecastManagerWorksheetsFilterApi-POST-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /ForecastWorksheets/filter: + # get: + # description: Filter records from a single module + # operationId: ForecastWorksheetsFilterApi-GET-forecastWorksheetsGet + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Filter records from a single module + # operationId: ForecastWorksheetsFilterApi-POST-forecastWorksheetsGet + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /ForecastWorksheets/{record}: + # put: + # description: Updates a ForecastWorksheet model + # operationId: ForecastWorksheetsApi-PUT-forecastWorksheetSave + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /ForecastWorksheets/chart/{timeperiod_id}/{user_id}: + # get: + # description: Filter records and reformat data for chart presentation + # operationId: ForecastWorksheetsFilterApi-GET-forecastWorksheetsChartGet + # parameters: + # - name: user_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: timeperiod_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /ForecastWorksheets/export: + # get: + # description: >- + # Returns a record set in CSV format along with HTTP headers to indicate + # content type. + # operationId: ForecastWorksheetsExportApi-GET-export + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Forecasts: + # post: + # description: This method creates a new record of the specified type + # operationId: ForecastsModuleApi-POST-createRecord + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # get: + # description: Forecast list endpoint returns an empty set + # operationId: ForecastsApi-GET-returnEmptySet + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Forecasts/{timeperiod_id}/{user_id}/chart/{display_manager}: + # get: + # description: Retrieve the Chart data for the given data in the Forecast Module + # operationId: ForecastsChartApi-GET-chart + # parameters: + # - name: display_manager + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: user_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: timeperiod_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Forecasts/{timeperiod_id}/progressManager/{user_id}: + # get: + # description: Progress Manager data + # operationId: ForecastsProgressApi-GET-progressManager + # parameters: + # - name: user_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: timeperiod_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Forecasts/{timeperiod_id}/progressRep/{user_id}: + # get: + # description: Projected Rep data + # operationId: ForecastsProgressApi-GET-progressRep + # parameters: + # - name: user_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: timeperiod_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Forecasts/{timeperiod_id}/quotas/rollup/{user_id}: + # get: + # description: Returns the rollup quota for the user by timeperiod + # operationId: ForecastsApi-GET-getQuota + # parameters: + # - name: user_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: timeperiod_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Forecasts/config: + # get: + # description: Retrieves the config settings for a given module + # operationId: ForecastsConfigApi-GET-config + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Creates the config entries for the Forecasts module. + # operationId: ForecastsConfigApi-POST-forecastsConfigSave + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: Updates the config entries for the Forecasts module + # operationId: ForecastsConfigApi-PUT-forecastsConfigSave + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Forecasts/enum/selectedTimePeriod: + # get: + # description: forecast timeperiod + # operationId: ForecastsApi-GET-timeperiod + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Forecasts/filter: + # get: + # description: Filter records from a single module + # operationId: ForecastsFilterApi-GET-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Filter records from a single module + # operationId: ForecastsFilterApi-POST-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Forecasts/init: + # get: + # description: Returns forecasts initialization data and additional user data + # operationId: ForecastsApi-GET-forecastsInitialization + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Forecasts/orgtree/{user_id}: + # get: + # description: Gets managers and reportees of user + # operationId: ForecastsApi-GET-getOrgTree + # parameters: + # - name: user_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Forecasts/reportees/{user_id}: + # get: + # description: Gets reportees to a user by id + # operationId: ForecastsApi-GET-getReportees + # parameters: + # - name: user_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Forecasts/user/{user_id}: + # get: + # description: Returns selectedUser object for given user + # operationId: ForecastsApi-GET-retrieveSelectedUser + # parameters: + # - name: user_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /KBContents/filter: + # get: + # description: Lists filtered records. + # operationId: KBContentsFilterApi-GET-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /KBContents/{record}/link: + # post: + # description: Relates existing records to this module. + # operationId: KBContentsRelateRecordApi-POST-createRelatedLinks + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /KBContents/{record}/notuseful: + # put: + # description: This method votes a record of the specified type as not useful + # operationId: KBContentsUsefulnessApi-PUT-voteNotUseful + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /KBContents/{record}/related_documents: + # get: + # description: Get related documents for current record. + # operationId: KBContentsApi-GET-relatedDocuments + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /KBContents/{record}/useful: + # put: + # description: This method votes a record of the specified type as useful + # operationId: KBContentsUsefulnessApi-PUT-voteUseful + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /KBContents/duplicateCheck: + # post: + # description: Check for duplicate records within a module + # operationId: KBSDuplicateCheckApi-POST-checkForDuplicates + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Mail: + # post: + # description: Create Mail Item + # operationId: MailApi-POST-createMail + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Mail/address/validate: + # post: + # description: Validate One Or More Email Address + # operationId: MailApi-POST-validateEmailAddresses + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Mail/archive: + # post: + # description: Archive Mail Item + # operationId: MailApi-POST-archiveMail + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Mail/attachment: + # post: + # description: Saves a mail attachment. + # operationId: MailApi-POST-saveAttachment + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Mail/attachment/{file_guid}: + # delete: + # description: Removes a mail attachment + # operationId: MailApi-DELETE-removeAttachment + # parameters: + # - name: file_guid + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Mail/attachment/cache: + # delete: + # description: Clears the user's attachment cache directory + # operationId: MailApi-DELETE-clearUserCache + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Mail/recipients/find: + # get: + # description: Search For Email Recipients + # operationId: MailApi-GET-findRecipients + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Mail/recipients/lookup: + # post: + # description: Lookup Email Recipient Info + # operationId: MailApi-POST-recipientLookup + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Opportunities/config: + # post: + # description: Save the config settings for the Opportunities Module + # operationId: OpportunitiesConfigApi-POST-configSave + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Opportunities/enum/{field}: + # get: + # description: This method returns enum values for a specified field + # operationId: OpportunitiesEnumApi-GET-getEnumValues + # parameters: + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /OutboundEmail: + # post: + # description: This method creates a new OutboundEmail record + # operationId: OutboundEmailApi-POST-createRecord + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /OutboundEmail/{record}: + # put: + # description: This method updates an OutboundEmail record + # operationId: OutboundEmailApi-PUT-updateRecord + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /OutboundEmailConfiguration/list: + # get: + # description: A list of outbound email configurations + # operationId: OutboundEmailConfigurationApi-GET-listConfigurations + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /PdfManager: + # get: + # description: List of all records in this module + # operationId: PdfManagerFilterApi-GET-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /PdfManager/generate: + # get: + # description: Generate a PDF + # operationId: PdfManagerGeneratePdfApi-GET-generatePdf + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /ProductTemplates/tree: + # get: + # description: >- + # Returns a filterable tree structure of all Product Templates and Product + # Categories + # operationId: ProductTemplateTreeApi-GET-getTemplateTree + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: >- + # Returns a filterable tree structure of all Product Templates and Product + # Categories + # operationId: ProductTemplateTreeApi-POST-getTemplateTree + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Quotes/{record}/opportunity: + # post: + # description: Convert a Quote into another record + # operationId: QuoteConvertApi-POST-convertQuote + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Quotes/config: + # get: + # description: Retrieves the config settings for a given module + # operationId: QuotesConfigApi-GET-config + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Save the config settings for the Quotes Module + # operationId: QuotesConfigApi-POST-configSave + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Reports: + # get: + # description: Search Reports + # operationId: ReportsSearchApi-GET-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Reports/{record}/{export_type}: + # get: + # description: This method exports a report in the specified type + # operationId: ReportsExportApi-GET-exportRecord + # parameters: + # - name: export_type + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Reports/{record}/chart: + # get: + # description: An API to get chart data for a saved report + # operationId: ReportsApi-GET-getSavedReportChartById + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Reports/{record}/record_count: + # get: + # description: An API to get total number of filtered records from a saved report + # operationId: ReportsApi-GET-getRecordCount + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Reports/{record}/record_list: + # post: + # description: An API to create a record list from a saved report + # operationId: ReportsApi-POST-createRecordList + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Reports/{record}/records: + # get: + # description: An API to deliver filtered records from a saved report + # operationId: ReportsApi-GET-getReportRecords + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Reports/chart/{reportId}: + # post: + # description: Updates a ForecastWorksheet model + # operationId: ReportsDashletsApi-POST-getSavedReportChartById + # parameters: + # - name: reportId + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Reports/saved_reports: + # get: + # description: Returns items from the saved_reports table based on a few criteria + # operationId: ReportsDashletsApi-GET-getSavedReports + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /RevenueLineItems/{record}/quote: + # post: + # description: Convert a Revenue Line Item Into A Quote Record + # operationId: RevenueLineItemToQuoteConvertApi-POST-convertToQuote + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /RevenueLineItems/by_country: + # get: + # description: Get opportunities won by country + # operationId: RevenueLineItemsGlobeChartApi-GET-salesByCountry + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /RevenueLineItems/multi-quote: + # post: + # description: Convert a Revenue Line Item Into A Quote Record + # operationId: RevenueLineItemToQuoteConvertApi-POST-multiConvertToQuote + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /SugarLive/config: + # post: + # description: Creates the config entries for the SugarLive module + # operationId: SugarLiveConfigModuleApi-POST-configSave + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: Creates the config entries for the SugarLive module + # operationId: SugarLiveConfigModuleApi-PUT-configSave + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Tags/{record}: + # put: + # description: This method updates a record of the specified type + # operationId: TagsApi-PUT-updateRecord + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Teams/{record}/link: + # post: + # description: Relates existing records to this module. + # operationId: TeamsRelateRecordApi-POST-createRelatedLinks + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Teams/{record}/link/{link_name}/{remote_id}: + # post: + # description: Relates an existing record to this module + # operationId: TeamsRelateRecordApi-POST-createRelatedLink + # parameters: + # - name: remote_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # delete: + # description: Deletes a relationship between two records + # operationId: TeamsRelateRecordApi-DELETE-deleteRelatedLink + # parameters: + # - name: remote_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /TimePeriods/filter: + # get: + # description: Lists filtered records. + # operationId: TimePeriodsFilterApi-GET-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /TimePeriods/{date}: + # get: + # description: Return a Timeperiod by a given date + # operationId: TimePeriodsCurrentApi-GET-getTimePeriodByDate + # parameters: + # - name: date + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /TimePeriods/current: + # get: + # description: Return the Current Timeperiod + # operationId: TimePeriodsCurrentApi-GET-getCurrentTimePeriod + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + + # /Users/{record}/link: + # post: + # description: Relates existing records to this module. + # operationId: UsersRelateRecordApi-POST-createRelatedLinks + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /Users/{record}/link/{link_name}/{remote_id}: + # post: + # description: Relates an existing record to this module + # operationId: UsersRelateRecordApi-POST-createRelatedLink + # parameters: + # - name: remote_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # delete: + # description: Deletes a relationship between two records + # operationId: UsersRelateRecordApi-DELETE-deleteRelatedLink + # parameters: + # - name: remote_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: link_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /VCardDownload: + # get: + # description: An API to download a contact as a vCard. + # operationId: vCardApi-GET-vCardSave + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /VisualPipeline/config: + # post: + # description: Creates the config entries for the given module + # operationId: VisualPipelineApi-POST-configSave + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /actionButton/evaluateBPMEmailTemplate: + # post: + # description: Merges a BPM Email Template and returns the merged data + # operationId: ActionButtonApi-POST-evaluateBPMEmailTemplate + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /actionButton/evaluateCalculatedUrl: + # post: + # description: Evaluates a calculated URL expression and returns the result + # operationId: ActionButtonApi-POST-evaluateCalculatedUrl + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /actionButton/evaluateEmailTemplate: + # post: + # description: Merges a standard Sugar Email Template and returns the merged data + # operationId: ActionButtonApi-POST-evaluateEmailTemplate + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /actionButton/evaluateExpression: + # post: + # description: Evaluates an Sugar Expression and returns the result + # operationId: ActionButtonApi-POST-evaluateExpression + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /bulk: + # post: + # description: Run several API call in a sequence + # operationId: BulkApi-POST-bulkCall + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /collection/{collection_name}: + # get: + # description: Lists collection records. + # operationId: ModuleCollectionApi-GET-getCollection + # parameters: + # - name: collection_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /collection/{collection_name}/count: + # get: + # description: Counts collection records. + # operationId: ModuleCollectionApi-GET-getCollectionCount + # parameters: + # - name: collection_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /connector/twitter/{twitterId}: + # get: + # description: Gets current tweets for a user + # operationId: TwitterApi-GET-getTweets + # parameters: + # - name: twitterId + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /connector/twitter/currentUser: + # get: + # description: Gets current tweets for a user + # operationId: TwitterApi-GET-getCurrentUser + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /connectors: + # get: + # description: Gets connector information + # operationId: ConnectorApi-GET-getConnectors + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /css: + # get: + # description: Get (or generate) the css files for a platform and a theme + # operationId: ThemeApi-GET-getCSSURLs + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /css/preview: + # get: + # description: Compile the css for a platform and a theme just as a preview + # operationId: ThemeApi-GET-previewCSS + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /formulaBuilder/meta: + # post: + # description: Retrieve metadata needed by the Formula Builder component + # operationId: FormulaBuilderApi-POST-meta + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /genericsearch: + # post: + # description: Generic search + # operationId: GenericSearchApi-POST-genericSearch + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # get: + # description: Generic search + # operationId: GenericSearchApi-GET-genericSearch + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /help: + # get: + # description: Shows Help information + # operationId: HelpApi-GET-getHelp + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /help/exceptions: + # get: + # description: Shows the exceptions thrown by the API + # operationId: HelpApi-GET-getExceptionsHelp + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /integrate/{module}/{record_id}/{sync_key_field_name}/{sync_key_field_value}: + # put: + # description: Set synchronization key for a provided module and a record_id + # operationId: IntegrateApi-PUT-setSyncKey + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: sync_key_field_value + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: sync_key_field_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # patch: + # description: Set synchronization key for a provided module and a record_id + # operationId: IntegrateApi-PATCH-setSyncKey + # parameters: + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: sync_key_field_value + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: sync_key_field_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /lang/{lang}: + # get: + # description: Returns the labels for the application + # operationId: MetadataApi-GET-getLanguage + # parameters: + # - name: lang + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /lang/labels/dropdown: + # put: + # description: This method updates translations for items in a dropdown + # operationId: LanguageApi-PUT-updateDropdowns + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /lang/labels/module: + # put: + # description: This method updates translations for fields in a module + # operationId: LanguageApi-PUT-updateModules + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /lang/public/{lang}: + # get: + # description: Returns the public labels for the application + # operationId: MetadataApi-GET-getPublicLanguage + # parameters: + # - name: lang + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /locale: + # get: + # description: Gets locale options so UI can populate the corresponding dropdowns + # operationId: LocaleApi-GET-localeOptions + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /logger: + # post: + # description: Writes a message out to the log prefaced by a channel name + # operationId: LoggerApi-POST-logMessage + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /login/content: + # get: + # description: An API to receive marketing extra URLs + # operationId: MarketingExtrasApi-GET-getMarketingExtras + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /login/marketingContentUrl: + # get: + # description: Gets the SugarCRM marketing content URL + # operationId: MarketingExtrasApi-GET-getMarketingContentUrl + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /me: + # get: + # description: Returns current user + # operationId: CurrentUserApi-GET-retrieveCurrentUser + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: Updates current user + # operationId: CurrentUserApi-PUT-updateCurrentUser + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /me/following: + # get: + # description: This method retrieves all followed methods for the user. + # operationId: CurrentUserApi-GET-getMyFollowedRecords + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /me/password: + # post: + # description: Verifies current user's password + # operationId: CurrentUserApi-POST-verifyPassword + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: Updates current user's password + # operationId: CurrentUserApi-PUT-updatePassword + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /me/preference/{preference_name}: + # get: + # description: Returns a specific preference for the current user + # operationId: CurrentUserApi-GET-userPreference + # parameters: + # - name: preference_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: Update a specific preference for the current user + # operationId: CurrentUserApi-PUT-userPreferenceSave + # parameters: + # - name: preference_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # delete: + # description: Delete a specific preference for the current user + # operationId: CurrentUserApi-DELETE-userPreferenceDelete + # parameters: + # - name: preference_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # post: + # description: Create a preference for the current user + # operationId: CurrentUserApi-POST-userPreferenceSave + # parameters: + # - name: preference_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /me/preferences: + # get: + # description: Returns all the current user's stored preferences + # operationId: CurrentUserApi-GET-userPreferences + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: Mass Save Updated Preferences For a User + # operationId: CurrentUserApi-PUT-userPreferencesSave + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /metadata: + # post: + # description: >- + # This method will return all metadata for the system, filtered by the + # array of hashes sent to the server + # operationId: MetadataApi-POST-getAllMetadata + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # get: + # description: This method will return all metadata for the system + # operationId: MetadataApi-GET-getAllMetadata + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /metadata/{module}/{segment}: + # get: + # description: Gets the desired segment for the given module + # operationId: MetadataApi-GET-getModuleDataSegment + # parameters: + # - name: segment + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: module + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /metadata/_hash: + # get: + # description: This method will return the hash of all metadata for the system + # operationId: MetadataApi-GET-getAllMetadataHash + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /metadata/public: + # get: + # description: This method will return the metadata needed when not logged in + # operationId: MetadataApi-GET-getPublicMetadata + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /mfa/reset: + # put: + # description: Reset multi-factor authentication for user + # operationId: CurrentUserApi-PUT-mfaReset + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /mostactiveusers: + # get: + # description: Returns most active users + # operationId: MostActiveUsersApi-GET-getMostActiveUsers + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /oauth2/bwc/login: + # post: + # description: Bwc login for bwc modules. Internal usage only. + # operationId: OAuth2Api-POST-bwcLogin + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /oauth2/logout: + # post: + # description: OAuth2 logout. + # operationId: OAuth2Api-POST-logout + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /oauth2/sudo/{user_name}: + # post: + # description: Get an access token for another user + # operationId: OAuth2Api-POST-sudo + # parameters: + # - name: user_name + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /oauth2/token: + # post: + # description: OAuth2 token requests. + # operationId: OAuth2Api-POST-token + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /password/request: + # get: + # description: This method sends email requests to reset passwords + # operationId: PasswordApi-GET-requestPassword + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /ping/whattimeisit: + # get: + # description: An example API only responds with the current time in server format. + # operationId: PingApi-GET-ping + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Business_Rules: + # get: + # description: List of all records in this module + # operationId: PMSEBusinessRulesFilterApi-GET-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Business_Rules/{record}/brules: + # get: + # description: Exports a .pbr file with a Process Business Rules definition + # operationId: PMSEBusinessRules-GET-businessRuleDownload + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Business_Rules/file/businessrules_import: + # post: + # description: Imports a Process Business Rules definition from a .pbr file + # operationId: PMSEBusinessRules-POST-businessRulesImport + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Emails_Templates: + # get: + # description: List of all records in this module + # operationId: PMSEEmailsTemplatesFilterApi-GET-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Emails_Templates/{record}/etemplate: + # get: + # description: Exports a .pet file with a Process Email Templates definition + # operationId: PMSEEmailsTemplates-GET-emailTemplateDownload + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Emails_Templates/file/emailtemplates_import: + # post: + # description: Imports a Process Email Templates from a .pet file + # operationId: PMSEEmailsTemplates-POST-emailTemplatesImport + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Emails_Templates/variables/find: + # get: + # description: Get the variable list for a module + # operationId: PMSEEmailsTemplates-GET-findVariables + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox: + # get: + # description: Returns a list of Processes by user using filters + # operationId: PMSEEngineFilterApi-GET-filterListAllPA + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/{record}/file/{field}: + # get: + # description: Returns the process status image file + # operationId: PMSEImageGeneratorApi-GET-getFile + # parameters: + # - name: field + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/AdhocReassign: + # put: + # description: Update the process user associated to the process. DEPRECATED + # operationId: PMSEEngineApi-PUT-adhocReassign + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/AdhocReassign/{data}/{flowId}: + # get: + # description: Retrieve information for Change Process User window. DEPRECATED + # operationId: PMSEEngineApi-GET-getAdhoc + # parameters: + # - name: flowId + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: data + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/ReassignForm: + # put: + # description: >- + # Update the user assigned to the record associated to the process. + # DEPRECATED + # operationId: PMSEEngineApi-PUT-reassignRecord + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/ReassignForm/{data}/{flowId}: + # get: + # description: Retrieve information for Assign to new user window. DEPRECATED + # operationId: PMSEEngineApi-GET-getReassign + # parameters: + # - name: flowId + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: data + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/cancelCases: + # put: + # description: Call methods to cancel a process + # operationId: PMSEEngineApi-PUT-cancelCase + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/case/{id}/{idflow}: + # get: + # description: Retrieve information of the process record + # operationId: PMSEEngineApi-GET-selectCase + # parameters: + # - name: idflow + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/casesList: + # get: + # description: Returns a list with the processes for Process Management + # operationId: PMSECasesListApi-GET-selectCasesList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/changeCaseUser/{cas_id}: + # get: + # description: Retrieve information for Change Process User window. DEPRECATED + # operationId: PMSEEngineApi-GET-changeCaseUser + # parameters: + # - name: cas_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/clearLog/{typelog}: + # put: + # description: Clear the PMSE.log file log + # operationId: PMSECasesListApi-PUT-clearLog + # parameters: + # - name: typelog + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/delete_notes/{id}: + # delete: + # description: Deletes a note for a process + # operationId: PMSEEngineApi-DELETE-deleteNotes + # parameters: + # - name: id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/engine_claim: + # put: + # description: Claims the processes to the current user + # operationId: PMSEEngineApi-PUT-engineClaim + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/engine_route: + # put: + # description: >- + # Evaluates the response of the user form Show Process [Approve, Reject, + # Route] + # operationId: PMSEEngineApi-PUT-engineRoute + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/filter: + # get: + # description: Returns a list of Processes by user + # operationId: PMSEEngineFilterApi-GET-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/getLog: + # get: + # description: Return the text of the PMSE.log file + # operationId: PMSECasesListApi-GET-selectLogLoad + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/historyLog/{filter}: + # get: + # description: Returns the history log for a process + # operationId: PMSEEngineApi-GET-retrieveHistoryLog + # parameters: + # - name: filter + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/note_list/{cas_id}: + # get: + # description: Returns the notes list for a process + # operationId: PMSEEngineApi-GET-getNotes + # parameters: + # - name: cas_id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/reactivateFlows: + # put: + # description: Call methods to re-execute processes. DEPRECATED + # operationId: PMSEEngineApi-PUT-reactivateFlows + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/reassignFlows: + # put: + # description: Call methods to reassign processes + # operationId: PMSEEngineApi-PUT-reassignFlows + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/reassignFlows/{record}: + # get: + # description: Retrieve information to reassign processes + # operationId: PMSEEngineApi-GET-getReassignFlows + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/save_notes: + # post: + # description: Creates a new note for a process + # operationId: PMSEEngineApi-POST-saveNotes + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/settings: + # get: + # description: Retrieve settings for the PA engine + # operationId: PMSEEngineApi-GET-getSettingsEngine + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: Update settings for the PA engine + # operationId: PMSEEngineApi-PUT-putSettingsEngine + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/unattendedCases: + # get: + # description: Retrieves the processes to show on Unattended Process view + # operationId: PMSEEngineApi-GET-getUnattendedCases + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Inbox/userListByTeam/{id}: + # get: + # description: Retrieve users associated to a Team. DEPRECATED + # operationId: PMSEEngineApi-GET-userListByTeam + # parameters: + # - name: id + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Project: + # get: + # description: List of all records in this module + # operationId: PMSEProjectFilterApi-GET-filterList + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Project/{record}/dproject: + # get: + # description: Exports a .bpm file with a Process Definition + # operationId: PMSEProjectImportExportApi-GET-projectDownload + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Project/{record}/verify: + # get: + # description: Verifies whether the Process Definition has any pending processes + # operationId: PMSEProjectApi-GET-verifyRunningProcess + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Project/ActivityDefinition/{record}: + # get: + # description: Retrieves the definition data for an activity + # operationId: PMSEProjectApi-GET-getActivityDefinition + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: Updates the definition data for an activity + # operationId: PMSEProjectApi-PUT-putActivityDefinition + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Project/CrmData/{data}/{filter}: + # get: + # description: Retrieves information about Fields, Modules, Users, Roles, etc. + # operationId: PMSEProjectApi-GET-getCrmData + # parameters: + # - name: filter + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: data + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Project/CrmData/{record}/{filter}: + # put: + # description: Updates information about Fields, Modules, Users, Roles, etc. + # operationId: PMSEProjectApi-PUT-putCrmData + # parameters: + # - name: filter + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Project/EventDefinition/{record}: + # get: + # description: Retrieves the definition data for an event + # operationId: PMSEProjectApi-GET-getEventDefinition + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: Updates the definition data for an event + # operationId: PMSEProjectApi-PUT-putEventDefinition + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Project/GatewayDefinition/{record}: + # get: + # description: Retrieves the definition data for a gateway + # operationId: PMSEProjectApi-GET-getGatewayDefinition + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: Updates the definition data for a gateway + # operationId: PMSEProjectApi-PUT-putGatewayDefinition + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Project/file/project_import: + # post: + # description: Imports a Process Definition from a .bpm file + # operationId: PMSEProjectImportExportApi-POST-projectImport + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Project/project/{record}: + # get: + # description: Retrieves the schema data to be used by the Process Definition designer + # operationId: PMSEProjectApi-GET-retrieveCustomProject + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # put: + # description: Updates the schema data from the Process Definition designer + # operationId: PMSEProjectApi-PUT-updateCustomProject + # parameters: + # - name: record + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /pmse_Project/validateCrmData/{data}/{filter}: + # get: + # description: >- + # Validates whether BPM data exists in the system (Fields, Modules, Users, + # Roles, etc.) + # operationId: PMSEProjectApi-GET-validateCrmData + # parameters: + # - name: filter + # in: path + # description: '' + # required: true + # schema: + # type: string + # - name: data + # in: path + # description: '' + # required: true + # schema: + # type: string + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /recent: + # get: + # description: This method retrieves recently viewed records for the user. + # operationId: RecentApi-GET-getRecentlyViewed + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /rssfeed: + # get: + # description: Consumes an RSS Feed and returns the content of the feed to the client + # operationId: RSSFeedApi-GET-getFeed + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /swagger: + # get: + # description: Will return a .json file for use as a swagger doc or postman collection + # operationId: SwaggerApi-GET-generateSwagger + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /swagger/buildHelp: + # get: + # description: Will return a .json file for use as a swagger doc or postman collection + # operationId: SwaggerApi-GET-buildHelp + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # /theme: + # post: + # description: Update the customizable variables of a custom theme + # operationId: ThemeApi-POST-updateCustomTheme + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object + # get: + # description: Get the customizable variables of a custom theme + # operationId: ThemeApi-GET-getCustomThemeVars + # parameters: [] + # responses: + # '200': + # description: ok + # content: + # application/json: + # schema: + # type: object diff --git a/openapi/sugarcrm/types.bal b/openapi/sugarcrm/types.bal new file mode 100644 index 000000000..75de6e0a3 --- /dev/null +++ b/openapi/sugarcrm/types.bal @@ -0,0 +1,139 @@ +// Copyright (c) 2022 WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +// +// WSO2 Inc. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +public type PackageManagerList record { + Package[] packages?; +}; + +public type FileUploadResponse record { + string file_install?; + string unFile?; +}; + +public type SuccessResponseStatus record { + # The success status + boolean success?; +}; + +public type InlineResponse200 record { + record {} modules?; +}; + +public type SearchOptions record { + # A maximum number of records to return. Default is 20. + int max_num?; + # The number of records to skip over before records are returned. Default is 0. + int offset?; + # A search expression, will search on this module. Cannot be used at the same time as a filter expression or id. + string q?; + # Wether or not to return highlighted results. Default is true. + anydata[] sort?; + # A search expression, will search on this module. Cannot be used at the same time as a filter expression or id. + boolean highlights?; + # Comma delimited list of modules to search. If omitted, all search enabled modules will be queried. + string module_list?; +}; + +public type FilteredRecordDetails record { + # Displays the next offset for retrieval of additional results. -1 will be returned when there are no more records. + int next_offset?; + # An array of results containing matched records + anydata[] records?; +}; + +public type AWSConfig record { + # The name of the AWS Connect instance + string aws_connect_instance_name?; + # The region assigned to the AWS Connect instance + string aws_connect_region?; +}; + +public type FreeBusySchedule record { + string 'start?; + string end?; +}; + +public type SearchBackendStatus record { + boolean available?; + string[] enabled_modules?; +}; + +public type SuccessResponseID record { + string id?; +}; + +public type LicenselimitdataSeats record { + int CURRENT?; + int SUGAR_SERVE?; + int SUGAR_SELL?; +}; + +public type LicenseLimitData record { + int default_limit?; + int limit_enforced?; + string default_license_type?; + LicenselimitdataSeats seats?; + LicenselimitdataSeats available_seats?; +}; + +public type DashboardData record { + # The module dashboard belongs to (e.g. Home, Cases, Accounts) + string dashboard_module?; + # The dashboard name (e.g. portal-home) + string dashboard?; +}; + +public type Package record { + string name?; + string 'version?; + string 'type?; + string published_date?; + string description?; + boolean uninstallable?; + string file_install?; + string file?; + string enabled?; + string id?; + boolean installed?; + string unFile?; +}; + +public type FilterOptions record { + # The [filter expression](https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_11.3/Integration/Web_Services/REST_API/Endpoints/Accountsrecordlinklink_namefilter_GET/#Filter_Expressions). + record {}[] filter?; + # Identifier for a preexisting filter. If filter is also set, the two filters are joined with an AND. + string filter_id?; + # A maximum number of records to return. Default is 20. + int max_num?; + # The number of records to skip over before records are returned. Default is 0. + int offset?; + # Comma delimited list of fields to return. The field date_modified will always be returned. This argument can be combined with the view argument. Example `name,account_type,description` + string fields?; + # Instead of defining the fields argument, the view argument can be used instead. The field list is constructed at the server side based on the view definition which is requested. This argument can be used in combination with the fields argument. Common views are "record" and "list". Example- `record ` + string view?; + # How to sort the returned records, in a comma delimited list with the direction appended to the column name after a colon. Example- `name:DESC,account_type:DESC,date_modified:ASC` + string order_by?; + # A search expression, will search on this module. Cannot be used at the same time as a filter expression or id. + string q?; + # Boolean to show deleted records in the result set. + boolean deleted?; +}; + +public type FreeBusyData record { + string id?; + string 'module?; + FreeBusySchedule[] freebusy?; +}; diff --git a/openapi/sugarcrm/utils.bal b/openapi/sugarcrm/utils.bal new file mode 100644 index 000000000..22e8444f2 --- /dev/null +++ b/openapi/sugarcrm/utils.bal @@ -0,0 +1,217 @@ +// Copyright (c) 2022 WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +// +// WSO2 Inc. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +import ballerina/url; + +type SimpleBasicType string|boolean|int|float|decimal; + +# Represents encoding mechanism details. +type Encoding record { + # Defines how multiple values are delimited + string style = FORM; + # Specifies whether arrays and objects should generate as separate fields + boolean explode = true; + # Specifies the custom content type + string contentType?; + # Specifies the custom headers + map headers?; +}; + +enum EncodingStyle { + DEEPOBJECT, + FORM, + SPACEDELIMITED, + PIPEDELIMITED +} + +final Encoding & readonly defaultEncoding = {}; + +# Serialize the record according to the deepObject style. +# +# + parent - Parent record name +# + anyRecord - Record to be serialized +# + return - Serialized record as a string +isolated function getDeepObjectStyleRequest(string parent, record {} anyRecord) returns string { + string[] recordArray = []; + foreach [string, anydata] [key, value] in anyRecord.entries() { + if value is SimpleBasicType { + recordArray.push(parent + "[" + key + "]" + "=" + getEncodedUri(value.toString())); + } else if value is SimpleBasicType[] { + recordArray.push(getSerializedArray(parent + "[" + key + "]" + "[]", value, DEEPOBJECT, true)); + } else if value is record {} { + string nextParent = parent + "[" + key + "]"; + recordArray.push(getDeepObjectStyleRequest(nextParent, value)); + } else if value is record {}[] { + string nextParent = parent + "[" + key + "]"; + recordArray.push(getSerializedRecordArray(nextParent, value, DEEPOBJECT)); + } + recordArray.push("&"); + } + _ = recordArray.pop(); + return string:'join("", ...recordArray); +} + +# Serialize the record according to the form style. +# +# + parent - Parent record name +# + anyRecord - Record to be serialized +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized record as a string +isolated function getFormStyleRequest(string parent, record {} anyRecord, boolean explode = true) returns string { + string[] recordArray = []; + if explode { + foreach [string, anydata] [key, value] in anyRecord.entries() { + if (value is SimpleBasicType) { + recordArray.push(key, "=", getEncodedUri(value.toString())); + } else if (value is SimpleBasicType[]) { + recordArray.push(getSerializedArray(key, value, explode = explode)); + } else if (value is record {}) { + recordArray.push(getFormStyleRequest(parent, value, explode)); + } + recordArray.push("&"); + } + _ = recordArray.pop(); + } else { + foreach [string, anydata] [key, value] in anyRecord.entries() { + if (value is SimpleBasicType) { + recordArray.push(key, ",", getEncodedUri(value.toString())); + } else if (value is SimpleBasicType[]) { + recordArray.push(getSerializedArray(key, value, explode = false)); + } else if (value is record {}) { + recordArray.push(getFormStyleRequest(parent, value, explode)); + } + recordArray.push(","); + } + _ = recordArray.pop(); + } + return string:'join("", ...recordArray); +} + +# Serialize arrays. +# +# + arrayName - Name of the field with arrays +# + anyArray - Array to be serialized +# + style - Defines how multiple values are delimited +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized array as a string +isolated function getSerializedArray(string arrayName, anydata[] anyArray, string style = "form", boolean explode = true) returns string { + string key = arrayName; + string[] arrayValues = []; + if (anyArray.length() > 0) { + if (style == FORM && !explode) { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), ","); + } + } else if (style == SPACEDELIMITED && !explode) { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), "%20"); + } + } else if (style == PIPEDELIMITED && !explode) { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), "|"); + } + } else if (style == DEEPOBJECT) { + foreach anydata i in anyArray { + arrayValues.push(key, "[]", "=", getEncodedUri(i.toString()), "&"); + } + } else { + foreach anydata i in anyArray { + arrayValues.push(key, "=", getEncodedUri(i.toString()), "&"); + } + } + _ = arrayValues.pop(); + } + return string:'join("", ...arrayValues); +} + +# Serialize the array of records according to the form style. +# +# + parent - Parent record name +# + value - Array of records to be serialized +# + style - Defines how multiple values are delimited +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized record as a string +isolated function getSerializedRecordArray(string parent, record {}[] value, string style = FORM, boolean explode = true) returns string { + string[] serializedArray = []; + if style == DEEPOBJECT { + int arayIndex = 0; + foreach var recordItem in value { + serializedArray.push(getDeepObjectStyleRequest(parent + "[" + arayIndex.toString() + "]", recordItem), "&"); + arayIndex = arayIndex + 1; + } + } else { + if (!explode) { + serializedArray.push(parent, "="); + } + foreach var recordItem in value { + serializedArray.push(getFormStyleRequest(parent, recordItem, explode), ","); + } + } + _ = serializedArray.pop(); + return string:'join("", ...serializedArray); +} + +# Get Encoded URI for a given value. +# +# + value - Value to be encoded +# + return - Encoded string +isolated function getEncodedUri(string value) returns string { + string|error encoded = url:encode(value, "UTF8"); + if (encoded is string) { + return encoded; + } else { + return value; + } +} + +# Generate query path with query parameter. +# +# + queryParam - Query parameter map +# + encodingMap - Details on serialization mechanism +# + return - Returns generated Path or error at failure of client initialization +isolated function getPathForQueryParam(map queryParam, map encodingMap = {}) returns string|error { + string[] param = []; + if (queryParam.length() > 0) { + param.push("?"); + foreach var [key, value] in queryParam.entries() { + if value is () { + _ = queryParam.remove(key); + continue; + } + Encoding encodingData = encodingMap.hasKey(key) ? encodingMap.get(key) : defaultEncoding; + if (value is SimpleBasicType) { + param.push(key, "=", getEncodedUri(value.toString())); + } else if (value is SimpleBasicType[]) { + param.push(getSerializedArray(key, value, encodingData.style, encodingData.explode)); + } else if (value is record {}) { + if (encodingData.style == DEEPOBJECT) { + param.push(getDeepObjectStyleRequest(key, value)); + } else { + param.push(getFormStyleRequest(key, value, encodingData.explode)); + } + } else { + param.push(key, "=", value.toString()); + } + param.push("&"); + } + _ = param.pop(); + } + string restOfPath = string:'join("", ...param); + return restOfPath; +}