{"id":15006,"library":"uipath-platform","title":"UiPath Platform Python HTTP Client","description":"The `uipath-platform` library provides a low-level HTTP client for programmatic access to the UiPath Platform. It is an OpenAPI-generated client exposing various platform APIs like Orchestrator (assets, queues, processes), Data Service, and Automation Cloud. The current version is `0.1.28`. While it has its own release cycle, it is closely related to the main `uipath-python` SDK, which extracted its platform module into this library.","status":"active","version":"0.1.28","language":"en","source_language":"en","source_url":"https://github.com/UiPath/uipath-python","tags":["uipath","automation","rpa","api-client","http-client","orchestrator","data-service"],"install":[{"cmd":"pip install uipath-platform","lang":"bash","label":"Install stable release"}],"dependencies":[{"reason":"HTTP client functionality","package":"requests","optional":false}],"imports":[{"symbol":"UipathPlatform","correct":"from uipath_platform import UipathPlatform"}],"quickstart":{"code":"import os\nfrom uipath_platform import UipathPlatform\n\n# Retrieve credentials from environment variables\n# Ensure these are set in your environment before running:\n# UIPATH_ORGANIZATION_ID, UIPATH_TENANT_ID (optional for some calls), UIPATH_AUTH_TOKEN\n# Example: export UIPATH_ORGANIZATION_ID=\"your_org_id\"\n#          export UIPATH_TENANT_ID=\"your_tenant_id\"\n#          export UIPATH_AUTH_TOKEN=\"Bearer your_token_string\"\nORGANIZATION_ID = os.environ.get(\"UIPATH_ORGANIZATION_ID\", \"\")\nTENANT_ID = os.environ.get(\"UIPATH_TENANT_ID\", \"\")\nAUTH_TOKEN = os.environ.get(\"UIPATH_AUTH_TOKEN\", \"\")\nBASE_URL = os.environ.get(\"UIPATH_BASE_URL\", \"https://cloud.uipath.com\")\n\nif not (ORGANIZATION_ID and AUTH_TOKEN):\n    print(\"Error: Missing UIPATH_ORGANIZATION_ID or UIPATH_AUTH_TOKEN environment variables.\")\n    print(\"Please set them before running this script.\")\n    exit(1)\n\ntry:\n    # Initialize the client\n    # The client object provides access to various operation groups (e.g., assets, queues).\n    client = UipathPlatform(\n        organization_id=ORGANIZATION_ID,\n        tenant_id=TENANT_ID,\n        auth_token=AUTH_TOKEN,\n        base_url=BASE_URL\n    )\n\n    print(f\"Successfully initialized UiPath Platform client for Organization ID: {ORGANIZATION_ID}\")\n    print(\"Attempting to list first 5 assets (requires Asset Read permission on your token)...\")\n\n    # Example: List assets from Orchestrator\n    # This call requires 'x_uipath_tenantid' for Orchestrator operations.\n    # Ensure your AUTH_TOKEN has the necessary scopes, e.g., 'Orchestrator.Assets.Read'.\n    assets_response = client.assets.get_assets(\n        organization_id=ORGANIZATION_ID,\n        x_uipath_tenantid=TENANT_ID,\n        top=5\n    )\n    \n    if assets_response.status_code == 200:\n        print(f\"Successfully retrieved assets: {assets_response.parsed}\")\n    else:\n        print(f\"Failed to retrieve assets. Status: {assets_response.status_code}, Error: {assets_response.content}\")\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to initialize the `UipathPlatform` client and make a basic API call, such as listing assets from UiPath Orchestrator. It assumes authentication details (Organization ID, Tenant ID, and Auth Token) are provided via environment variables. Ensure your authentication token has the necessary permissions for the API calls you intend to make."},"warnings":[{"fix":"Ensure consistent dependency management. For `uipath-python` >= v2.9.0, explicitly install `uipath-platform` if platform-specific low-level client access is needed. For older `uipath-python` SDKs, the platform client functionality is bundled.","message":"The `uipath-platform` library was extracted from the main `uipath-python` SDK in `uipath-python` v2.9.0. If you are using the `uipath-python` SDK pre-2.9.0, the platform client was integrated; post-2.9.0, it is expected as a separate dependency, potentially leading to import or dependency conflicts if not managed correctly.","severity":"breaking","affected_versions":"uipath-platform v0.1.x when used with uipath-python < v2.9.0 or uipath-python >= v2.9.0"},{"fix":"Refer to the `uipath-python` SDK documentation for recommended versions of `uipath-platform` (if any) to use together. Always test compatibility thoroughly when upgrading either library.","message":"The `uipath-platform` PyPI package follows its own `0.1.x` versioning scheme, which is distinct from the `2.x.x` versioning of the main `uipath-python` SDK. This can lead to compatibility issues if not carefully considered, as the SDK might expect a specific version of the underlying platform client.","severity":"gotcha","affected_versions":"All versions of uipath-platform when used alongside uipath-python SDK."},{"fix":"Double-check your `UIPATH_ORGANIZATION_ID`, `UIPATH_TENANT_ID`, and `UIPATH_AUTH_TOKEN` environment variables or directly passed parameters. Ensure the `auth_token` is a valid Bearer token with the necessary scopes/permissions for the API endpoints you are calling.","message":"Authentication with the UiPath Platform requires providing `organization_id`, `tenant_id` (for tenant-specific operations), and a valid `auth_token`. Misconfigured or missing credentials are a common source of connection errors and `401 Unauthorized` responses.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Run `pip install uipath-platform` to install the library.","cause":"The `uipath-platform` library is not installed in your Python environment.","error":"ModuleNotFoundError: No module named 'uipath_platform'"},{"fix":"Generate a new API token with appropriate scopes from your UiPath Automation Cloud tenant's API Access page. Ensure the token is prefixed with `Bearer ` when used.","cause":"The provided authentication token is invalid, expired, or lacks the necessary permissions for the requested API endpoint.","error":"requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url:"},{"fix":"Ensure `organization_id`, `tenant_id`, and `auth_token` are explicitly passed to the `UipathPlatform` constructor. It's recommended to use environment variables for these values.","cause":"Required authentication parameters like `organization_id`, `tenant_id`, or `auth_token` were not provided to the `UipathPlatform` constructor.","error":"TypeError: UipathPlatform.__init__ missing 1 required positional argument: 'organization_id'"}],"ecosystem":"pypi"}