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
Copy file name to clipboardExpand all lines: policy/README.md
+27-20Lines changed: 27 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,11 @@ This specification describes the digital relationship between _mobility as a ser
9
9
## Table of Contents
10
10
11
11
-[General information](#general-information)
12
+
-[Background](#background)
12
13
-[Update Frequency](#update-frequency)
14
+
-[Updating or Ending Policies](#updating-or-ending-policies)
13
15
-[Versioning](#versioning)
14
-
-[Background](#background)
15
-
-[Distribution](#distribution)
16
+
-[Distribution](#distribution)
16
17
-[REST Endpoints](#rest-endpoints)
17
18
-[Responses and Error Messages](#responses-and-error-messages)
18
19
-[Authorization](#authorization)
@@ -53,21 +54,7 @@ The following information applies to all `policy` API endpoints.
53
54
54
55
[Top][toc]
55
56
56
-
### Update Frequency
57
-
58
-
The publishing agency should establish beforehand and communicate to providers how frequently the Policy endpoints are expected to change, how often they should be polled to get the latest information, and expectations around emergency updates.
59
-
60
-
[Top][toc]
61
-
62
-
### Versioning
63
-
64
-
`policy` APIs must handle requests for specific versions of the specification from clients.
65
-
66
-
Versioning must be implemented as specified in the [Versioning section][versioning].
67
-
68
-
[Top][toc]
69
-
70
-
## Background
57
+
### Background
71
58
72
59
The goal of the Policy API specification is to enable agencies to create, revise, and publish machine-readable policies, as sets of rules for individual and collective device behavior exhibited by both _mobility as a service_ providers and riders / users. [Examples](./examples/README.md) of policies include:
73
60
@@ -84,14 +71,34 @@ The machine-readable format allows Providers to obtain policies and compute comp
84
71
85
72
[Top][toc]
86
73
87
-
##Distribution
74
+
### Update Frequency
88
75
89
-
Policies shall be published by regulatory bodies or their authorized delegates as JSON objects. These JSON objects shall be served by either [flat files](#flat-files) or via [REST API endpoints](#rest-endpoints). In either case, policy data shall follow the [schema](#schema) outlined below.
76
+
The publishing agency should establish beforehand and communicate to providers how frequently the Policy endpoints are expected to change, how often they should be polled to get the latest information, and expectations around emergency updates.
90
77
91
-
Policies typically refer to one or more associated geographies. Geographic information is obtained from the MDS [Geography](/geography#general-information) API. Each policy and geography shall have a unique ID (UUID).
78
+
[Top][toc]
79
+
80
+
### Updating or Ending Policies
92
81
93
82
Published policies, like geographies, should be treated as immutable data. Obsoleting or otherwise changing a policy is accomplished by publishing a new policy with a field named `prev_policies`, a list of UUID references to the policy or policies superseded by the new policy.
94
83
84
+
To update a policy, create a new policy with the new rules rules, and list the now updated policy id in `prev_policies`.
85
+
86
+
To revoke or end a policy, create a new policy with empty rules, and list the ended policy id in `prev_policies`.
87
+
88
+
[Top][toc]
89
+
90
+
### Versioning
91
+
92
+
`policy` APIs must handle requests for specific versions of the specification from clients.
93
+
94
+
[Top][toc]
95
+
96
+
### Distribution
97
+
98
+
Policies shall be published by regulatory bodies or their authorized delegates as JSON objects. These JSON objects shall be served by either [flat files](#flat-files) or via [REST API endpoints](#rest-endpoints). In either case, policy data shall follow the [schema](#schema) outlined below.
99
+
100
+
Policies typically refer to one or more associated geographies. Geographic information is obtained from the MDS [Geography](/geography) API. Each policy and geography shall have a unique ID (UUID).
101
+
95
102
Geographical data shall be represented as GeoJSON `Feature` objects. No part of the geographical data should be outside the [municipality boundary][muni-boundary].
0 commit comments