You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement all 12 Systems methods in url_builder.ts and add Systems method tests to url_builder.spec.ts. Systems is the first Phase 2 resource type and establishes the pattern all subsequent resource type tasks (#6–#13) will follow.
ROADMAP Reference: Phase 2, Task 1 — Systems Methods (~2–2.5 hours implementation + ~0.5 hour testing, Medium complexity)
Files to Create or Modify
File
Action
Est. Lines
Purpose
src/ogc-api/csapi/url_builder.ts
Modify
~80–120 added
Add 12 Systems methods with resource validation
src/ogc-api/csapi/url_builder.spec.ts
Modify
~40–50 added
Add Systems method tests
Blueprint Reference
Follow the EDR pattern in src/ogc-api/edr/url_builder.ts (562 lines) — specifically how EDR methods validate resource availability, construct URLs, and append query parameters. Also follow the getSystems() / getDataStreams() examples in the Guide §6 (lines 857–891) which show the exact method pattern: resource validation → URL construction → query string appending.
Scope — What to Implement
12 Systems Methods
Each method validates resource availability (~2 lines), builds a URL using buildResourceUrl(), appends query parameters using buildQueryString(), and returns the constructed URL string.
Collection query:
getSystems(options?: SystemQueryOptions): string — GET /systems with pagination, filtering, bbox, datetime, sorting
Single resource:
getSystem(id: string, options?): string — GET /systems/{id}
CRUD operations:
createSystem(body: object): string — POST /systems
updateSystem(id: string, body: object): string — PUT /systems/{id}
getSystemHistory(id: string, options?): string — GET /systems/{id}/history
Hierarchical navigation:
getSystemSubsystems(id: string, options?): string — GET /systems/{id}/subsystems (supports recursive parameter)
Part 2 cross-links:
getSystemDataStreams(id: string, options?): string — GET /systems/{id}/datastreams
getSystemControlStreams(id: string, options?): string — GET /systems/{id}/controlstreams
Association links:
getSystemSamplingFeatures(id: string, options?): string — GET /systems/{id}/samplingFeatures
getSystemDeployments(id: string, options?): string — GET /systems/{id}/deployments
getSystemProcedures(id: string, options?): string — GET /systems/{id}/procedures
Systems Query Parameters
Systems supports: bbox, datetime, recursive, parent, deployment, procedure, foi, id, uid, q, property filters, limit, offset, f, sortBy, sortOrder.
All parameters are serialised by the shared buildQueryString() helper (Issue #3). Temporal support: datetime only (no phenomenonTime, resultTime, executionTime, or issueTime — see Guide §6 temporal applicability matrix).
JSDoc Requirements
Document each method with @param for all parameters, @returns description, and usage example
Add @see links to OGC CSAPI Part 1 specification sections for Systems endpoints
Follow the JSDoc style in src/ogc-api/edr/url_builder.ts
Task
Implement all 12 Systems methods in
url_builder.tsand add Systems method tests tourl_builder.spec.ts. Systems is the first Phase 2 resource type and establishes the pattern all subsequent resource type tasks (#6–#13) will follow.ROADMAP Reference: Phase 2, Task 1 — Systems Methods (~2–2.5 hours implementation + ~0.5 hour testing, Medium complexity)
Files to Create or Modify
src/ogc-api/csapi/url_builder.tssrc/ogc-api/csapi/url_builder.spec.tsBlueprint Reference
Follow the EDR pattern in
src/ogc-api/edr/url_builder.ts(562 lines) — specifically how EDR methods validate resource availability, construct URLs, and append query parameters. Also follow thegetSystems()/getDataStreams()examples in the Guide §6 (lines 857–891) which show the exact method pattern: resource validation → URL construction → query string appending.Scope — What to Implement
12 Systems Methods
Each method validates resource availability (~2 lines), builds a URL using
buildResourceUrl(), appends query parameters usingbuildQueryString(), and returns the constructed URL string.Collection query:
getSystems(options?: SystemQueryOptions): string—GET /systemswith pagination, filtering, bbox, datetime, sortingSingle resource:
getSystem(id: string, options?): string—GET /systems/{id}CRUD operations:
createSystem(body: object): string—POST /systemsupdateSystem(id: string, body: object): string—PUT /systems/{id}deleteSystem(id: string): string—DELETE /systems/{id}History:
getSystemHistory(id: string, options?): string—GET /systems/{id}/historyHierarchical navigation:
getSystemSubsystems(id: string, options?): string—GET /systems/{id}/subsystems(supportsrecursiveparameter)Part 2 cross-links:
getSystemDataStreams(id: string, options?): string—GET /systems/{id}/datastreamsgetSystemControlStreams(id: string, options?): string—GET /systems/{id}/controlstreamsAssociation links:
getSystemSamplingFeatures(id: string, options?): string—GET /systems/{id}/samplingFeaturesgetSystemDeployments(id: string, options?): string—GET /systems/{id}/deploymentsgetSystemProcedures(id: string, options?): string—GET /systems/{id}/proceduresSystems Query Parameters
Systems supports:
bbox,datetime,recursive,parent,deployment,procedure,foi,id,uid,q, property filters,limit,offset,f,sortBy,sortOrder.All parameters are serialised by the shared
buildQueryString()helper (Issue #3). Temporal support:datetimeonly (nophenomenonTime,resultTime,executionTime, orissueTime— see Guide §6 temporal applicability matrix).JSDoc Requirements
@paramfor all parameters,@returnsdescription, and usage example@seelinks to OGC CSAPI Part 1 specification sections for Systems endpointssrc/ogc-api/edr/url_builder.tsTesting Requirements
src/ogc-api/csapi/url_builder.spec.ts(~40–50 lines)getSystemswith pagination (limit,offset), filtering (id,q),bbox,datetime,sortBy/sortOrdergetSystemwith a specific IDcreateSystem,updateSystem,deleteSystem) produce correct URLsgetSystemSubsystemswithrecursive=true,getSystemDataStreams,getSystemDeployments)systemsis not inavailableResourcesthrows an errorsrc/ogc-api/edr/url_builder.spec.tsScope — What NOT to Touch
model.ts— type definitions belong to Issue Phase 1.1: Create Type System (csapi/model.ts) #1helpers.ts— helper utilities belong to Issue Phase 1.2: Create Helper Utilities (csapi/helpers.ts) #2buildResourceUrl(),buildQueryString(),extractAvailableResources(), oravailableResources— those belong to Issue Phase 1.3: Create Stub QueryBuilder (csapi/url_builder.ts) #3endpoint.ts,info.ts, orsrc/index.ts— integration belongs to Issue Phase 1.4: Integrate with OgcApiEndpoint #4Acceptance Criteria
url_builder.tscontains all 12 Systems methods listed abovebuildResourceUrl()andbuildQueryString()helpers@param,@returns,@seeurl_builder.spec.tscontains Systems tests covering pagination, filtering, bbox, CRUD, navigation, validation, and encoding (~40–50 lines)npm test)Dependencies
Blocked by: Issue #1 (Type System — provides
SystemQueryOptionsand resource types), Issue #2 (Helper Utilities — providesencodeBBox,encodeDateTime,encodeArray), Issue #3 (Stub QueryBuilder — provides constructor,buildResourceUrl,buildQueryString,availableResources)Blocks: Issues #6–#13 (all subsequent resource type methods follow the pattern established here)
Operational Constraints
Key constraints for this task:
References
Read these documents before starting implementation. They are ordered by priority.
Primary References (must read)
docs/planning/csapi-implementation-guide.mddocs/planning/csapi-implementation-guide.mddocs/planning/csapi-implementation-guide.mdbuildQueryStringcode examplesrc/ogc-api/edr/url_builder.tssrc/ogc-api/edr/url_builder.spec.tsdocs/planning/ROADMAP.mdUpstream Type/Import References (files this task imports from)
src/ogc-api/csapi/model.tsSystemQueryOptions,CSAPIResourceType(created by Issue #1)src/ogc-api/csapi/helpers.tsencodeBBox,encodeDateTime,encodeArray(created by Issue #2)Research References (context, not required reading)
docs/research/requirements/csapi-part1-requirements.mddocs/research/requirements/csapi-query-parameters.mddocs/research/requirements/csapi-subresource-navigation.md/systems/{id}/subsystems?recursive=true)docs/research/design/csapiquerybuilder/architecture-decision/results/DECISION-part3-validation.mdSpecification References (for
@seelinks and field accuracy)sosa:Sensor,sosa:Actuator,sosa:Platform)Convention Quick Reference
.jsextension for relative importsimport { X } from './file.js'import typefor interfaces/typesimport type { Y } from './model.js'export interface Z { ... }as constarrays for enum-like valuesexport const XTypes = [...] as constglobalThis.fetch = jest.fn()