feat: add App API imports, data index & workspace methods#245
Merged
Conversation
Batch 14 (final, stacked on Batch 13). Adds the last 6 App API endpoints to reach full parity: create/get import, batch-update attribute & event metadata, list workspaces, and list egress IP addresses. Contracts verified against the backend, not the OpenAPI spec: - createImport wraps the body under 'import'; requires data_file_url + type (people/event/object/relationship); object_type_id required for object imports; people_to_process/data_to_process are mutually exclusive. - Import ids are integers. - data_index attribute/event batch updates wrap under 'attributes'/'events' (1-100 items, each requires a name) and return 204. - listWorkspaces returns per-workspace usage counts; getIpAddresses returns the egress allowlist. Includes unit tests (100% coverage), live read/round-trip coverage (import create gated on CIO_TEST_IMPORT_CSV_URL), and docs. Completes the App API backfill.
karngyan
approved these changes
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The final set of the App API backfill which follows #244 and adds the last 6 endpoints to reach full parity:
createImportPOST /v1/importsgetImportGET /v1/imports/{id}batchUpdateAttributesPOST /v1/data_index/attributes(204)batchUpdateEventsPOST /v1/data_index/events(204)listWorkspacesGET /v1/workspacesgetIpAddressesGET /v1/info/ip_addressesAssisted by AI 🤖
Note
Medium Risk
createImportcan trigger bulk profile/data changes from a hosted CSV; batch data-index updates mutate workspace metadata, though client-side validation is limited to non-empty arrays.Overview
Completes the App API client backfill by exposing the last six endpoints on
APIClient: CSV imports (createImport/getImport), data index metadata batch updates (batchUpdateAttributes/batchUpdateEvents), and account workspace / egress IP reads (listWorkspaces/getIpAddresses).createImportposts a body wrapped underimport(same pattern ascreateSegment) and validates requireddata_file_urlandtype. New types (ImportInput,DataIndexAttribute, etc.) document import scopes and optional fields.docs/app.mdadds an “Imports, data index & workspace info” section.Coverage is extended with unit tests for validation and request shape, plus live integration tests (import round-trip gated on
CIO_TEST_IMPORT_CSV_URL).Reviewed by Cursor Bugbot for commit 96658ab. Bugbot is set up for automated code reviews on this repo. Configure here.