post
/api/v2/origin-destination/segmentsPython SDK method:
client.origin_destination.segment(params).run()Start OD segment analysis job
Creates a job to generate an OD segment analysis using zone-pair identifiers from a completed OD matrix job. An empty zonePairIds list includes all pairs that have had a route analysis run against them. You must first run and complete an O/D matrix (Closed, Segment Flow, or Open-Ended) and a Route Analysis before calling this endpoint; jobId must be that matrix job's ID.
Altitude Help Center — getODSegmentAnalysisRequest Body
Analysis parameters.
application/json: object
| Name | Type | Input Shape | Values | Description | Value Required |
|---|---|---|---|---|---|
jobId | string | - | - | Job ID of the OD Matrix (Closed, Segment or Open Ended) on which to run the Segment Analysis. A completed Route Analysis for this matrix job is also required before calling this endpoint. | Y |
zonePairIds | array<string> | - | - | Identifiers of the source rows to include in the segment analysis: zonePairId values from closed matrix results, or flowId values from open-ended and corridor matrix results. An empty or omitted array includes all pairs that have had a route analysis run against them. | N |
Examples
OD segment analysis request
Converted from the v1 segment analysis example. Use zonePairIds from a completed matrix result.
{
"jobId": "its_1784148529857_j2z6k08bocf",
"zonePairIds": [
"zone-pair-id-from-matrix"
]
}Success Responses
202 response: object
Job accepted and queued for processing. Poll the location header URL to check status.
| Name | Type | Description |
|---|---|---|
error | object | Details about why the job failed (RFC 7807 format), or null if it succeeded. |
id | string | Unique job identifier. |
links | object | Navigation URLs for polling and result retrieval. |
status | string | Current job lifecycle state: PENDING, QUEUED, RUNNING, DONE, FAILED, CANCELED, or NOT_FOUND. |
Response Errors
| HTTP Status Code | Reason |
|---|---|
| 400 | The request body or parameters are invalid. |
| 401 | Authentication is required or the provided credentials are invalid. |
| 403 | The authenticated user lacks permission to perform this operation. |
| 409 | The operation conflicts with the current state of the resource. |
| 422 | The request is syntactically valid but semantically cannot be processed. |
| 429 | The request rate limit has been exceeded. |
| 500 | An unexpected server error occurred. |