Skip to content

feat: add App API imports, data index & workspace methods#245

Merged
mike-engel merged 1 commit into
cdp-6277from
cdp-6278
Jul 15, 2026
Merged

feat: add App API imports, data index & workspace methods#245
mike-engel merged 1 commit into
cdp-6277from
cdp-6278

Conversation

@mike-engel

@mike-engel mike-engel commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

The final set of the App API backfill which follows #244 and adds the last 6 endpoints to reach full parity:

Method Endpoint
createImport POST /v1/imports
getImport GET /v1/imports/{id}
batchUpdateAttributes POST /v1/data_index/attributes (204)
batchUpdateEvents POST /v1/data_index/events (204)
listWorkspaces GET /v1/workspaces
getIpAddresses GET /v1/info/ip_addresses

Assisted by AI 🤖


Note

Medium Risk
createImport can 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).

createImport posts a body wrapped under import (same pattern as createSegment) and validates required data_file_url and type. New types (ImportInput, DataIndexAttribute, etc.) document import scopes and optional fields. docs/app.md adds 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.

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.
@mike-engel mike-engel changed the title feat: add App API imports, data index & workspace methods (CDP-6278) feat: add App API imports, data index & workspace methods Jul 15, 2026
@mike-engel mike-engel self-assigned this Jul 15, 2026
@mike-engel
mike-engel merged commit 83bc764 into cdp-6277 Jul 15, 2026
11 checks passed
@mike-engel
mike-engel deleted the cdp-6278 branch July 15, 2026 13:09
@mike-engel mike-engel mentioned this pull request Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants