-
Notifications
You must be signed in to change notification settings - Fork 9
Add match-identifier endpoint #151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
530dbe7
dcf91a1
52a142c
2b82699
1db3078
1e76563
ef50085
c58212d
7ed5b1c
142f2d4
fc9764b
fbdab86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -59,27 +59,29 @@ info: | |||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # API functionality | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| The API defines three service endpoints: | ||||||||||||||||||||||||
| The API defines four service endpoints: | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| - `POST /retrieve-identifier` to get details about the specific device being used by a given mobile subscriber, including IMEI / IMEISV and the type of device | ||||||||||||||||||||||||
| - `POST /retrieve-type` to get details only about the type (i.e. manufacturer and model) of device being used by a given mobile subscriber | ||||||||||||||||||||||||
| - `POST /retrieve-ppid` to get a pseudonymised identifier for the specific device being used by a given mobile subscriber | ||||||||||||||||||||||||
| - `POST /match-identifier` to check whether a device identifier provided by the API consumer matches the one the network currently associates with a given mobile subscription | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| To call any of these endpoints, the API consumer must first obtain a valid access token from the token endpoint, which is then passed as an Authorization header. When a 2-legged access token is used, the API consumer must also pass at least one of the available mobile subscription identifiers in the body of the request. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| If the request is valid, the API response is a JSON object containing the data that the end user has consented to sharing with the API consumer. | ||||||||||||||||||||||||
| - When calling endpoint `retrieve-identifier`, the response will always contain `imei` | ||||||||||||||||||||||||
| - When calling endpoint `retrieve-type`, the response will always contain `tac` | ||||||||||||||||||||||||
| - When calling endpoint `retrieve-ppid`, the response will always contain `ppid` | ||||||||||||||||||||||||
| - When calling endpoint `match-identifier`, the response will always contain `match` | ||||||||||||||||||||||||
| - Responses will also always contain a `lastChecked` field, indicating when the information provided was last confirmed to be correct | ||||||||||||||||||||||||
| - Other response parameters are implementation dependent, and thus optional | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| An example of a JSON response object is as follows: | ||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| "lastChecked": "2024-02-20T10:41:38.657Z", | ||||||||||||||||||||||||
| "imeisv": "49015420323751800", | ||||||||||||||||||||||||
| "imei": "4901542032375181", | ||||||||||||||||||||||||
| "imeisv": "4901542032375180", | ||||||||||||||||||||||||
| "imei": "490154203237518", | ||||||||||||||||||||||||
| "tac": "49015420", | ||||||||||||||||||||||||
| "model": "3110", | ||||||||||||||||||||||||
| "manufacturer": "Nokia" | ||||||||||||||||||||||||
|
|
@@ -322,6 +324,52 @@ paths: | |||||||||||||||||||||||
| "429": | ||||||||||||||||||||||||
| $ref: '#/components/responses/429TooManyRequests' | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| "/match-identifier": | ||||||||||||||||||||||||
| post: | ||||||||||||||||||||||||
| summary: Check if a provided device identifier matches the one associated with the subscription | ||||||||||||||||||||||||
| description: Check if a provided device identifier matches the one the network currently associates with a given mobile subscription | ||||||||||||||||||||||||
| operationId: matchIdentifier | ||||||||||||||||||||||||
| tags: | ||||||||||||||||||||||||
| - Verify Device Identifiers | ||||||||||||||||||||||||
| security: | ||||||||||||||||||||||||
| - openId: | ||||||||||||||||||||||||
| - device-identifier:match-identifier | ||||||||||||||||||||||||
| parameters: | ||||||||||||||||||||||||
| - $ref: "#/components/parameters/x-correlator" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| requestBody: | ||||||||||||||||||||||||
| description: Parameters to identify the mobile subscription and provide the device identifier to match | ||||||||||||||||||||||||
| required: true | ||||||||||||||||||||||||
| content: | ||||||||||||||||||||||||
| application/json: | ||||||||||||||||||||||||
| schema: | ||||||||||||||||||||||||
| $ref: "#/components/schemas/MatchRequestBody" | ||||||||||||||||||||||||
| examples: | ||||||||||||||||||||||||
| Match Device By 3-Legged Access Token: | ||||||||||||||||||||||||
| $ref: '#/components/examples/MatchDeviceBy3LeggedToken' | ||||||||||||||||||||||||
| Match Device By Phone Number: | ||||||||||||||||||||||||
| $ref: '#/components/examples/MatchDeviceByPhoneNumber' | ||||||||||||||||||||||||
| Match Device By IP Address: | ||||||||||||||||||||||||
| $ref: '#/components/examples/MatchDeviceByIPAddress' | ||||||||||||||||||||||||
| Match Device By Multiple Identifiers: | ||||||||||||||||||||||||
| $ref: '#/components/examples/MatchDeviceByMultipleIdentifiers' | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| responses: | ||||||||||||||||||||||||
| "200": | ||||||||||||||||||||||||
| $ref: '#/components/responses/200MatchIdentifier' | ||||||||||||||||||||||||
| "400": | ||||||||||||||||||||||||
| $ref: '#/components/responses/400BadRequest' | ||||||||||||||||||||||||
| "401": | ||||||||||||||||||||||||
| $ref: '#/components/responses/401Unauthorized' | ||||||||||||||||||||||||
| "403": | ||||||||||||||||||||||||
| $ref: '#/components/responses/403Forbidden' | ||||||||||||||||||||||||
| "404": | ||||||||||||||||||||||||
| $ref: '#/components/responses/404NotFound' | ||||||||||||||||||||||||
| "422": | ||||||||||||||||||||||||
| $ref: '#/components/responses/422UnprocessableContent' | ||||||||||||||||||||||||
| "429": | ||||||||||||||||||||||||
| $ref: '#/components/responses/429TooManyRequests' | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| components: | ||||||||||||||||||||||||
| securitySchemes: | ||||||||||||||||||||||||
| openId: | ||||||||||||||||||||||||
|
|
@@ -365,8 +413,8 @@ components: | |||||||||||||||||||||||
| description: Device identifier has been successfully retrieved when the device subscription was identified by a 3-legged access token or single device subscription identifier | ||||||||||||||||||||||||
| value: | ||||||||||||||||||||||||
| lastChecked: "2024-02-20T10:41:38.657Z" | ||||||||||||||||||||||||
| imeisv: "49015420323751800" | ||||||||||||||||||||||||
| imei: "4901542032375181" | ||||||||||||||||||||||||
| imeisv: "4901542032375180" | ||||||||||||||||||||||||
| imei: "490154203237518" | ||||||||||||||||||||||||
| tac: "49015420" | ||||||||||||||||||||||||
| model: "3110" | ||||||||||||||||||||||||
| manufacturer: "Nokia" | ||||||||||||||||||||||||
|
|
@@ -376,8 +424,8 @@ components: | |||||||||||||||||||||||
| device: | ||||||||||||||||||||||||
| phoneNumber: "+123456789" | ||||||||||||||||||||||||
| lastChecked: "2024-02-20T10:41:38.657Z" | ||||||||||||||||||||||||
| imeisv: "49015420323751800" | ||||||||||||||||||||||||
| imei: "4901542032375181" | ||||||||||||||||||||||||
| imeisv: "4901542032375180" | ||||||||||||||||||||||||
| imei: "490154203237518" | ||||||||||||||||||||||||
| tac: "49015420" | ||||||||||||||||||||||||
| model: "3110" | ||||||||||||||||||||||||
| manufacturer: "Nokia" | ||||||||||||||||||||||||
|
|
@@ -442,8 +490,55 @@ components: | |||||||||||||||||||||||
| lastChecked: "2024-02-20T10:41:38.657Z" | ||||||||||||||||||||||||
| ppid: "b083f65ccdad365d7489fff24b6d5074b30c12b6d81db3404d25964ffd908813" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| 200MatchIdentifier: | ||||||||||||||||||||||||
| description: | | ||||||||||||||||||||||||
| A match result has been successfully determined for the provided device identifier. | ||||||||||||||||||||||||
| HTTP Status Code Mapping: | ||||||||||||||||||||||||
| - 200 + match=true → The provided identifier MATCHES the network's record | ||||||||||||||||||||||||
| - 200 + match=false → The provided identifier does NOT match (subscription and device are known, confirmed mismatch) | ||||||||||||||||||||||||
| - 404 → Subscription cannot be resolved from device/token | ||||||||||||||||||||||||
| - 422 → Subscription resolved but no deterministic result available (policy/regulation/no device info) | ||||||||||||||||||||||||
| - 5xx → Transient or technical failures (timeouts, upstream errors) | ||||||||||||||||||||||||
| Note: match=false is ONLY returned when a definitive comparison has been performed. | ||||||||||||||||||||||||
| headers: | ||||||||||||||||||||||||
| x-correlator: | ||||||||||||||||||||||||
| $ref: "#/components/headers/X-Correlator" | ||||||||||||||||||||||||
| content: | ||||||||||||||||||||||||
| application/json: | ||||||||||||||||||||||||
| schema: | ||||||||||||||||||||||||
| required: | ||||||||||||||||||||||||
| - lastChecked | ||||||||||||||||||||||||
| - match | ||||||||||||||||||||||||
| allOf: | ||||||||||||||||||||||||
| - $ref: "#/components/schemas/CommonResponseBody" | ||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The PR currently defines 200 as: match (bool) + lastChecked from CommonResponseBody. However, it does not explicitly differentiate between:
Do we want to reserve an optional field of type result (e.g., MATCH, MISMATCH, NO_DEVICE_INFO, INCONCLUSIVE) in CommonResponseBody or MatchResult, even though only MATCH/MISMATCH are currently used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If not, at the very least, it must be made clear in the description of /match-identifier that:
What do you think?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should go with the second option B: I'd recommend not introducing a result enum (MATCH, MISMATCH, NO_DEVICE_INFO, INCONCLUSIVE) at this stage for the following reasons: CAMARA design minimalism, speculative fields create contract obligations before those scenarios are well-defined. Boolean is sufficient, the endpoint answers a binary question; edge cases like "no device info" are error conditions, not match results. Consistency, other CAMARA match/verify APIs (e.g., Number Verification) use plain booleans There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks Ali, I'm fine with going with option B and keeping minimal for now. If we treat “no device info” / “not applicable” strictly as error conditions rather than match outcomes, then I think it becomes even more important to spell out the HTTP mapping explicitly in the spec. Something along these lines would already solve my concern:
This keeps the response body minimal (just We can further reinforce this behaviour later on in the test suite, but having this mapping clearly stated in the description of |
||||||||||||||||||||||||
| - $ref: "#/components/schemas/MatchResult" | ||||||||||||||||||||||||
| examples: | ||||||||||||||||||||||||
| Successful Match: | ||||||||||||||||||||||||
| description: Device identifier match has been successfully determined when the device subscription was identified by a 3-legged access token or single device subscription identifier | ||||||||||||||||||||||||
| value: | ||||||||||||||||||||||||
| lastChecked: "2024-02-20T10:41:38.657Z" | ||||||||||||||||||||||||
| match: true | ||||||||||||||||||||||||
| Successful Non-Match: | ||||||||||||||||||||||||
| description: Device identifier does not match when the device subscription was identified by a 3-legged access token or single device subscription identifier | ||||||||||||||||||||||||
| value: | ||||||||||||||||||||||||
| lastChecked: "2024-02-20T10:41:38.657Z" | ||||||||||||||||||||||||
| match: false | ||||||||||||||||||||||||
| Successful Match With Device Disambiguation: | ||||||||||||||||||||||||
| description: Device identifier match has been successfully determined when a 2-legged access token and multiple device subscription identifiers were provided | ||||||||||||||||||||||||
| value: | ||||||||||||||||||||||||
| device: | ||||||||||||||||||||||||
| phoneNumber: "+123456789" | ||||||||||||||||||||||||
| lastChecked: "2024-02-20T10:41:38.657Z" | ||||||||||||||||||||||||
| match: true | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| 400BadRequest: | ||||||||||||||||||||||||
| description: Bad Request | ||||||||||||||||||||||||
| description: | | ||||||||||||||||||||||||
| Invalid request syntax or malformed JSON. | ||||||||||||||||||||||||
| This status is reserved for: | ||||||||||||||||||||||||
| - Malformed JSON in the request body | ||||||||||||||||||||||||
| - Invalid data types | ||||||||||||||||||||||||
| - Invalid format (not matching required patterns) | ||||||||||||||||||||||||
| Business validation errors should return 422 instead. | ||||||||||||||||||||||||
| headers: | ||||||||||||||||||||||||
| x-correlator: | ||||||||||||||||||||||||
| $ref: "#/components/headers/X-Correlator" | ||||||||||||||||||||||||
|
|
@@ -553,7 +648,9 @@ components: | |||||||||||||||||||||||
| message: Client does not have sufficient permissions to perform this action. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| 404NotFound: | ||||||||||||||||||||||||
| description: Not found | ||||||||||||||||||||||||
| description: | | ||||||||||||||||||||||||
| Subscription cannot be resolved from the provided device identifiers or access token. | ||||||||||||||||||||||||
| The network cannot map the request to a known subscription. | ||||||||||||||||||||||||
| headers: | ||||||||||||||||||||||||
| x-correlator: | ||||||||||||||||||||||||
| $ref: "#/components/headers/X-Correlator" | ||||||||||||||||||||||||
|
|
@@ -571,15 +668,22 @@ components: | |||||||||||||||||||||||
| enum: | ||||||||||||||||||||||||
| - IDENTIFIER_NOT_FOUND | ||||||||||||||||||||||||
| examples: | ||||||||||||||||||||||||
| Device Cannot Be Found: | ||||||||||||||||||||||||
| DeviceNotFound: | ||||||||||||||||||||||||
| description: The provided identifier cannot be matched to a device known to the API provider | ||||||||||||||||||||||||
| value: | ||||||||||||||||||||||||
| status: 404 | ||||||||||||||||||||||||
| code: IDENTIFIER_NOT_FOUND | ||||||||||||||||||||||||
| message: The provided identifier cannot be matched to a device. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| 422UnprocessableContent: | ||||||||||||||||||||||||
| description: Unprocessable Content | ||||||||||||||||||||||||
| description: | | ||||||||||||||||||||||||
| Subscription found but the service cannot provide a deterministic match result. | ||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Of the four codes currently defined for the 422 status code, only Also note that, if the reason is "temporary", then a 503 Service Unavailable status code should be used to indicate that the required result may be available later. However, we have not really discussed this, and there is a separate discussion in Commonalities on conveying "business outcomes" in a standardised way, so I would not explicitly add a 503 error to the OAS just yet. For the remaining three code ( So this proposed update needs to be re-written. Also, if you need to use the term "subscription", then be explicit and say "mobile device subscription". But better not to use the term at all in the error description if you can avoid it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @eric-murray agreed, this is too narrow for the full set of 422 causes. You’re right that only I also agree that we should avoid saying “subscription found” in the generic and then leave the more specific meaning to the individual Also agreed on not introducing an explicit |
||||||||||||||||||||||||
| This status is used for business validation errors: | ||||||||||||||||||||||||
| - MISSING_IDENTIFIER: 2-legged token provided without any subscription identifier | ||||||||||||||||||||||||
| - UNNECESSARY_IDENTIFIER: 3-legged token provided with additional device identifier | ||||||||||||||||||||||||
| - Service cannot provide deterministic result due to: | ||||||||||||||||||||||||
| * No usable device information available for the subscription | ||||||||||||||||||||||||
| * Local policy or regulatory restrictions prevent returning match information | ||||||||||||||||||||||||
| headers: | ||||||||||||||||||||||||
| x-correlator: | ||||||||||||||||||||||||
| $ref: "#/components/headers/X-Correlator" | ||||||||||||||||||||||||
|
|
@@ -683,11 +787,11 @@ components: | |||||||||||||||||||||||
| imeisv: | ||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||
| description: IMEISV of the device | ||||||||||||||||||||||||
| example: "49015420323751800" | ||||||||||||||||||||||||
| example: "4901542032375180" | ||||||||||||||||||||||||
| imei: | ||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||
| description: IMEI of the device | ||||||||||||||||||||||||
| example: "4901542032375181" | ||||||||||||||||||||||||
| example: "490154203237518" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| DeviceType: | ||||||||||||||||||||||||
| description: | | ||||||||||||||||||||||||
|
|
@@ -834,6 +938,47 @@ components: | |||||||||||||||||||||||
| pattern: ^[a-zA-Z0-9-_:;.\/<>{}]{0,256}$ | ||||||||||||||||||||||||
| example: "b4333c46-49c0-4f62-80d7-f0ef930f1c46" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| MatchRequestBody: | ||||||||||||||||||||||||
| description: Request body for match-identifier operation, containing an optional mobile device subscription identifier, and the physical device identifier to match against | ||||||||||||||||||||||||
| allOf: | ||||||||||||||||||||||||
| - $ref: "#/components/schemas/RequestBody" | ||||||||||||||||||||||||
| - type: object | ||||||||||||||||||||||||
| required: | ||||||||||||||||||||||||
| - providedIdentifierType | ||||||||||||||||||||||||
| - providedIdentifier | ||||||||||||||||||||||||
| properties: | ||||||||||||||||||||||||
| providedIdentifierType: | ||||||||||||||||||||||||
| $ref: "#/components/schemas/ProvidedIdentifierType" | ||||||||||||||||||||||||
| providedIdentifier: | ||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||
ALIIQBAL786 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||
| minLength: 8 | ||||||||||||||||||||||||
| maxLength: 16 | ||||||||||||||||||||||||
| description: The device identifier value to match against. Must match the format constraints for the specified identifier type. | ||||||||||||||||||||||||
| example: "490154203237518" | ||||||||||||||||||||||||
| # Pattern will be validated based on providedIdentifierType | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| ProvidedIdentifierType: | ||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||
| enum: | ||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The API consumer would check that the PPID have associated with their end-user's account is the same as the last time. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @AxelNennker, I understand the use case you’re describing, but from my side, that use case is already covered by the existing The whole point of I’d strongly prefer to keep
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why should the whole-point be to provide a ppid free endpoint? PPID is the privacy respecting and data-minimizing alternative to the other identifier. "verify my token" is good. For example if the API consumer is selling phone insurance that is bound to the device identifier then they should use the PPID. We should reduce the use of IMEI etc to get to a more privacy friendly environment or charge 10 times for the IMEI compared to the PPID. Globally unique, persistent identifiers esse delendam. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks Axel, I really see your point: for use cases that need a long-lived device binding, PPID is clearly preferable to exposing raw IMEI/IMEISV. Your phone-insurance example fits exactly there, and from my side Where I think this endpoint is targeting a different class of use cases:
Also, the “verify my token” pattern for PPID is already possible today with That’s why, at least for this first version, I would keep
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That API consumer do not need a "match" feature because they can do the match by using "retrieve" is true for e.g. numberverification as well and there we have the "/verify" endpoint. So, that argument does not have merit in my opinion. Also, some legislations make "match" easy and "retrieve" illegal - at least without consent or opt-out. So, "match" for PPID might be the only legal and simple feature in those markets. Furthermore, to the argument that some API consumers already have the IMEI and can do the match themselves. Sure, if they can handle the consent and/or opt-out legal requirements in their market that is good for them. But CAMARA have to think globally and there matching PPID might be the solution for some markets and legislations. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks Axel — I think your latest point is fair in one respect: there may indeed be markets where a match-style operation is legally easier to expose than a retrieve-style operation, including for PPID. That said, I still think adding
So from my perspective, this is mainly a scope and clarity issue:
Those are related, but not the same contract. I also think it is better for CAMARA design to keep those primitives clearly separated:
So my suggestion would be:
That way we keep this PR tight, interoperable and easy to explain, while still leaving the door open for a PPID-specific evolution later if the WG wants it.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR proposes security scope:
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think this PR is easier to explain if this PR handles all identifiers the same and not exclude one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @AxelNennker, I understand the appeal of having a single match operation that handles every identifier in the same way. That said, from my perspective that would actually make this PR harder to explain, not easier, because the identifiers are not semantically equivalent:
So adding
From Telefónica’s side, this is the scope we support for the current PR. If PPID were added into So my suggestion would be to close this thread on the basis of the current scoped proposal, and, if there is still interest in PPID matching, open a separate issue for that specific capability. |
||||||||||||||||||||||||
| - IMEI | ||||||||||||||||||||||||
| - IMEISV | ||||||||||||||||||||||||
| - TAC | ||||||||||||||||||||||||
| description: | | ||||||||||||||||||||||||
| Type of the provided device identifier. Format requirements: | ||||||||||||||||||||||||
| - IMEI: 15 digits (pattern: ^[0-9]{15}$) | ||||||||||||||||||||||||
| - IMEISV: 16 digits (pattern: ^[0-9]{16}$) | ||||||||||||||||||||||||
| - TAC: 8 digits (pattern: ^[0-9]{8}$) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| MatchResult: | ||||||||||||||||||||||||
| description: | | ||||||||||||||||||||||||
| The result of matching the provided device identifier against the network's identifier for the subscription | ||||||||||||||||||||||||
| type: object | ||||||||||||||||||||||||
| properties: | ||||||||||||||||||||||||
| match: | ||||||||||||||||||||||||
| type: boolean | ||||||||||||||||||||||||
| description: True if the provided device identifier matches the one the network currently associates with the subscription | ||||||||||||||||||||||||
| example: true | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| examples: | ||||||||||||||||||||||||
| IdentifyDeviceBy3LeggedToken: | ||||||||||||||||||||||||
| description: Empty JSON when device is identified by access token | ||||||||||||||||||||||||
|
|
@@ -863,3 +1008,38 @@ components: | |||||||||||||||||||||||
| publicAddress: "84.125.93.10" | ||||||||||||||||||||||||
| publicPort: 59765 | ||||||||||||||||||||||||
| networkAccessIdentifier: "123456789@example.com" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| MatchDeviceBy3LeggedToken: | ||||||||||||||||||||||||
ALIIQBAL786 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||
| description: Match identifier when device is identified by access token | ||||||||||||||||||||||||
| value: | ||||||||||||||||||||||||
| providedIdentifierType: "IMEI" | ||||||||||||||||||||||||
| providedIdentifier: "4901542032375181" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| MatchDeviceByPhoneNumber: | ||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||
| description: Matching device identifier by phone number and provided IMEI | ||||||||||||||||||||||||
| value: | ||||||||||||||||||||||||
| device: | ||||||||||||||||||||||||
| phoneNumber: "+123456789" | ||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One question: if we are using 3-legged, does it make sense to keep the phoneNumber here? I understand that this example would be for Multiple Identifiers? or just remove the phoneNumber?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an example request, and is only applicable if a 2-legged access token is being used (otherwise a So the example is valid for 2-legged access tokens, though I agree that might not be clear to all readers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My question was mainly about readability for the spec reader: the example itself is valid for a 2-legged access token, but that may not be obvious at first glance, especially since other examples in the same section cover different identification patterns. Would it make sense to make that explicit in the example description, e.g. something like:
That way we keep the example as-is, but make the intended usage clearer to readers. |
||||||||||||||||||||||||
| providedIdentifierType: "IMEI" | ||||||||||||||||||||||||
| providedIdentifier: "490154203237518" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| MatchDeviceByIPAddress: | ||||||||||||||||||||||||
| description: Matching device identifier by IP address and provided TAC | ||||||||||||||||||||||||
| value: | ||||||||||||||||||||||||
| device: | ||||||||||||||||||||||||
| ipv4Address: | ||||||||||||||||||||||||
| publicAddress: "84.125.93.10" | ||||||||||||||||||||||||
| publicPort: 59765 | ||||||||||||||||||||||||
| providedIdentifierType: "TAC" | ||||||||||||||||||||||||
| providedIdentifier: "49015420" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| MatchDeviceByMultipleIdentifiers: | ||||||||||||||||||||||||
| description: Matching device identifier by multiple subscription identifiers and provided IMEISV | ||||||||||||||||||||||||
| value: | ||||||||||||||||||||||||
| device: | ||||||||||||||||||||||||
| phoneNumber: "+123456789" | ||||||||||||||||||||||||
| ipv4Address: | ||||||||||||||||||||||||
| publicAddress: "84.125.93.10" | ||||||||||||||||||||||||
| publicPort: 59765 | ||||||||||||||||||||||||
| providedIdentifierType: "IMEISV" | ||||||||||||||||||||||||
| providedIdentifier: "4901542032375180" | ||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
422 does not necessarily mean that the subscription has been resolved. See my comments below.
My preference would be to only comment on the meaning of a status code in the description of that specific status codes, and not in the descriptions of other status codes. Otherwise, we risk conflicting descriptions.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @eric-murray, I think that's a fair point. I agree that the 200MatchIdentifier description should only describe the meaning of the 200 response itself, and not restate the semantics of 404, 422 or 5xx, otherwise we risk duplication or conflicts with the specific status code definitions.
What I wanted to preserve is just the normative point that:
So I’m happy to simplify the 200 description accordingly, and move the broader status-code mapping either to the /match-identifier operation description and/or rely on the specific 404 / 422 / 5xx definitions plus the test cases to make the behaviour explicit.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI @albertoramosmonagas -
I think you can align the two descriptions for simplicity: