Query and Path Params
Authentication Header
Authorization: Bearer <KOJI_SECRET>
- Required only when server env
KOJI_SECRETis set. - Ignored if session-authenticated in UI context.
Return Type Values
These values are accepted in path /{return_type} and in body return_type/query rt.
| Value | Output |
|---|---|
alt_text | Text with lat lon,lat lon style |
text | Text with lat,lon lines |
array | Uses single or multi array based on inferred default |
single_array | [[lat, lon], ...] |
multi_array | [[[lat, lon], ...], ...] |
struct | Uses single or multi struct based on inferred default |
single_struct | [{"lat":...,"lon":...}] |
multi_struct | [[{"lat":...,"lon":...}]] |
geometry | GeoJSON geometry (or list if multiple features) |
geometry_vec | List of GeoJSON geometries |
feature | GeoJSON feature (or list if multiple features) |
feature_vec | List of GeoJSON features |
feature_collection | GeoJSON FeatureCollection |
poracle | Poracle format |
sql | SQL predicate text |
Aliases accepted by server include camel/compact versions (example: featurecollection, geometryvec).
Geofence Query Params (ApiQueryArgs)
Used by:
GET /api/v1/geofence/allGET /api/v1/geofence/area/{geofence}GET /api/v1/geofence/{return_type}GET /api/v1/geofence/{return_type}/{project}
Visibility and shape
| Param | Type | Purpose |
|---|---|---|
internal | boolean | Include internal __ properties and generated ids. |
id | boolean | Include id property. |
name | boolean | Include name property. |
mode | boolean | Include mode property. |
geofence_id | boolean | Include geofence_id property. |
parent | boolean | Include parent property. |
rt | string | Return type override. |
group | boolean | Set group from parent. |
fullcoords | boolean | Keep full floating-point precision. |
Name manipulation
Applied in server order to the name property:
ignoremanualparent -> trimstart -> trimend -> alphanumeric -> replace -> parentreplace -> parentstart -> parentend -> lowercase -> uppercase -> capfirst -> capitalize -> underscore -> dash -> space -> unpolish -> final trim.
Examples assume name="North, NY" and parent="NY" unless stated otherwise.
| Param | Type | Purpose | Example |
|---|---|---|---|
lowercase | boolean | Force lowercase name. | lowercase=true -> north, ny |
uppercase | boolean | Force uppercase name. | uppercase=true -> NORTH, NY |
capitalize | string | Capitalize words split by provided separator. | capitalize="_" on north_ny -> North_Ny |
capfirst | boolean | Capitalize first character only. | capfirst=true on north, ny -> North, ny |
parentstart | string | Prefix name with parent joined by string. | parentstart=" - " -> NY - North, NY |
parentend | string | Suffix name with parent joined by string. | parentend=" - " -> North, NY - NY |
parentreplace | string | Replace parent substring in name with string. | parentreplace="" -> North, |
space | string | Replace spaces with string. | space="_" -> North,_NY |
underscore | string | Replace underscores with string. | underscore=" " on North_NY -> North NY |
dash | string | Replace dashes with string. | dash=" " on North-NY -> North NY |
replace | string | Remove occurrences of substring. | replace="," -> North NY |
trimstart | integer | Trim N chars from start. | trimstart=7 -> NY |
trimend | integer | Trim N chars from end. | trimend=4 -> North |
unpolish | boolean | Convert Polish chars to ASCII. | unpolish=true on Łódź -> Lodz |
ignoremanualparent | boolean | Ignore manual parent property. | ignoremanualparent=true uses DB parent over manual override. |
alphanumeric | boolean | Remove non-alphanumeric chars except spaces/dash/underscore. | alphanumeric=true on North, NY! -> North NY |
Filtering
| Param | Type | Purpose |
|---|---|---|
excludeproperties | string | Comma-separated property keys to exclude. |
excludeparents | string | Comma-separated parent names to exclude. |
exclude | string | Comma-separated names to exclude. |
Route Query Params
Used by route endpoints:
GET /api/v1/route/allGET /api/v1/route/area/{id}GET /api/v1/route/{return_type}GET /api/v1/route/{return_type}/{geofence_name}
| Param | Type | Purpose |
|---|---|---|
internal | boolean | Include internal fields in route responses. |
rt | string | Return type override (only used by /route/area/{id}). |
Path Params
| Endpoint | Param | Type | Notes |
|---|---|---|---|
/api/v1/geofence/area/{geofence} | geofence | string | Geofence id/name lookup. |
/api/v1/geofence/reference/{project} | project | string | Project name/id used by DB query. |
/api/v1/geofence/{return_type} | return_type | string | See return type table. |
/api/v1/geofence/{return_type}/{project} | return_type, project | string | Return format + project filter. |
/api/v1/geofence/push/{id} | id | string | Geofence id to push to scanner/controller DB. |
/api/v1/route/area/{id} | id | string | Route id/name lookup. |
/api/v1/route/reference/{geofence} | geofence | string | Geofence name filter. |
/api/v1/route/{return_type} | return_type | string | See return type table. |
/api/v1/route/{return_type}/{geofence_name} | return_type, geofence_name | string | Return format + geofence filter. |
/api/v1/route/push/{id} | id | integer | Numeric Koji route id. |
/api/v1/project/push/{id} | id | string | Project id/name in Koji DB. |
/api/v1/calc/{mode}/{category} | mode, category | string | category: gym, pokestop, spawnpoint, fort. |
/api/v1/calc/route-stats/{category} | category | string | Same category rules as above. |
/api/v1/s2/{cell_level} | cell_level | integer | S2 cell level to generate. |
Last updated on