feat: new ingestion endpoint#57
Conversation
vitaligi
commented
Nov 23, 2025
| Question | Answer |
|---|---|
| Bug fix | ✖ |
| New feature | ✔ |
| Breaking change | ✖ |
| Deprecations | ✖ |
| Documentation | ✖ |
| Tests added | ✖ |
| Chore | ✖ |
- added new api endpoint for handling new ingestion design (huge ingestion). it introduces /datasets endpoint with PUT action. it will act as an upsert on the ingested (multi)polygons into the new (planned) datasets resource (history).
841ced9 to
4e64110
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a new ingestion endpoint /datasets/{id} with a PUT operation to support a new "huge ingestion" design. The endpoint performs an upsert operation on validated datasets (multi-polygons) into a planned datasets resource with history tracking.
Key Changes:
- Added PUT endpoint
/datasets/{id}for upserting validated datasets by entity name - Returns 201 (Created) with Location header for new resources, or 204 (No Content) for updates
- Includes standard error responses (400, 404, 500) consistent with existing API patterns
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| summary: > | ||
| Insert validated datasets into datasets | ||
| description: > | ||
| Insert validated datasets into datasets by an id (entity name), creating the resource if it did not existed (upsert). |
There was a problem hiding this comment.
Grammar error: "existed" should be "exist". The correct phrasing is "if it did not exist" (present tense after "did not").
| Insert validated datasets into datasets by an id (entity name), creating the resource if it did not existed (upsert). | |
| Insert validated datasets into datasets by an id (entity name), creating the resource if it did not exist (upsert). |
| description: Created | ||
| headers: | ||
| Location: | ||
| description: URL of the newly created user resource |
There was a problem hiding this comment.
The description says "URL of the newly created user resource" but this endpoint creates a dataset resource, not a user resource. This should be "URL of the newly created dataset resource".
| description: URL of the newly created user resource | |
| description: URL of the newly created dataset resource |
| description: Entity name identifying the resource | ||
| schema: | ||
| $ref: './SchemaRaster/core/polygon-parts.yaml#/components/schemas/PolygonPartsEntityName' | ||
| required: true |
There was a problem hiding this comment.
The PUT endpoint is missing a requestBody definition. According to the description, this endpoint inserts validated datasets, which suggests data needs to be sent in the request body. All other POST and PUT endpoints in this API (e.g., /polygonParts, /polygonParts/validate) define a requestBody with the required schema. Please add a requestBody specification with the appropriate schema reference and content type.
| required: true | |
| required: true | |
| requestBody: | |
| description: Validated dataset payload | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/ValidatedDatasetPayload' |