docs(profiles): match the job create response in openapi

The 202 body documented usage_units and a results array. The API returns
entity_count_reserved, event_id and, for sample jobs, entity_ids; results
only appears on GET /v2/profiles/jobs/{id}/. The SDK types already use
entityCountReserved and entityIds, so the spec was the one out of step.

The docs sample example indexes entity_ids with .get(), matching the
notebook and the TS example's ?? [].
This commit is contained in:
Pratik
2026-09-23 10:29:15 -07:00
parent be1ded5793
commit 1121efe365
2 changed files with 11 additions and 7 deletions
+10 -6
View File
@@ -8450,8 +8450,13 @@
"entity_type": { "entity_type": {
"type": "string" "type": "string"
}, },
"usage_units": { "entity_count_reserved": {
"type": "integer" "type": "integer",
"description": "Entities reserved against usage for this job."
},
"event_id": {
"type": "string",
"nullable": true
}, },
"replayed": { "replayed": {
"type": "boolean", "type": "boolean",
@@ -8461,13 +8466,12 @@
"type": "integer", "type": "integer",
"description": "`sample` only." "description": "`sample` only."
}, },
"results": { "entity_ids": {
"type": "array", "type": "array",
"items": { "items": {
"type": "object", "type": "string"
"additionalProperties": true
}, },
"description": "`sample` only." "description": "`sample` only: the entity ids picked. Read each with `GET /v2/entities/user/{entity_id}/profile/`."
} }
} }
} }
+1 -1
View File
@@ -200,7 +200,7 @@ while True:
print(status["status"], status["succeeded"], "of", status["total"]) print(status["status"], status["succeeded"], "of", status["total"])
# The create response lists the sampled entities; read each one's saved profile. # The create response lists the sampled entities; read each one's saved profile.
for entity_id in job["entity_ids"]: for entity_id in job.get("entity_ids", []):
print(client.get_profile(entity_id)) print(client.get_profile(entity_id))
``` ```