From e7c5faf436429f13dd73838e779536d2d7f761d5 Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Wed, 1 Apr 2020 20:34:41 -0400 Subject: [PATCH 1/6] Moving proposed policy author changes over from EA fork to here. --- policy-author/README.md | 131 ++++++++++++++++++++++++++++++++++++++++ policy/.README.md.swp | Bin 0 -> 32768 bytes policy/README.md | 19 ++++++ 3 files changed, 150 insertions(+) create mode 100644 policy-author/README.md create mode 100644 policy/.README.md.swp diff --git a/policy-author/README.md b/policy-author/README.md new file mode 100644 index 00000000..6f0a1d16 --- /dev/null +++ b/policy-author/README.md @@ -0,0 +1,131 @@ +# Policy-Author API (draft) + +## Background + +The Policy API specifies a pair of endpoints and a JSON schema for communicating mobility policy and geography to providers. This document describes a companion API to the provider-facing Policy endpoints for creating and editing Policy and Geography objects. + +[Policy PR](https://github.com/CityOfLosAngeles/mobility-data-specification/pull/322) + +## Endpoints + +The agency-facing Policy Author API consists of the following endpoints. The endpoints to list Policy and Geography objects are defined in the Policy API. The only addition is that when calling the GET /policies endpoint, append ?unpublished to get the unpublished ones, separate from the published ones. Adding ?unpublished will have no effect if your access token has a provider_id. + +### Policy Endpoints + +#### Schema + +See Policy API. + +Metadata is free-form JSON format. + +### POST /policies + +Create a new unpublished (mutable) Policy + +Payload: a new Policy object, without a `policy_id` + +Returns: the Policy object on success, including a `policy_id`; a failure explanation on failure + +Response codes: + +- 201 - created +- 400 - Policy does not conform to schema +- 401 - unauthorized (if any auth issue) +- 500 - server error (hopefully doesn’t happen) + +### PUT /policies/{id} + +Update an existing Policy. Must be unpublished. + +Payload: a new Policy object + +Returns: the Policy object on success, a failure explanation on failure + +Response codes: + +- 200 - success +- 400 - Policy does not conform to schema +- 401 - unauthorized +- 404 - not found +- 409 - conflict (if immutable) +- 500 - server error + +### POST /policies/{id}/publish + +Publish (make immutable) a Policy. Must be unpublished. + +Response codes: + +- 200 - success +- 401 - unauthorized +- 404 - not found +- 409 - conflict (if already published) +- 500 - server error + +### GET /policies/meta + +Get a list of policy metadata. Search parameters TBD. + +### GET /policies/{id}/meta + +Get metadata for a specific policy. + +### PUT /policies/{id}/meta + +Create/Update + +### Geography Endpoints + +#### Schema + +Geographies are GeoJSON. + +Metadata is free-form JSON format. + +### GET /geographies/meta + +Get a list of geography metadata. Search parameters TBD. + +### GET /geographies/{id}/meta + +Get metadata for a specific geography. + +### PUT /geographies/{id}/meta + +Create/Update + +### POST /geographies + +Create a new unpublished (mutable) Geography + +Payload: a new Geography object + +Returns: the Geography object on success, a failure explanation on failure + +Response codes: + +- 201 - created +- 400 - Geography is not conformant GeoJSON +- 401 - unauthorized (if any auth issue) +- 409 - conflict (if exists) +- 500 - server error (hopefully doesn’t happen) + +### PUT /geographies/{id} + +Update an existing Geography. Must be mutable. + +Payload: an updated Geography object + +Returns: the Geography object on success, a failure explanation on failure + +Response codes: + +- 200 - success +- 400 - Geography does not conform to schema +- 401 - unauthorized +- 404 - not found +- 409 - conflict (if unwritable) +- 500 - server error + +Note that there is no equivalent /publish endpoint for Geography objects. Implementations should treat Geography objects as writable until they are referenced in a published Policy, and unwritable after. Any implementation of a Policy editor UI should keep track of the writability of any referenced Geography object and potentially alert the user. + diff --git a/policy/.README.md.swp b/policy/.README.md.swp new file mode 100644 index 0000000000000000000000000000000000000000..f56652e27bbfd06488663d79e65718793c4ebf7b GIT binary patch literal 32768 zcmeI5d5|PoUB`<>SApF{IlLhBZ4DvaLsxar1T^h`6|vl~V`c4k*)cjZo1 zW|^5aJ+(UvDu@OOC?fu0hzF=45C%vnD-wo*2p$21@`p!Yge!swVJLEX5c>K3-g{YD z)jd5k3mS%0#eS!{GGD&q_kQnpz2D1SU%2noqPe5FzsBdAYPBaE_>u1qe(LXQKW%EY z2f`$h%h&p}(sVt_`cZqhd&!qdh4Wi!c5%KNwgySq=%wp%H!g;ac36asydSmVjkpyS zahlBc({9`v&YwGRbIMxKIQx_ z4@_@ODKMqLlmb%z?1@03QQ?5rNI9;3KadDYcFF^H@Sf=y6?wLe1E!%b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7yqln#d7#@=ZfpRYt40Z*B&xmwq*2JVE@^9I|oFqYGt|1T+P@Tg#s z@YJT# zCj>T&>-)1}#f-W!-ia|njO>)JUQe_S_PDkl15;X5*ZTyo zRd;?ya^?EQd$m%QA)MwR9Hwl)8&`TQWsmanN*p=*CE*Zp{fH)^G|HuLr_%x&*0U!Z z#ub4E-H7Q*%wtrs?UUB00Xpsbc)WIOZpwvH;fBFR)MPihf?BCTZ<*l#yj~yjBO{r4TURRj&F$(To2S0XmyNF*>_PB8&Z=bXK|1ZUN z{}2%WAD3P~3BLYE@$+8<9^vA5gV#G>|8acRz{hyzQSf2^ynA-~HKo9m0#gc1DKMqL zlmb%z?1_2D-@9UjWz9k`l1=-FIt~$Jb6)fC?y&r+em9=;Lm!%RsVO)50M`P zob}(+=_Uam$$KVUAR%LcV2rP@j3g4}ZQ6Igj=g?D-*SrE%TB&aXrtbm?DP2C2N#<0 ztyd!x{#yC%dvsjVB?t`oT$dpc+>JORC@RTR>@TrT8rm1_S(2C;w$(=N`fORF{log< z_Wh?5{Sh)qG{(k;CY~G7NPARvN8jGl<0Z!=+xR!M?%spRinT|R5ffji>Ye**<#$P= z%4@x=q$&&E;2+wf5&LLDXITZWYp`joceymyWA0UlX>vCNJV(K@h}l+zJ#ClZX_H*& zZrM=T#P&ZXdQ?r*kmg2jZ`$^#?~xYyY7ob@pgo$5rTEsbF>97aKDshuCI9$i`@T~9 EZ+AB{B>(^b literal 0 HcmV?d00001 diff --git a/policy/README.md b/policy/README.md index f95dc17f..573d492d 100644 --- a/policy/README.md +++ b/policy/README.md @@ -167,6 +167,25 @@ The optional `end_date` field applies to all policies represented in the file. [Top](#table-of-contents) ## Schema + + +### Geography Fields + +| Name | Type | R/O | Description | +| ------------------------ | -------------------------- | --- | ------------------------------------------------------------------------------- | +| `name` | String | R | Name of Geography | +| `geography_id` | UUID | R | UUID of Geography | +| `geography_json` | GeoJSON | R | GeoJSON FeatureCollection representation of geography | +| `description` | String | O | Description of Geography | +| `publish_date` | timestamp | O | Date Geography was made immutable (if applicable) | +| `effective_date` | timestamp | O | Date of Geography's first use in an active policy (if applicable) | +| `previous_geography_ids` | UUID[] | O | Logically connected previous geographies. e.g. Venice Beach bounds are updated | + + + + +### Policy Fields + All response fields must use `lower_case_with_underscores`. From cb6c96f56d730b12f510b9b464d301fe268d2e63 Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Wed, 1 Apr 2020 22:41:15 -0400 Subject: [PATCH 2/6] Minor updates to Policy and Policy Author. --- policy-author/.README.md.swp | Bin 0 -> 16384 bytes policy-author/README.md | 91 ++++++++++++----------------------- policy/.README.md.swp | Bin 32768 -> 36864 bytes policy/README.md | 36 +++++--------- 4 files changed, 43 insertions(+), 84 deletions(-) create mode 100644 policy-author/.README.md.swp diff --git a/policy-author/.README.md.swp b/policy-author/.README.md.swp new file mode 100644 index 0000000000000000000000000000000000000000..1d1f8cdedc51a4ddd4df868d034373cfd2230337 GIT binary patch literal 16384 zcmeI2TWlRi8OMi)mL|{y6+tRqm=cLN5TD~ZL3IPA3aJ}hk=V+mJfJon@6PerX3y@j zm$;{K)9_FlL;@0Rsv;58rxumuh099|+!PLh1!UD{i7lfJDP@X7}8Wj~xji zKx^q|duL~7zxmJ1H{Z~;I8SPzak!zLfowaZIV~}al&vx z$B}lMqjR1x1y+~B_-NHvP8O)~M!4YlUfLXYRjS65NIPE5b5!buK{X0}&uNaUEUkxe z^}zJ*TlY;@8t&*H zA$||Pgp2SU_%?hU4uOD2-X_HL@IKfCm(c9H@C2NNlVEiG8axUQljjsX2mv(Uc9?-G zRN$}Vdjl@Qb8rF9!x=aYC*VF*^Pj>DM5of9{a=!8LyFJw|V=GD4t zv(0AMNroUaVrPMCQ*I!IPj2kjG~T^BPc(&h%yL6*nlH6QhjBxup-h~*ZYWBa%q__r zM<)s6M<-DjB$~XgPIj4uG>d~|mldK@X5PLs3}li&iu$sqJU^qQ^gWTU0^8swN0BVV zoND@^a(AJS%p$%GqV4*Nq>I}-CXc?yOH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qP+4!%4J|5mx&d+3= z-08OSuR@g;8fZMkr*}2*CEs>FJ7C*MA7jdpCa8%q+AcCFreh-sR2Gu#5%*BBXh%F> zTSgF(JO=*so>J#OKxA%AJHB0nD5yRmpPMwQ4gi>7oBZ}M&7@5)yGS)hzx z4?N7NvXOTV9Nkl_Dl&a9eI`UF!p0_`f~E<0I&O^ZVDF(W8g9o%Noy=zY?9Xv)^5G! z>BhriY$8l4BEhjbC$yXU_bL14_9J-5J_qBCbl_whvJ<1HNHG$kgPo)VHOSC4Et;74g;{wr(Kpwqah=_#7l85NNbKKX{I zsz_pVjNUKCsi3O379tYc#+OGn)vM`&jM~-GK{59KAdEix m`a1mla;Unx(5G>~W+urXe - -### Geography Fields - -| Name | Type | R/O | Description | -| ------------------------ | -------------------------- | --- | ------------------------------------------------------------------------------- | -| `name` | String | R | Name of Geography | -| `geography_id` | UUID | R | UUID of Geography | -| `geography_json` | GeoJSON | R | GeoJSON FeatureCollection representation of geography | -| `description` | String | O | Description of Geography | -| `publish_date` | timestamp | O | Date Geography was made immutable (if applicable) | -| `effective_date` | timestamp | O | Date of Geography's first use in an active policy (if applicable) | -| `previous_geography_ids` | UUID[] | O | Logically connected previous geographies. e.g. Venice Beach bounds are updated | - From 63cfca18fb03e520cc692ddb010694ecf0097fd3 Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Wed, 1 Apr 2020 23:16:12 -0400 Subject: [PATCH 3/6] Adding a missing endpoint to Policy Author spec. --- .gitignore | 3 ++- policy-author/.README.md.swp | Bin 16384 -> 0 bytes policy-author/README.md | 21 +++++++++++++++++++++ policy/.README.md.swp | Bin 36864 -> 0 bytes policy/README.md | 15 +++------------ 5 files changed, 26 insertions(+), 13 deletions(-) delete mode 100644 policy-author/.README.md.swp delete mode 100644 policy/.README.md.swp diff --git a/.gitignore b/.gitignore index 0cafc1cd..49800733 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.venv/ \ No newline at end of file +.venv/ +*.swp diff --git a/policy-author/.README.md.swp b/policy-author/.README.md.swp deleted file mode 100644 index 1d1f8cdedc51a4ddd4df868d034373cfd2230337..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeI2TWlRi8OMi)mL|{y6+tRqm=cLN5TD~ZL3IPA3aJ}hk=V+mJfJon@6PerX3y@j zm$;{K)9_FlL;@0Rsv;58rxumuh099|+!PLh1!UD{i7lfJDP@X7}8Wj~xji zKx^q|duL~7zxmJ1H{Z~;I8SPzak!zLfowaZIV~}al&vx z$B}lMqjR1x1y+~B_-NHvP8O)~M!4YlUfLXYRjS65NIPE5b5!buK{X0}&uNaUEUkxe z^}zJ*TlY;@8t&*H zA$||Pgp2SU_%?hU4uOD2-X_HL@IKfCm(c9H@C2NNlVEiG8axUQljjsX2mv(Uc9?-G zRN$}Vdjl@Qb8rF9!x=aYC*VF*^Pj>DM5of9{a=!8LyFJw|V=GD4t zv(0AMNroUaVrPMCQ*I!IPj2kjG~T^BPc(&h%yL6*nlH6QhjBxup-h~*ZYWBa%q__r zM<)s6M<-DjB$~XgPIj4uG>d~|mldK@X5PLs3}li&iu$sqJU^qQ^gWTU0^8swN0BVV zoND@^a(AJS%p$%GqV4*Nq>I}-CXc?yOHwab>}0CQeOZ#q1uYwy?IftVWy=;hcleO3 zE*8Dd(@FKX=iWD5XgO97BVEf(%NS*Xmri~qm30+GI><#HXa#FWlHcst+cuM;N0=sH zoFtjfGxoND9YF0CP>dHUe*3}M{k92Ap^h05wBLWK31py`I>HtMR){^;3>wqi&H^*Y zMo({fXYSLQTCLE^sZSN??kz5GTJ5sS~;4+MlN;HEkWaMVr zifTt#(XacvwG_*8eo?1K@*3jEv^y`QT$V{1n;y3;XYJ)otz9mTpt!l!ykqP3!m>m* zbgImkZpJxu6)5eeZuG_qMVZoCFKv6S`G3O;+l6(#&b(>7>xb90uk!!9Q`)yi{bQ}) zuNpe9i>Z!0)QpPDWqF`FOUkV}abhnrANsZPjreC7mp}t*{Iu~kduc%>nO0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Pi2qJ#k-*5QeH|!(O;G?kJB*D2y7NivMij< zgLd`-7{zB?TnYi&UIoog&+=HnW+KKIF|t!0JxY`j_PDkl18Z0sPN}7A{~n{EctT7h z!g4_hUjEBTrG2^(;V>2Z?WEGLQuZi6&&1)OEOH3lQNv%Osc?f^1=JChC>!CHv4uc` zZgM1s@a3ptOOy6a19aNE@esopU-F4k(6*P)5&KQ0VNx3xb@7BA@S68g85Bpn&@icI znJD=s`*-n5e(M|lLs!5_O-@s~sJQ{j2jMam_ah&p%_@FD#pBYIy#1ct|9=yH{ewXK zf820=iU0ri;IrT%Aou?i$g==`4gdf9z^m~8{}tcA0UpBtFJC1GN)D79C^=AapyWWw zfsz9y2TBfnOF1C%8*AFz2Rx@0Q+Z)v#DV)EyE(efv)Xv_b6UOeg|oqp5QqOS(HPlA zTFwK1)&nm3znh#C0?u3`@)NHTO_#i9(gphVfu_Dfv#JjeC@Cs=1742*e+KLa`@j>x2Z;yV z51L>FoB+qcmEa2SW%2?Z1iuXWK%NQsMe+mw349WK0$c^I1oGU!hrmyO(_k;y1D*|@ z1+E280slij!QX=W!TZ5)f&0J^To1I5-%@p4Hdb<=FVxD z|NPj|*1r~1EL`)2N&c=Z_#_d#voAR(vVWgb!RHYd`0WijfG+uBqo13Rev@~$lJc`T zdfJ=(6+M!|Gfc_3lAjuq1g!kmZzOe~sV8T6#;MJ0DIBOGm=mt~ECWqs=cixvhkGQ* zLt?>rYK7ims~-$9U8 z<%yQ|kXi9rep?(g)1U8gHQI*^JI)m5i_O&1w4)_^1c(OhA0$?dom^mehyfOVUm-u1 OJbnn7XKhYbD*p#dmU)W+ diff --git a/policy/README.md b/policy/README.md index b7ff85a3..a101ef42 100644 --- a/policy/README.md +++ b/policy/README.md @@ -86,11 +86,10 @@ The response to a client request must include a valid HTTP status code defined i #### Policies -Endpoint: `/policies/{id}` -Method: `GET` -`data` Payload: `{ "policies": [] }`, an array of objects with the structure [outlined below](#policy). +#### GET `/policies/` +`data` Payload: `{ "policies": [] }`, an array of Policy objects. -##### Query Parameters +Parameters | Name | Type | Required / Optional | Description | | ------------ | --------- | --- | ---------------------------------------------- | @@ -104,14 +103,6 @@ Policies will be returned in order of effective date (see schema below), with pa `provider_id` is an implicit parameter and will be encoded in the authentication mechanism, or a complete list of policies should be produced. If the Agency decides that Provider-specific policy documents should not be shared with other Providers (e.g. punitive policy in response to violations), an Agency should filter policy objects before serving them via this endpoint. -Response codes: - -- 200 - success -- 401 - unauthorized -- 404 - not found -- 500 - server error - - ### Flat Files To use flat files, policies shall be represented in two (2) files: From de084d133e38bff5e460e58d85b90311e4628abe Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Tue, 14 Apr 2020 21:54:44 -0400 Subject: [PATCH 4/6] Adding minor note for expected response body. --- policy-author/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/policy-author/README.md b/policy-author/README.md index ca2f195b..000e1207 100644 --- a/policy-author/README.md +++ b/policy-author/README.md @@ -12,6 +12,8 @@ The agency-facing Policy Author API consists of the following endpoints. The end ### Policy Endpoints +Responses must set the `Content-Type` header, as specified in the [Provider versioning](../provider/README.md#versioning) section. They must also specify the API version in the JSON-formatted response body, under the `version` key. + #### Schema See Policy API. From ff70d65f69f1b73715d77d4fd2a9d136ccab1035 Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Mon, 27 Apr 2020 20:28:38 -0400 Subject: [PATCH 5/6] Removing service_areas reference and changing id to policy_id in spec. --- .gitignore | 3 +-- policy-author/README.md | 12 +++++------- policy/README.md | 4 ++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 49800733..0cafc1cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -.venv/ -*.swp +.venv/ \ No newline at end of file diff --git a/policy-author/README.md b/policy-author/README.md index 000e1207..b5458399 100644 --- a/policy-author/README.md +++ b/policy-author/README.md @@ -29,7 +29,7 @@ A note: the `get_published` and `get_unpublished` parameters only make sense in Parameters: | Name | Type | R/O | Description | | ------------ | --------- | --- | ---------------------------------------------- | -| `id` | UUID | Optional | If provided, returns one policy object with the matching UUID; default is to return all policy objects. | +| `policy_id` | UUID | Optional | If provided, returns one policy object with the matching UUID; default is to return all policy objects. | | `get_published` | string | O | If set to the string 'true', returns metadata of published policies. | | `get_unpublished` | string | O | If set to the string 'true', returns metadata of unpublished policies. | @@ -47,8 +47,6 @@ Create a new unpublished (mutable) Policy Payload: a new Policy object, without a `policy_id` -; a failure explanation on failure - Response codes: - 201 - Created. Returns: the Policy object on success, including a `policy_id` and a `version` indicating the current API version. @@ -56,7 +54,7 @@ Response codes: - 401 - Unauthorized (if any auth issue) - 500 - Server error (hopefully doesn’t happen) -### PUT /policies/{id} +### PUT /policies/{policy_id} Update an existing Policy. Must be unpublished. @@ -71,7 +69,7 @@ Response codes: - 409 - conflict (if immutable) - 500 - server error -### POST /policies/{id}/publish +### POST /policies/{policy_id}/publish Publish (make immutable) a Policy. Must be unpublished. @@ -101,7 +99,7 @@ Response codes: - 500 - server error -### GET /policies/{id}/meta +### GET /policies/{policy_id}/meta Get metadata for a specific policy. @@ -112,7 +110,7 @@ Response codes: - 500 - server error -### PUT /policies/{id}/meta +### PUT /policies/{policy_id}/meta Edit metadata for a specific policy. Takes a PolicyMetadata object in the request body. Response codes: diff --git a/policy/README.md b/policy/README.md index a101ef42..8390ef80 100644 --- a/policy/README.md +++ b/policy/README.md @@ -22,9 +22,9 @@ The goal of this specification is to enable Agencies to publish machine-readable The machine-readable format allows Providers to obtain policies and compute compliance where it can be determined entirely by data obtained internally. -Policies will typically be linked to one or more associated geographies. Geography descriptions (e.g. geofences or lists of street segments) must also be maintained by the Agency indefinitely. Policies without specific geographies (global policies) are assumed to apply to the entire service area managed by the Agency. +Policies will typically be linked to one or more associated geographies. Geography descriptions (e.g. geofences or lists of street segments) must also be maintained by the Agency indefinitely. Policies without specific geographies (global policies) are assumed to apply to all jurisdictions managed by the Agency. -Geographical data will be stored as immutable GeoJSON, referenced by UUID. See the Geography and Geography Author specs for information on the Geography schema, and how Agencies are expected to create and maintain Geographies and serve them to Providers. In a future revision of Agency, we will deprecate the existing `/service_areas` endpoint. `/service_areas` currently only handles GeoJSON MultiPolygon and Polygon objects, and Policy documents might prefer Points for locations such as drop-zones. Policy may be used for a variety of enforcement actions, so it's important for the Agency to persist and keep immutable both Policy and Geography data. +Geographical data will be stored as immutable GeoJSON FeatureCollections (see https://tools.ietf.org/html/rfc7946 for details on what a FeatureCollection is), referenced by UUID. See the Geography and Geography Author specs for information on the Geography schema, and how Agencies are expected to create and maintain Geographies and serve them to Providers. Policies are not confined to describing their effects over a geographic area. They might prefer Points for locations such as drop-zones. Policy may be used for a variety of enforcement actions, so it's important for the Agency to persist and keep immutable both Policy and Geography data. From b2440a9cc8b2b53177a0fb8e6f10029aa63e3d48 Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Fri, 1 Apr 2022 13:31:04 -0400 Subject: [PATCH 6/6] updating http verb for publish endpoint --- policy-author/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policy-author/README.md b/policy-author/README.md index b5458399..98839edf 100644 --- a/policy-author/README.md +++ b/policy-author/README.md @@ -69,7 +69,7 @@ Response codes: - 409 - conflict (if immutable) - 500 - server error -### POST /policies/{policy_id}/publish +### PUT /policies/{policy_id}/publish Publish (make immutable) a Policy. Must be unpublished.