Title: [DX] GAP-11: sdk.entities.insert_records() entity_key must be a UUID, not the entity name — undocumented · Issue #1503 · UiPath/uipath-python · GitHub
Open Graph Title: [DX] GAP-11: sdk.entities.insert_records() entity_key must be a UUID, not the entity name — undocumented · Issue #1503 · UiPath/uipath-python
X Title: [DX] GAP-11: sdk.entities.insert_records() entity_key must be a UUID, not the entity name — undocumented · Issue #1503 · UiPath/uipath-python
Description: Summary sdk.entities.insert_records(entity_key="DepartmentBudget", ...) returns HTTP 400 "The value 'DepartmentBudget' is not valid." The parameter name entity_key implies a logical key (like a name or slug), but the API actually require...
Open Graph Description: Summary sdk.entities.insert_records(entity_key="DepartmentBudget", ...) returns HTTP 400 "The value 'DepartmentBudget' is not valid." The parameter name entity_key implies a logical key (like a nam...
X Description: Summary sdk.entities.insert_records(entity_key="DepartmentBudget", ...) returns HTTP 400 "The value 'DepartmentBudget' is not valid." The parameter name entity_key impli...
Opengraph URL: https://github.com/UiPath/uipath-python/issues/1503
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[DX] GAP-11: sdk.entities.insert_records() entity_key must be a UUID, not the entity name — undocumented","articleBody":"## Summary\n\n`sdk.entities.insert_records(entity_key=\"DepartmentBudget\", ...)` returns HTTP 400 `\"The value 'DepartmentBudget' is not valid.\"` The parameter name `entity_key` implies a logical key (like a name or slug), but the API actually requires the entity's internal UUID.\n\n## Root Cause\n\nThe DataFabric API endpoint `EntityService/entity/{entity_key}/insert-batch` expects the entity's internal UUID (the `id` field), not its `name`. The `sdk.entities.insert_records()` method accepts `entity_key: str` with no type hint or documentation about what value is expected.\n\nThe SQL query path (`sdk.entities.query_entity_records()`) accepts names, which makes the inconsistency more confusing.\n\n## Observed Behaviour\n\n```python\nresult = sdk.entities.insert_records(\n entity_key=\"DepartmentBudget\", # entity name — reasonable assumption\n records=[{\"department\": \"Finance\", \"budget\": 100000}]\n)\n# HTTP 400: \"The value 'DepartmentBudget' is not valid.\"\n```\n\n## Workaround\n\nCall the DataFabric entities list API directly to obtain the UUID, then pass that UUID:\n\n```python\nimport httpx\nresp = httpx.get(f\"{base_url}/datafabric_/api/Entity\", headers={\"Authorization\": f\"Bearer {token}\"})\nentity_uuid = next(e[\"id\"] for e in resp.json() if e[\"name\"] == \"DepartmentBudget\")\nsdk.entities.insert_records(entity_key=entity_uuid, records=[...])\n```\n\nNote: `sdk.entities.list_entities()` cannot be used for this lookup — it crashes with a pydantic validation error (see related issue GAP-12).\n\n## Suggested Fix\n\n1. Accept the entity name and resolve it to a UUID internally (preferred).\n2. Or document clearly in the docstring that `entity_key` is a UUID and show how to obtain it.\n3. Consider renaming the parameter to `entity_id` to make the UUID requirement obvious.\n\n## Impact\n\n- Severity: **High**\n- HTTP 400 with a cryptic error message; no guidance on what the correct value should be\n- The inconsistency with the SQL query path (which accepts names) makes this especially confusing\n","author":{"url":"https://github.com/AlexBizon","@type":"Person","name":"AlexBizon"},"datePublished":"2026-03-26T15:24:27Z","url":"https://github.com/UiPath/uipath-python/issues/1503"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9a007642-0fd5-b15b-d072-9de146a8c669 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A85A:9E1B2:6E9EDA:7CD860:6AFF60F9 |
| html-safe-nonce | 7aae1f742ffa2045540a999ad930c6be8a5f55036a6b2be57d05741b83471c89 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODVBOjlFMUIyOjZFOUVEQTo3Q0Q4NjA6NkFGRjYwRjkiLCJ2aXNpdG9yX2lkIjoiMjg4ODc1NDA5OTgxNjE5NDI5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3d47bed25fcf0c1822133bd3774ab422681fc73ac2c5907378beb2648637c922 |
| hovercard-subject-tag | issue:4144988532 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/UiPath/uipath-python/1503/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7e38ca2d6a64c44cdda0dadec788e3a5d1336ff7e779fe48b0b0614d40e0146d/UiPath/uipath-python/issues/1503 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7e38ca2d6a64c44cdda0dadec788e3a5d1336ff7e779fe48b0b0614d40e0146d/UiPath/uipath-python/issues/1503 |
| og:image:alt | Summary sdk.entities.insert_records(entity_key="DepartmentBudget", ...) returns HTTP 400 "The value 'DepartmentBudget' is not valid." The parameter name entity_key implies a logical key (like a nam... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AlexBizon |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2422ccd4bc783f932948cce4871cb9e0622bab749db07f387c9631b7e6834d1f |
| turbo-cache-control | no-preview |
| go-import | github.com/UiPath/uipath-python git https://github.com/UiPath/uipath-python.git |
| octolytics-dimension-user_id | 375663 |
| octolytics-dimension-user_login | UiPath |
| octolytics-dimension-repository_id | 925171912 |
| octolytics-dimension-repository_nwo | UiPath/uipath-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 925171912 |
| octolytics-dimension-repository_network_root_nwo | UiPath/uipath-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2a39546baeb98186e651a01d5d7aa6465825eeb1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width