@uipath/integrationservice-sdk
v0.1.5
Published
TypeScript SDK for UiPath Integration Service APIs.
Readme
Integration Service SDK
TypeScript SDK for UiPath Integration Service APIs.
Overview
The Integration Service SDK provides a strongly-typed TypeScript client for interacting with UiPath Integration Service APIs. It handles authentication, HTTP requests, and type conversions automatically.
Installation
bun install @uipath/integrationservice-sdkUsage
Using createApiClient (Recommended)
The easiest way to create a client. It reads login state from @uipath/auth automatically:
import { createApiClient } from "@uipath/integrationservice-sdk";
const client = await createApiClient();
// Or with a specific tenant
const client = await createApiClient({ tenant: "my-tenant" });Manual Setup
If you need full control over the configuration:
import { IntegrationServiceClient } from "@uipath/integrationservice-sdk";
const client = new IntegrationServiceClient({
baseUrl: "https://cloud.uipath.com",
accessToken: "your-access-token",
organizationId: "your-org-id",
tenantName: "your-tenant",
});List Connectors
const connectors = await client.listConnectors();
connectors.forEach(connector => {
logger.info(`- ${connector.name} (${connector.key})`);
});Get Connector by Key
const connector = await client.getConnectorByKey("uipath-salesforce-sfdc");List Connections
// List all connections for a connector
const connections = await client.listConnections("uipath-salesforce-sfdc");
// List connections in specific folder
const folderConnections = await client.listConnections(
"uipath-salesforce-sfdc",
"my-folder-key"
);Create Connection (OAuth Flow)
// Step 1: Initiate connection creation
const createResponse = await client.createConnection("uipath-doist-todoist");
// Step 2: Open createResponse.authUrl in browser for user to authenticate
// Step 3: Poll session status
let status = await client.getSessionStatus(createResponse.sessionId);
while (status.status === "pending") {
await new Promise(resolve => setTimeout(resolve, 5000));
status = await client.getSessionStatus(createResponse.sessionId);
}
if (status.status === "success") {
// Connection created
}List Objects
const objects = await client.listObjects(
"uipath-zoho-desk",
"connection-id-here"
);List Activities
const activities = await client.listActivities("uipath-zoho-desk");List Resources
// Without connection ID (elements endpoint)
const resources = await client.listResources("uipath-salesforce-sfdc");
// With connection ID (instances endpoint)
const resources = await client.listResources("uipath-salesforce-sfdc", "connection-id");Get Resource Metadata
// Without connection ID
const metadata = await client.getResourceMetadata("uipath-salesforce-sfdc", "Account");
// With connection ID
const metadata = await client.getResourceMetadata("uipath-salesforce-sfdc", "Account", "connection-id");Execute Operations
// GET operation (list records)
const tickets = await client.executeOperation("connection-id", "tickets", "GET");
// GET with query parameters
const filtered = await client.executeOperation(
"connection-id",
"tickets",
"GET",
undefined,
{ limit: "10", offset: "0" }
);
// POST operation (create record)
const newTicket = await client.executeOperation(
"connection-id",
"tickets",
"POST",
{ subject: "New Support Ticket", priority: "high" }
);
// PATCH operation (update record)
await client.executeOperation(
"connection-id",
"tickets",
"PATCH",
{ id: "123", status: "closed" }
);
// DELETE operation
await client.executeOperation(
"connection-id",
"tickets",
"DELETE",
undefined,
{ id: "123" }
);API Reference
createApiClient(options?)
Factory function that creates an IntegrationServiceClient using the current login session from @uipath/auth.
import { createApiClient } from "@uipath/integrationservice-sdk";
const client = await createApiClient({ tenant: "my-tenant" });Options:
tenant- Optional tenant name override. Falls back to the tenant from login session.
Throws: Error if not logged in or tenant is not available.
IntegrationServiceClient
Constructor
constructor(config: IntegrationServiceConfig)Parameters:
config.baseUrl- UiPath base URL (e.g., "https://cloud.uipath.com")config.accessToken- OAuth access tokenconfig.organizationId- Organization/Account IDconfig.tenantName- Tenant name
Methods
| Method | Description |
|--------|-------------|
| listConnectors() | List all available connectors |
| getConnectorByKey(key) | Get a specific connector by key |
| listConnections(connectorKey, folderKey?) | List connections for a connector |
| createConnection(connectorKey) | Initiate OAuth connection creation |
| getSessionStatus(sessionId) | Get OAuth session status |
| listObjects(connectorKey, connectionId) | List objects for a connection |
| listActivities(connectorKey) | List activities for a connector |
| listResources(connectorKey, connectionId?) | List resources (with/without connection) |
| getResourceMetadata(connectorKey, objectName, connectionId?) | Get resource field metadata |
| executeOperation(connectionId, objectName, httpMethod?, body?, queryParams?) | Execute an operation on a resource |
Related Packages
@uipath/integrationservice-tool- CLI tool using this SDK@uipath/orchestrator-sdk- Orchestrator API SDK@uipath/solution-sdk- Solution API SDK
License
Copyright (c) UiPath. All rights reserved.
