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: agency/README.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,10 @@ This specification contains a collection of RESTful APIs used to specify the dig
9
9
## Table of Contents
10
10
11
11
*[General Information](#general-information)
12
+
*[Authorization](#authorization)
12
13
*[Versioning](#versioning)
13
14
*[Modes](#modes)
14
15
*[Responses and Error Messages](#responses-and-error-messages)
15
-
*[Authorization](#authorization)
16
16
*[GBFS](#gbfs)
17
17
*[Vehicles](#vehicles)
18
18
*[Vehicle - Status](#vehicle---status)
@@ -34,6 +34,15 @@ This specification uses data types including timestamps, UUIDs, and vehicle stat
34
34
35
35
[Top][toc]
36
36
37
+
38
+
### Authorization
39
+
40
+
When making requests, the Agency API expects `provider_id` to be part of the claims in a [JWT](https://jwt.io/)`access_token` in the `Authorization` header, in the form `Authorization: Bearer <access_token>`. The token issuance, expiration and revocation policies are at the discretion of the Agency. [JSON Web Token](/general-information.md#json-web-tokens) is the recommended format.
41
+
42
+
General authorization details are specified in the [Authorization section](/general-information.md#authorization) in MDS General Information.
43
+
44
+
[Top][toc]
45
+
37
46
### Versioning
38
47
39
48
`Agency` APIs must handle requests for specific versions of the specification from clients.
@@ -54,12 +63,6 @@ See the [Responses][responses] and [Error Messages][error-messages] sections.
54
63
55
64
[Top][toc]
56
65
57
-
### Authorization
58
-
59
-
When making requests, the Agency API expects `provider_id` to be part of the claims in a [JWT](https://jwt.io/)`access_token` in the `Authorization` header, in the form `Authorization: Bearer <access_token>`. The token issuance, expiration and revocation policies are at the discretion of the Agency.
60
-
61
-
[Top][toc]
62
-
63
66
### GBFS
64
67
65
68
See the [GBFS Requirement](/README.md#gbfs-requirement) language for more details.
Copy file name to clipboardExpand all lines: general-information.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ OAuth 2.0's `client_credentials` grant type (outlined in [RFC6749](https://tools
69
69
70
70
OAuth 2.0 is an industry standard authorization framework with a variety of existing tooling. The `client_credentials` grant type facilitates generation of tokens that can be used for access by agencies and distributed to data partners.
71
71
72
-
If an MDS `provider` implements this auth scheme, it **MAY** choose to specify token scopes that define access parameters like allowable time ranges. These guidelines **SHOULD** be encoded into the returned token in a parseable way.
72
+
If an MDS provider implements this auth scheme, it **MAY** choose to specify token scopes that define access parameters like allowable time ranges. These guidelines **SHOULD** be encoded into the returned token in a parseable way.
Copy file name to clipboardExpand all lines: metrics/README.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,10 @@ The Metrics API endpoints are intended to be implemented by regulatory agencies,
10
10
11
11
-[General Information](#general-information)
12
12
-[Implementation](#implementation)
13
+
-[Authorization](#authorization)
13
14
-[Data Requirements](#data-requirements)
14
15
-[Beta Feature](#beta-feature)
15
16
-[Date and Time Format](#date-and-time-format)
16
-
-[Authorization](#authorization)
17
17
-[Data Redaction](#data-redaction)
18
18
-[Metrics Discovery API](#metrics-discovery-api)
19
19
-[Metrics Query API](#metrics-query-api)
@@ -58,6 +58,22 @@ Here are initial design use cases and scenarios for Metrics.
58
58
59
59
[Top][toc]
60
60
61
+
## Authorization
62
+
63
+
### For Agencies hosting the Metrics API
64
+
65
+
When making requests, the Metrics API expects one of two scopes `metrics:read` or `metrics:read:provider` to be present as part of the `scope` claims in a [JSON Web Token](https://jwt.io/) (JWT) `access_token` in the `Authorization` header, in the form `Authorization: Bearer <access_token>`. The token issuance, expiration and revocation policies are at the discretion of the agency. See MDS [JSON Web Token](/general-information.md#json-web-tokens) guidance.
66
+
67
+
If a client has a `metrics:read` scope, they are permitted to read _all_ metrics available via the Metrics API.
68
+
69
+
If a client has a `metrics:read:provider` scope, they are only permitted to read metrics which pertain to a particular `provider_id` claim in the aforementioned [JWT](https://jwt.io/)`access_token`.
70
+
71
+
Further scopes and requirements may be added at the discretion of the Agency, depending on their particular access control needs.
72
+
73
+
General authorization details are specified in the [Authorization section](/general-information.md#authorization) in MDS General Information.
74
+
75
+
[Top][toc]
76
+
61
77
## Data Requirements
62
78
63
79
The Metrics API does not replace required MDS Provider and Agency endpoints (e.g., [trips](/provider#trips), [events](/provider#events), [vehicles](/provider#vehicles), etc.) in any way. City regulators use disaggregated data access for policy, data validation, auditing, and operational needs, and the Metrics API is not designed to serve these purposes.
@@ -82,22 +98,6 @@ All interval durations (duration) are [ISO 8601](https://en.wikipedia.org/wiki/I
82
98
83
99
[Top][toc]
84
100
85
-
## Authorization
86
-
87
-
### For Agencies hosting the Metrics API
88
-
89
-
When making requests, the Metrics API expects one of two scopes `metrics:read` or `metrics:read:provider` to be present as part of the `scope` claims in a [JSON Web Token](https://jwt.io/) (JWT) `access_token` in the `Authorization` header, in the form `Authorization: Bearer <access_token>`. The token issuance, expiration and revocation policies are at the discretion of the agency. See MDS [JSON Web Token](/general-information.md#json-web-tokens) guidance.
90
-
91
-
If a client has a `metrics:read` scope, they are permitted to read _all_ metrics available via the Metrics API.
92
-
93
-
If a client has a `metrics:read:provider` scope, they are only permitted to read metrics which pertain to a particular `provider_id` claim in the aforementioned [JWT](https://jwt.io/)`access_token`.
94
-
95
-
Further scopes and requirements may be added at the discretion of the Agency, depending on their particular access control needs.
96
-
97
-
General authorization details are specified in the [Authorization section](/general-information.md#authorization) in MDS General Information.
98
-
99
-
[Top][toc]
100
-
101
101
## Data Redaction
102
102
103
103
Some combinations of dimensions, filters, time, and geography may return a small count of trips, which could increase a privacy risk of re-identification. To correct for that, Metrics does not return data below a certain count of results. This data redaction is called k-anonymity, and the threshold is set at a k-value of 10. For more explanation of this methodology, see our [Data Redaction Guidance document](https://github.com/openmobilityfoundation/mobility-data-specification/wiki/MDS-Data-Redaction).
Copy file name to clipboardExpand all lines: policy/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,13 @@ This specification describes the digital relationship between _mobility as a ser
10
10
11
11
-[General information](#general-information)
12
12
-[Background](#background)
13
+
-[Authorization](#authorization)
13
14
-[Update Frequency](#update-frequency)
14
15
-[Updating or Ending Policies](#updating-or-ending-policies)
15
16
-[Versioning](#versioning)
16
17
-[Distribution](#distribution)
17
18
-[REST Endpoints](#rest-endpoints)
18
19
-[Responses and Error Messages](#responses-and-error-messages)
19
-
-[Authorization](#authorization)
20
20
-[Policies](#policies)
21
21
-[Query Parameters](#query-parameters)
22
22
-[Geographies](#geographies)
@@ -71,6 +71,10 @@ The machine-readable format allows Providers to obtain policies and compute comp
71
71
72
72
[Top][toc]
73
73
74
+
### Authorization
75
+
76
+
This endpoint should be made public. Authorization is not required.
77
+
74
78
### Update Frequency
75
79
76
80
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.
@@ -127,10 +131,6 @@ The response to a client request must include a valid HTTP status code defined i
127
131
128
132
See the [Responses section][responses] for information on valid MDS response codes and the [Error Messages section][error-messages] for information on formatting error messages.
129
133
130
-
### Authorization
131
-
132
-
This endpoint should be made public. Authorization is not required.
0 commit comments