### DealCloud API Pagination Example (GET Request) Source: https://api.docs.dealcloud.com/docs/pagination This example demonstrates how to make a GET request to the DealCloud API's data entry endpoint using pagination parameters. It shows how to set the 'limit' and 'skip' values to retrieve data in chunks. The 'limit' parameter controls the number of records per request (up to 10,000), and 'skip' determines the starting point for retrieving records. ```HTTP GET {baseUrl}/api/rest/v4/data/entrydata/rows/Address?limit=4&skip=0 Content-Type: application/json ``` -------------------------------- ### Install DealCloud SDK Source: https://api.docs.dealcloud.com/sdk/python Command to install the DealCloud SDK package using pip. ```bash pip install dealcloud-sdk ``` -------------------------------- ### DealCloud SDK - Python Installation Source: https://api.docs.dealcloud.com/sdk/python Instructions on how to install the DealCloud SDK for Python using pip. ```APIDOC ## DealCloud SDK - Python Installation ### Description Install the DealCloud SDK for Python using pip. ### Method pip install ### Endpoint N/A ### Parameters N/A ### Request Example ```bash pip install dealcloud-sdk ``` ### Response N/A ``` -------------------------------- ### Install DealCloud SDK using NuGet CLI Source: https://api.docs.dealcloud.com/sdk/csharp/installation Installs the DealCloud SDK NuGet package using the standalone NuGet command-line interface. This is an alternative method for projects where the CLI is preferred or already set up. ```bash nuget install DealCloudSDK ``` -------------------------------- ### DealCloud SDK - Complex Example (Stock Price Data) Source: https://api.docs.dealcloud.com/sdk/python An advanced example demonstrating fetching stock price data from Yahoo Finance and writing it to a 'StockPrices' object in DealCloud. ```APIDOC ## DealCloud SDK - Complex Example (Stock Price Data) ### Description This example fetches the previous day's stock market data for a given ticker from Yahoo Finance, processes it, and then inserts it into the 'StockPrices' object in DealCloud, linking it to the corresponding company via the 'Ticker' field. ### Method SDK Method ### Endpoint N/A (SDK abstraction) ### Parameters - **path/to/json_config_file.json** (string) - Required - Path to the JSON configuration file for credentials. - **creds.dc** (string) - Required - Name of the credentials file. - **"StockPrices"** (string) - Required - The DealCloud object to insert data into. - **day_info** (pandas DataFrame) - Required - DataFrame containing the processed stock price data. - **use_dealcloud_ids=False** (boolean) - Optional - Specifies not to use DealCloud IDs for insertion. - **lookup_column="Ticker"** (string) - Optional - The column to use for looking up existing records (e.g., 'Ticker' on the Company object). ### Request Example ```python from dealcloud_sdk import DealCloud import yfinance as yf if __name__ == "__main__": # create DealCloud SDK client, using credentials from a JSON config file dc = DealCloud.from_json("path/to/json_config_file.json", "creds.dc") # fetch the previous day's market data for a ticker from yahoo finance ticker = "INTA" inta = yf.Ticker(ticker) day_info = inta.history(period="1day").reset_index() # add the ticker to the DataFrame as a lookup value to tag a Company day_info["Ticker"] = ticker # rename fields to match DealCloud API Names day_info.rename({"Stock Splicts": "StockSplits"}, axis=1, inplace=True) """ day_info is now a DataFrame that looks like this, all of these fields exist in DealCloud: Date Open High Low Close Volume Dividends StockSplits Ticker 0 2024-01-03 00:00:00-05:00 36.650002 37.080002 36.139999 36.450001 307600 0.0 0.0 INTA """ # create the Stock Price record in DealCloud, using the "Ticker" field on the Company object as an ID # to tag the Company record to the Stock Price Record dc.insert_data("StockPrices", day_info, use_dealcloud_ids=False, lookup_column="Ticker") ``` ### Response N/A (Data is inserted into DealCloud) ``` -------------------------------- ### C# SDK: Example Data Response (No Resolve) Source: https://api.docs.dealcloud.com/sdk/csharp/data Example of data returned from DealCloud when the 'resolve' argument is not used or is empty. The response includes full referential data structures. ```json [ { "EntryId": 12345, "CompanyName": "Company1", "CompanyType": [ { "seqNumber": 3, "isAutoPdf": false, "id": 3197780, "name": "Limited Partner", "entryListId": -6 } ] }, { "EntryId": 12346, "CompanyName": "Company2", "CompanyType": [ { "seqNumber": 1, "isAutoPdf": false, "id": 3197782, "name": "Operating Company", "entryListId": -6 } ] }, { "EntryId": 12347, "CompanyName": "Company3", "CompanyType": [ { "seqNumber": 4, "isAutoPdf": false, "id": 3197779, "name": "Service Provider", "entryListId": -6 } ] } ] ``` -------------------------------- ### C# SDK: Example Data Response (Resolve to Name) Source: https://api.docs.dealcloud.com/sdk/csharp/data Example of data returned from DealCloud when the 'resolve' argument is set to 'name'. Referential data is replaced with their corresponding names. ```json [ { "EntryId": 12345, "CompanyName": "Company1", "CompanyType": ["Limited Partner"] }, { "EntryId": 12346, "CompanyName": "Company2", "CompanyType": ["Operating Company"] }, { "EntryId": 12347, "CompanyName": "Company3", "CompanyType": ["Service Provider"] } ] ``` -------------------------------- ### GET User Status Response Example - DealCloud API Source: https://api.docs.dealcloud.com/docs/relintel/status Example of a successful 200 OK response from the GET Status API endpoint, detailing the structure of user status information. ```JSON [ { "userId": 101, "emailAddress": "string", "lastEmailSyncDate": "2024-03-25T20:18:59.012Z", "lastMeetingSyncDate": "2024-03-25T20:18:59.012Z" } ] ``` -------------------------------- ### C# SDK: Example Data Response (Resolve to ID) Source: https://api.docs.dealcloud.com/sdk/csharp/data Example of data returned from DealCloud when the 'resolve' argument is set to 'id'. Referential data is replaced with their corresponding entry IDs. ```json [ { "EntryId": 12345, "CompanyName": "Company1", "CompanyType": [3197780] }, { "EntryId": 12346, "CompanyName": "Company2", "CompanyType": [3197782] }, { "EntryId": 12347, "CompanyName": "Company3", "CompanyType": [3197779] } ] ``` -------------------------------- ### Install DealCloud SDK using .NET CLI Source: https://api.docs.dealcloud.com/sdk/csharp/installation Installs the DealCloud SDK NuGet package into your C# project using the .NET command-line interface. This command adds the package dependency to your project file. ```bash dotnet add package DealCloudSDK ``` -------------------------------- ### Example API Names for Backup Request - JSON Source: https://api.docs.dealcloud.com/docs/backups/request An example JSON structure for the request body, specifying a list of API names for objects to be included in the backup. ```JSON { "apiNames": [ "Company", "Contact", "Document", "Email", "Interaction", "LookUpTable", "Note", "Project", "Report", "Requirement", "User" ] } ``` -------------------------------- ### Example IDs for Backup Request - JSON Source: https://api.docs.dealcloud.com/docs/backups/request An example JSON structure for the request body, specifying a list of object IDs to be included in the backup. ```JSON { "ids" : [ 2014, 2011, 2009, 2012, 2013, 25255, 2027, 2023, 17208, 16088, 13171, 13178, 13163, 2008, 2032 ] } ``` -------------------------------- ### Schema - Get Objects Source: https://api.docs.dealcloud.com/sdk/csharp/schema Retrieves all configured objects within the DealCloud site. ```APIDOC ## Schema - Get Objects ### Description Retrieves all configured objects in the site. ### Method GET ### Endpoint /schema/objects ### Parameters None ### Request Example ```csharp using DealCloudSDK; using Microsoft.Extensions.Configuration; var config = new ConfigurationBuilder() .AddJsonFile("environment_config.json") .Build(); var dc = new Client(config); var dcObjects = dc.Schema.GetObjects().Result; foreach (var dcObject in dcObjects) { Console.WriteLine($"{dcObject.ApiName}: {dcObject.PluralName}, {dcObject.SingularName}"); } ``` ### Response #### Success Response (200) - **dcObjects** (List) - A list of DcObject objects, each containing API name, plural name, and singular name. #### Response Example ```json [ { "ApiName": "Company", "PluralName": "Companies", "SingularName": "Company" }, { "ApiName": "Contact", "PluralName": "Contacts", "SingularName": "Contact" } ] ``` ``` -------------------------------- ### Get Objects API Source: https://api.docs.dealcloud.com/sdk/python/schema Retrieves all configured objects within the DealCloud site. ```APIDOC ## Get Objects ### Description Retrieves all configured objects in the site as an array of `Object` objects. ### Method `DealCloud.get_objects()` ### Parameters This method does not accept any parameters. ### Request Example ```python from dealcloud_sdk import DealCloud dc = DealCloud.from_yaml("path/to/yaml_config_file.json") objects = dc.get_objects() for obj in objects: print(f"{obj.apiName}: {obj.pluralName}, {obj.singularName}") ``` ### Response #### Success Response (200) - **objects** (array of Object objects) - An array containing Object objects. #### Response Example ```json [ { "apiName": "Company", "pluralName": "Companies", "singularName": "Company" }, { "apiName": "Contact", "pluralName": "Contacts", "singularName": "Contact" } ] ``` ``` -------------------------------- ### Instantiate DealCloud SDK Client (C#) Source: https://api.docs.dealcloud.com/sdk/csharp/authentication Demonstrates the basic instantiation of the DealCloud SDK Client class using site URL and API credentials. This method is suitable for local development but not recommended for production environments due to security concerns. ```csharp using DealCloudSDK; var dc = new Client( "client.dealcloud.com", 12345, "secret" ); ``` -------------------------------- ### DealCloudSDK Client Instantiation Source: https://api.docs.dealcloud.com/sdk/csharp/authentication Demonstrates how to instantiate the DealCloud SDK client with direct credentials. ```APIDOC ## DealCloudSDK Client Instantiation ### Description Instantiates the `Client` class for the DealCloud SDK by providing the site URL and API credentials directly. ### Method Instantiation ### Endpoint N/A ### Parameters N/A ### Request Example ```csharp using DealCloudSDK; var dc = new Client( "client.dealcloud.com", 12345, "secret" ); ``` ### Response N/A ### Error Handling N/A ``` -------------------------------- ### GET User Status Error Responses - DealCloud API Source: https://api.docs.dealcloud.com/docs/relintel/status Examples of common error responses from the GET Status API endpoint, including Unauthorized (401) and Bad Request (400) scenarios with corresponding error messages. ```JSON 401 Unauthorized { "message": "Cannot perform the action. User capabilities are required: AccessRiWebService" ``` ```JSON 400 Bad Request { "message": "API must be selected as the Exchange connection type to use this API endpoint" ``` ```JSON 400 Bad Request { "message": "Email or Event collection must be enabled to use this API endpoint" ``` -------------------------------- ### GET /settings Source: https://api.docs.dealcloud.com/docs/relintel Get Relationship Intelligence settings related to the API Endpoints. ```APIDOC ## GET /settings ### Description Get Relationship Intelligence settings related to the API Endpoints. ### Method GET ### Endpoint /settings ### Response #### Success Response (200) - **settings** (object) - An object containing various Relationship Intelligence settings. - **email_relationships_enabled** (boolean) - Indicates if email relationships are enabled. - **meeting_relationships_enabled** (boolean) - Indicates if meeting relationships are enabled. - **collect_relationship_data** (boolean) - Indicates if relationship data collection is enabled. - **automated_contact_creation_enabled** (boolean) - Indicates if automated contact creation is enabled. - **historical_sync_period** (string) - The period for historical data synchronization. #### Response Example ```json { "settings": { "email_relationships_enabled": true, "meeting_relationships_enabled": true, "collect_relationship_data": true, "automated_contact_creation_enabled": true, "historical_sync_period": "90 days" } } ``` ``` -------------------------------- ### GET /status Source: https://api.docs.dealcloud.com/docs/relintel Get user status data from the Relationship Intelligence system for enabled users. ```APIDOC ## GET /status ### Description Get user status data from the Relationship Intelligence system for enabled users. ### Method GET ### Endpoint /status ### Query Parameters - **user_id** (string) - Optional - Filter results by a specific user ID. ### Response #### Success Response (200) - **user_status** (array) - An array of user status objects. - **user_id** (string) - The ID of the user. - **is_enabled_for_relationship_scoring** (boolean) - Indicates if the user is enabled for relationship scoring. - **sync_status** (string) - The synchronization status of the user's data. #### Response Example ```json { "user_status": [ { "user_id": "user123", "is_enabled_for_relationship_scoring": true, "sync_status": "synced" }, { "user_id": "user456", "is_enabled_for_relationship_scoring": false, "sync_status": "pending" } ] } ``` ``` -------------------------------- ### Initialize DealCloud Client with Direct Credentials Source: https://api.docs.dealcloud.com/sdk/python/authentication Instantiates the DealCloud client by passing the site URL, client ID, and client secret directly. This method is suitable for local development but should be avoided in production environments. ```python from dealcloud_sdk import DealCloud dc = DealCloud( site_url="client.dealcloud.com", client_id="12345", client_secret="your_client_secret", ) ``` -------------------------------- ### Basic Get Data Using View API (No Filters) Source: https://api.docs.dealcloud.com/docs/data/rows/get_view_data Fetches data rows from a specified view without applying any additional filters. This is a basic GET request to the API endpoint. The response structure is identical to the 'Get Data Using View API' when no filters are applied. ```HTTP POST {{host}}/api/rest/v4/data/rows/view/MyView Authorization: Bearer {{token}} Content-Type: application/json ``` -------------------------------- ### Reading Object Data with DealCloud SDK Source: https://api.docs.dealcloud.com/sdk/csharp/data Shows how to initialize the DealCloud client using configuration and retrieve object data. It iterates through the returned rows to display specific fields. ```csharp using DealCloudSDK; using Microsoft.Extensions.Configuration; var config = new ConfigurationBuilder().AddJsonFile("environment_config.json").Build(); var dc = new Client(config); var data = dc.Data.ReadObject("Company", resolve="name").Result; Console.WriteLine($"Company has: {data.TotalRecords} rows."); foreach (var company in data.Rows) { Console.WriteLine($"{company[\"EntryId\"]}: {company[\"CompanyName\"]}"); } ``` -------------------------------- ### Authenticate via Environment Variables Source: https://api.docs.dealcloud.com/sdk/python/authentication Initializes the DealCloud client using credentials stored in environment variables. This is a secure practice for managing sensitive information. ```python from dealcloud_sdk import DealCloud # Using default environment variables dc = DealCloud().from_env() # Using overridden environment variable names dc = DealCloud().from_env( site_url_env_name="OVERRIDDEN_SITE_KEY", client_id_env_name="OVERRIDDEN_CLIENT_ID_KEY", client_secret_env_name="OVERRIDDEN_CLIENT_SECRET_KEY", ) ``` -------------------------------- ### Get Fields API Source: https://api.docs.dealcloud.com/sdk/python/schema Retrieves field configurations from the DealCloud site, with options to get all fields, fields for a specific object, or a single field by ID. ```APIDOC ## Get Fields ### Description Provides the ability to return fields configured in the site as an array of `Field` objects. Fields can be queried in three ways: all fields, fields for a specific object, or a single field by its ID. ### Method `DealCloud.get_fields()` ### Parameters #### Query Parameters - **object_id** (string) - Optional - The API name or ID of the object to retrieve fields for. - **field_id** (integer) - Optional - The ID of the specific field to retrieve. ### Request Example 1. **All Fields**: ```python from dealcloud_sdk import DealCloud dc = DealCloud.from_yaml("path/to/yaml_config_file.json") fields = dc.get_fields() ``` 2. **All Fields for an Object**: ```python from dealcloud_sdk import DealCloud dc = DealCloud.from_yaml("path/to/yaml_config_file.json") fields = dc.get_fields(object_id="Company") ``` 3. **A Field by Field ID**: ```python from dealcloud_sdk import DealCloud dc = DealCloud.from_yaml("path/to/yaml_config_file.json") field = dc.get_fields(field_id=1234) ``` ### Response #### Success Response (200) - **fields** (array of Field objects or single Field object) - An array of Field objects if querying for multiple fields, or a single Field object if querying by `field_id`. #### Response Example **Example for `dc.get_fields()` or `dc.get_fields(object_id="Company")`**: ```json [ { "id": 123456, "apiName": "FieldName", "displayName": "Field Name", "objectApiName": "Company" } ] ``` **Example for `dc.get_fields(field_id=1234)`**: ```json { "id": 1234, "apiName": "SpecificField", "displayName": "Specific Field", "objectApiName": "Contact" } ``` ``` -------------------------------- ### Attachment Field Example from Schema Source: https://api.docs.dealcloud.com/guides/how_to_upload_files An example of an attachment field's definition retrieved from the schema. The `id` of this field (3490 in this case) is required for attaching files to records. ```json { "apiName": "DealFile", "fieldType": 5, "isRequired": false, "allowDuplicates": true, "warnOnNearDuplicates": false, "isMoney": false, "isMultiSelect": false, "entryLists": [ 2010 ], "systemFieldType": 0, "isKey": false, "isCalculated": false, "isAttachment": true, "isStoreRequestSupported": true, "id": 3490, "name": "Deal File", "entryListId": 2037 } ``` -------------------------------- ### Configuring SDK Logging Source: https://api.docs.dealcloud.com/sdk/csharp/logging Demonstrates how to inject an ILogger into the DealCloudSDK constructor to capture SDK output. ```APIDOC ## Logging Configuration ### Description The `DealCloudSDK` supports custom logging by accepting an `ILogger` interface in its constructor. This allows developers to route SDK logs to any logging provider supported by the .NET logging abstraction. ### Implementation To configure logging, create a logger instance and pass it as the second argument to the `Client` constructor. ### Code Example ```csharp using DealCloudSDK; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; var config = new ConfigurationBuilder() .AddJsonFile("environment_config.json") .Build(); // define logger of your choosing using var factory = LoggerFactory.Create(builder => builder .AddConsole()); var logger = factory.CreateLogger("Program"); // pass the ILogger as an argument to the constructor. var dc = new Client(config, logger); ``` ``` -------------------------------- ### Create, Update, and Upsert Data with DealCloud SDK Source: https://api.docs.dealcloud.com/sdk/python/data Provides examples for inserting, updating, and upserting data into DealCloud using the respective SDK methods. It highlights the importance of using correct API names for columns and understanding how to reference fields (e.g., EntryId, choice value ID, user ID) based on the `use_dealcloud_ids` flag. ```python from dealcloud_sdk import DealCloud dc = DealCloud.from_yaml("path/to/yaml_config_file.json") to_send = [ { "CompanyName": "Test Company 1", "UnmappableColumn": "Foo", } ] responses = dc.insert_data("Company", to_send) ``` -------------------------------- ### Configure DealCloud SDK with Console Logging (C#) Source: https://api.docs.dealcloud.com/sdk/csharp/logging This snippet shows how to initialize the DealCloud SDK with a custom logger. It uses Microsoft.Extensions.Logging to create a LoggerFactory and then a logger instance, which is passed to the Client constructor. This allows SDK logging to be directed to the console. ```csharp using DealCloudSDK; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; var config = new ConfigurationBuilder() .AddJsonFile("environment_config.json") .Build(); // define logger of your choosing using var factory = LoggerFactory.Create(builder => builder .AddConsole()); var logger = factory.CreateLogger("Program"); // pass the ILogger as an argument to the constructor. var dc = new Client(config, logger); ``` -------------------------------- ### Retrieve Data Rows via GET Request Source: https://api.docs.dealcloud.com/docs/data/rows/get Basic implementation of the GET request to retrieve entry data rows. Requires an authorization bearer token and the target entry type ID. ```HTTP GET {{host}}/api/rest/v4/data/entrydata/rows/{{entryTypeId}} Authorization: Bearer {{token}} ``` -------------------------------- ### Secure DealCloud SDK Authentication with IConfiguration (C#) Source: https://api.docs.dealcloud.com/sdk/csharp/authentication Shows how to securely load DealCloud SDK credentials using the IConfiguration interface, which is recommended for production. It supports loading configuration values like siteUrl, clientId, and clientSecret from sources such as JSON files. ```csharp using DealCloudSDK; using Microsoft.Extensions.Configuration; // initialise Ivar configuration object config = new ConfigurationBuilder() .AddJsonFile("environment_config.json") .Build(); // initialise Client, using the IConfiguration object as an argument. var dc = new Client(config); ``` -------------------------------- ### Pagination with Rows Get and Query API Source: https://api.docs.dealcloud.com/docs/pagination This section details how to paginate results when using the Rows Get or Query API. It explains the use of 'totalRecords', 'skip', and 'limit' parameters for efficient data retrieval. ```APIDOC ## Pagination with Rows Get and Query API ### Description Pagination allows you to efficiently retrieve large datasets in manageable chunks, reducing load and improving performance. When using the Rows Get, or Query API, pagination is controlled by three parameters: `totalRecords`, `skip`, and `limit`. ### Method GET ### Endpoint `{baseUrl}/api/rest/v4/data/entrydata/rows/{resource}` ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of records to return per request. Maximum value is 10,000. Defaults to 1000. - **skip** (integer) - Optional - The number of records to skip from the beginning of the dataset. Defaults to 0. - **totalRecords** (integer) - Response field - The total number of records available for the query. ### Request Example ``` GET {baseUrl}/api/rest/v4/data/entrydata/rows/Address?limit=4&skip=0 Content-Type: application/json ``` ### Response #### Success Response (200) - **rows** (array) - An array of records for the current page. - **totalRecords** (integer) - The total number of records available. #### Response Example ```json { "rows": [ { ... record 1 ... }, { ... record 2 ... }, { ... record 3 ... }, { ... record 4 ... } ], "totalRecords": 14 } ``` ### Best Practices - Use the largest `limit` value that is practical for your application to minimize the number of requests. - Always check `totalRecords` to determine how many requests are needed. - Handle empty `rows` arrays gracefully, as they indicate there are no more records to retrieve. - When `skip` and `limit` are not included as parameters, default values of 0 and 1000 are applied respectively. ``` -------------------------------- ### DealCloud SDK - Writing Data (Create Company) Source: https://api.docs.dealcloud.com/sdk/python Example of how to create a new Company record in DealCloud using the Python SDK. ```APIDOC ## DealCloud SDK - Writing Data (Create Company) ### Description This example shows how to create a new 'Company' record in DealCloud by providing a list of company dictionaries. ### Method SDK Method ### Endpoint N/A (SDK abstraction) ### Parameters - **path/to/json_config_file.json** (string) - Required - Path to the JSON configuration file for credentials. - **creds.dc** (string) - Required - Name of the credentials file. - **"Company"** (string) - Required - The DealCloud object to insert data into. - **company** (list of dict) - Required - A list containing dictionaries, where each dictionary represents a company to be created. - **CompanyName** (string) - Required - The name of the company. - **BusinessDescription** (string) - Optional - A description of the company's business. ### Request Example ```python from dealcloud_sdk import DealCloud # create DealCloud SDK client, using credentials from a JSON config file dc = DealCloud.from_json("path/to/json_config_file.json", "creds.dc") # define a company to create company = [ { "CompanyName": "Intapp Inc.", "BusinessDescription": "Intelligence, Applied.", } ] # write the company to DealCloud dc.insert_data("Company", company) ``` ### Response N/A (Data is inserted into DealCloud) ``` -------------------------------- ### Read and Filter Data with DealCloud SDK Source: https://api.docs.dealcloud.com/sdk/python Demonstrates how to initialize the client, read data from a DealCloud object into a pandas DataFrame, filter the results, and export to CSV. ```python from dealcloud_sdk import DealCloud # create DealCloud SDK client, using credentials from a JSON config file dc = DealCloud.from_json("path/to/json_config_file.json", "creds.dc") # read data from the company object into a pandas DataFrame. data = dc.read_data("Company", resolve="name") # filter companies on "CompanyType" to return only operating companies data = data[data["CompanyType"] == "Operating Company"] # save the result to a CSV file data.to_csv('output/OpCos.csv') ``` -------------------------------- ### POST /api/rest/v1/publication/initbootstrap Source: https://api.docs.dealcloud.com/docs/publications/bootstrap Initiates a full data export (bootstrap) of DealCloud data. This is a resource-intensive operation intended for one-off full data dumps. ```APIDOC ## POST /api/rest/v1/publication/initbootstrap ### Description Initiates a full data export (bootstrap) of the existing data within DealCloud. This is a heavy operation and should be used sparingly. ### Method POST ### Endpoint /api/rest/v1/publication/initbootstrap ### Parameters #### Request Body - **EntityType** (integer) - Required - The type of entity to export (e.g., 1 for Data, 9 for Bootstrap). - **EntityFormat** (integer) - Required - The structure format (0 for cells, 1 for rows). ### Request Example { "EntityType": 1, "EntityFormat": 1 } ### Response #### Success Response (200) - **status** (string) - Confirmation that the bootstrap process has been initiated. #### Response Example { "status": "success", "message": "Bootstrap initiated successfully. Monitor via GET Topics." } ``` -------------------------------- ### Get Audit Trail Topics via Publications API Source: https://api.docs.dealcloud.com/guides/audit_trail_for_read_events This snippet demonstrates how to retrieve available topics, specifically validating the presence of the 'default-audit-trail' topic, using the Intapp Publication API's GET Topics endpoint. ```json [ "bootstrap-data", "bootstrap-schema", "bootstrap-users", "default-audit-trail", "default-data", "default-schema", "default-users" ] ``` -------------------------------- ### Example Audit Trail Read Event Response Source: https://api.docs.dealcloud.com/guides/audit_trail_for_read_events This snippet provides an example of a successful response from the Publication API when polling for audit trail events. It details the structure of an audit trail read event, including event details, user information, and modified objects. ```json { "eventId": 4966171946499396472, "eventGuid": "cc9b5378-6312-44eb-85bc-e6492f9d8620", "modifiedAt": "2025-03-18T09:22:53.8727572Z", "topicName": "default-audit-trail", "topicOffset": 0, "entityType": "AuditTrail", "entityFormatType": "None", "modifiedById": 0, "modifiedByUserEmail": "", "auditTrailEvents": [ { "eventDate": "2025-03-18T09:22:53.8703692Z", "clientId": 1, "ipAddress": "127.0.0.1", "eventType": "Read", "users": [ { "user": "user.temp@intapp.com", "userId": 1002010, "proxyUser": "proxyUser.temp@intapp.com", "proxyUserId": 1002011 } ], "objects": [ { "entryId": 660481, "entryListId": 20244, "fieldIds": [ 20252 ] }, { "entryId": 660482, "entryListId": 20244, "fieldIds": [ 20252 ] } ] } ] } ``` -------------------------------- ### Read DealCloud Object Data Source: https://api.docs.dealcloud.com/sdk/csharp Demonstrates how to initialize the DealCloud client using configuration settings and read object data. The resulting data is serialized and saved to a local JSON file. ```csharp using DealCloudSDK; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; var config = new ConfigurationBuilder() .AddJsonFile("environment_config.json") .Build(); var dc = new Client(config); var data = dc.Data.ReadObject("Company", resolve="name").Result; string jsonFilePath = "output.json"; string json = JsonConvert.SerializeObject(data, Formatting.Indented); File.WriteAllText(jsonFilePath, json); Console.WriteLine("Data written to output.json"); ``` -------------------------------- ### Install DealCloudSDK via .NET CLI Source: https://api.docs.dealcloud.com/sdk/csharp/installation Command to add the DealCloudSDK package to a .NET project using the command line interface. ```APIDOC ## .NET CLI Installation ### Description Use the .NET CLI to quickly add the DealCloudSDK dependency to your project. ### Command `dotnet add package DealCloudSDK` ### Usage After installation, include the namespace in your C# file: ```csharp using DealCloudSDK; ``` ``` -------------------------------- ### DealCloud API Response Example Source: https://api.docs.dealcloud.com/docs/data/rows/get_view_data Example JSON response structure for data retrieval requests from the DealCloud API. It includes the total number of records found and an array of rows, where each row contains details about entries like 'Company Name', 'Watchlist', and 'Coverage Person'. ```JSON { "totalRecords": 1, "rows": [ { "EntryId": 1830992, "Company Name": { "url": "https://.../portal/pages/5/reports/324/entries/1830992", "id": 1830992, "name": "Another Company 2", "entryListId": 2014 }, "Watchlist": { "seqNumber": 1, "isAutoPdf": false, "id": 1105, "name": "Yes", "entryListId": -6 }, "Coverage Person": [ { "url": "https://.../portal/pages/344/reports/366/entries/1206", "id": 1206, "name": "First Last", "entryListId": -1 }, { "url": "https://.../portal/pages/344/reports/366/entries/1205", "id": 1205, "name": "First Last", "entryListId": -1 }, { "url": "https://.../portal/pages/344/reports/366/entries/1441801", "id": 1441801, "name": "First Last", "entryListId": -1 } ] } ] } ``` -------------------------------- ### GET /Data/ReadView Source: https://api.docs.dealcloud.com/sdk/csharp/data Retrieves data from a pre-defined View within DealCloud. ```APIDOC ## GET /Data/ReadView ### Description Reads data from a specific View using the View name or ID. ### Method GET ### Endpoint Client.Data.ReadView(viewId, query) ### Parameters #### Path Parameters - **viewId** (string/int) - Required - The name or ID of the view to read. #### Query Parameters - **query** (List) - Optional - A list of query objects to filter the view data. ### Response #### Success Response (200) - **TotalRecords** (int) - Count of all rows in the result. - **Rows** (array) - The collection of data records. ``` -------------------------------- ### Write Data to DealCloud Source: https://api.docs.dealcloud.com/sdk/python Shows how to create a new record in DealCloud by defining a dictionary and using the insert_data method. ```python from dealcloud_sdk import DealCloud # create DealCloud SDK client, using credentials from a JSON config file dc = DealCloud.from_json("path/to/json_config_file.json", "creds.dc") # define a company to create company = [ { "CompanyName": "Intapp Inc.", "BusinessDescription": "Intelligence, Applied.", } ] # write the company to DealCloud dc.insert_data("Company", company) ``` -------------------------------- ### GET /schema/entrytypes Source: https://api.docs.dealcloud.com/docs/schema/entrytypes Retrieves a list of all available EntryTypes defined in the system. ```APIDOC ## GET /schema/entrytypes ### Description Retrieves a comprehensive list of all EntryTypes available in the DealCloud schema. ### Method GET ### Endpoint /schema/entrytypes ### Response #### Success Response (200) - **apiName** (string) - The internal API name of the entry type. - **singularName** (string) - The singular display name. - **pluralName** (string) - The plural display name. - **id** (integer) - The unique identifier for the entry type. #### Response Example [ { "apiName": "Deal", "singularName": "Deal", "pluralName": "Deals", "id": 15524 } ] ``` -------------------------------- ### Reference DealCloud SDK in C# Code Source: https://api.docs.dealcloud.com/sdk/csharp/installation Demonstrates how to add a using directive to your C# code file to make the DealCloud SDK classes and methods available for use. ```csharp using DealCloudSDK; ``` -------------------------------- ### GET Mappings Types API Request Source: https://api.docs.dealcloud.com/docs/schema/metadata/mappings_types This snippet demonstrates how to make a GET request to the DealCloud API to retrieve a list of all available mapping types. It requires an authorization token and specifies the endpoint URL. The response is a JSON array of mapping type objects, each containing an ID, name, and entryListId. ```http GET {{host}}/api/rest/v4/schema/mappingstypes Authorization: Bearer {{token}} ``` -------------------------------- ### Integrate External Data with DealCloud Source: https://api.docs.dealcloud.com/sdk/python Example of fetching market data from Yahoo Finance and inserting it into DealCloud using a lookup column for record association. ```python from dealcloud_sdk import DealCloud import yfinance as yf if __name__ == "__main__": # create DealCloud SDK client, using credentials from a JSON config file dc = DealCloud.from_json("path/to/json_config_file.json", "creds.dc") # fetch the previous day's market data for a ticker from yahoo finance ticker = "INTA" inta = yf.Ticker(ticker) day_info = inta.history(period="1day").reset_index() # add the ticker to the DataFrame as a lookup value to tag a Company day_info["Ticker"] = ticker # rename fields to match DealCloud API Names day_info.rename({"Stock Splicts": "StockSplits"}, axis=1, inplace=True) # create the Stock Price record in DealCloud dc.insert_data("StockPrices", day_info, use_dealcloud_ids=False, lookup_column="Ticker") ``` -------------------------------- ### DealCloud SDK - Reading Data Source: https://api.docs.dealcloud.com/sdk/python Example of how to read data from a DealCloud object, filter it, and save it to a CSV file using the Python SDK. ```APIDOC ## DealCloud SDK - Reading Data ### Description This example demonstrates how to read data from the 'Company' object, filter the results to include only operating companies, and save the filtered data to a CSV file. ### Method SDK Method ### Endpoint N/A (SDK abstraction) ### Parameters - **path/to/json_config_file.json** (string) - Required - Path to the JSON configuration file for credentials. - **creds.dc** (string) - Required - Name of the credentials file. - **"Company"** (string) - Required - The DealCloud object to read data from. - **resolve="name"** (string) - Optional - Parameter for resolving names. ### Request Example ```python from dealcloud_sdk import DealCloud # create DealCloud SDK client, using credentials from a JSON config file dc = DealCloud.from_json("path/to/json_config_file.json", "creds.dc") # read data from the company object into a pandas DataFrame. data = dc.read_data("Company", resolve="name") # filter companies on "CompanyType" to return only operating companies data = data[data["CompanyType"] == "Operating Company"] # save the result to a CSV file data.to_csv('output/OpCos.csv') ``` ### Response - **data** (pandas DataFrame) - DataFrame containing the filtered company data. #### Response Example (DataFrame content saved to 'output/OpCos.csv') ``` -------------------------------- ### DealCloud SDK Integration Source: https://api.docs.dealcloud.com/sdk Overview of available SDKs and how to utilize them for API interactions. ```APIDOC ## SDK Overview ### Description The DealCloud SDK simplifies integration by providing pre-built libraries for popular programming languages. Use these to handle authentication and request formatting automatically. ### Available SDKs - **Python**: Available for Python 3.x environments. - **C#**: Available for .NET Core and .NET Framework projects. ### Usage To begin, install the respective package via your language's package manager (pip for Python, NuGet for C#) and initialize the client with your API credentials. ``` -------------------------------- ### Schema - Get Currencies Source: https://api.docs.dealcloud.com/sdk/csharp/schema Retrieves the currency codes of all enabled currencies in the site. ```APIDOC ## Schema - Get Currencies ### Description Retrieves the currency codes of all enabled currencies in the site. ### Method GET ### Endpoint /schema/currencies ### Parameters None ### Request Example ```csharp using DealCloudSDK; using Microsoft.Extensions.Configuration; var config = new ConfigurationBuilder() .AddJsonFile("environment_config.json") .Build(); var dc = new Client(config); var currencies = dc.Schema.GetCurrencies().Result; foreach (var ccy in currencies) { Console.WriteLine(ccy); } ``` ### Response #### Success Response (200) - **currencies** (List) - A list of currency codes. #### Response Example ```json ["GBP", "USD", "EUR"] ``` ``` -------------------------------- ### GET /schema/entrytypes/{id} Source: https://api.docs.dealcloud.com/docs/schema/entrytypes Retrieves the specific details of an EntryType by its unique ID. ```APIDOC ## GET /schema/entrytypes/{id} ### Description Fetches detailed metadata for a specific EntryType using its unique ID. ### Method GET ### Endpoint /schema/entrytypes/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the EntryType. ### Response #### Success Response (200) - **apiName** (string) - The internal API name. - **singularName** (string) - The singular display name. - **pluralName** (string) - The plural display name. - **entryListType** (integer) - The type classification. - **id** (integer) - The unique identifier. #### Response Example { "apiName": "Deal", "singularName": "Deal", "pluralName": "Deals", "entryListType": 1, "entryListSubType": 0, "id": 15524, "name": "Deal", "entryListId": -5 } ``` -------------------------------- ### Perform API Request with User Proxying Source: https://api.docs.dealcloud.com/guides/making_requests_on_behalf_of_users Demonstrates how to execute an API request on behalf of another user by including the AS-USER header. This requires a pre-configured proxy assignment between the service account and the principal user. ```http GET {host}/api/rest/v4/data/entrydata/rows/Deals Authorization: Bearer {{token}} AS-USER: 6045 ``` -------------------------------- ### Data Insertion and Error Handling Source: https://api.docs.dealcloud.com/sdk/python/data Demonstrates how to insert data and handle potential errors returned by the API when `use_dealcloud_ids` is `False`. ```APIDOC ## POST /websites/api_dealcloud/insert_data ### Description Inserts data into a specified DealCloud object. Handles errors by returning error details within the response when `use_dealcloud_ids` is `False`. ### Method POST ### Endpoint /websites/api_dealcloud/insert_data ### Parameters #### Query Parameters - **use_dealcloud_ids** (boolean) - Optional - If `True`, lookup values are resolved, and errors are logged. If `False`, errors are returned in the response. #### Request Body - **object_api_name** (string) - Required - The API name of the DealCloud object to insert data into. - **records** (array) - Required - A list of dictionaries, where each dictionary represents a record to be inserted. - **field_name** (any) - Required/Optional - Fields of the record. ### Request Example ```json { "object_api_name": "WJ_Company", "records": [ {"CompanyName": "TEST_UPDATED", "Sector": 12345} ] } ``` ### Response #### Success Response (200) - **EntryId** (integer) - The ID of the newly created entry, or -1 if an error occurred. - **field_name** (any) - The data for the specified field. - **Errors** (array) - A list of error objects if the record insertion failed. - **field** (string) - The field that caused the error. - **code** (integer) - The error code. - **description** (string) - A description of the error. #### Response Example ```json [ { "EntryId": -1, "CompanyName": "TEST_UPDATED", "Sector": null, "Errors": [ { "field": "Sector", "code": 5006, "description": "One or more referenced entries are not valid for this field." } ] } ] ``` ### Error Handling Notes - If `use_dealcloud_ids` is `False` and an error occurs for a record, that record will not be created, and the error details will be in the `Errors` field of the response. - If multiple records are processed in a batch and any record fails due to a lookup error, none of the records in that batch will be created or updated. - `DealCloud` automatically pages large data volumes. If an error occurs on a record within a page, all records on that page may fail. - When `use_dealcloud_ids` is `True`, errors during lookup resolution are logged, and the corresponding field in the record will be left blank. ``` -------------------------------- ### GET /api/rest/v1/publication/topics Source: https://api.docs.dealcloud.com/docs/publications/getting_started Retrieves a list of all available publication topics for the authenticated user. ```APIDOC ## GET /api/rest/v1/publication/topics ### Description Lists all available publication topics configured for the site. ### Method GET ### Endpoint {pubUrl}/api/rest/v1/publication/topics ### Request Example GET {pubUrl}/api/rest/v1/publication/topics Authorization: Bearer {{token}} ``` -------------------------------- ### GET /templates Source: https://api.docs.dealcloud.com/docs/data/reports Retrieve a list of all existing report templates available in the system. ```APIDOC ## GET /templates ### Description Fetches a list of all available report templates that can be used to generate documents. ### Method GET ### Endpoint /templates ### Response #### Success Response (200) - **templates** (array) - A list of template objects containing IDs and names. #### Response Example { "templates": [ { "id": "tpl_123", "name": "Monthly Performance Report" } ] } ```