openapi: 3.0.3 info: title: Global System for Mobile Communications GSMA Camara Project Endpoint Discovery Application Check SIM Swap API version: 0.1.0-wip description: The Application Discovery API extends beyond the capabilities of the Simple Edge Discovery API by not only locating the nearest Edge Cloud Zone but also directly linking to the application endpoints within those Edge Cloud Zones. contact: email: sp-edc@lists.camaraproject.org license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html servers: - url: '{apiRoot}/{basePath}' variables: apiRoot: default: https://localhost:443 description: API root. basePath: default: application-endpoint-discovery/vwip description: Base path for the Application Endpoint Discovery. tags: - name: Check SIM Swap paths: /check: post: security: - openId: - sim-swap:check - openId: - sim-swap tags: - Check SIM Swap description: Check if SIM swap has been performed during a past period operationId: checkSimSwap parameters: - $ref: '#/components/parameters/x-correlator' requestBody: description: 'Create a check SIM swap request for a phone number. ' content: application/json: schema: $ref: '#/components/schemas/CreateCheckSimSwap' required: true responses: '200': description: Returns whether a SIM swap has been performed during a past period headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/CheckSimSwapInfo' '400': $ref: '#/components/responses/Generic400' '401': $ref: '#/components/responses/Generic401' '403': $ref: '#/components/responses/Generic403' '404': $ref: '#/components/responses/Generic404' '422': $ref: '#/components/responses/Generic422' '500': $ref: '#/components/responses/Generic500' '503': $ref: '#/components/responses/Generic503' '504': $ref: '#/components/responses/Generic504' components: responses: Generic503: description: Service Unavailable headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' examples: GENERIC_503_UNAVAILABLE: description: Service is not available. Temporary situation usually related to maintenance process in the server side value: status: 503 code: UNAVAILABLE message: Service Unavailable. Generic422: description: Unprocessable Content headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' examples: GENERIC_422_NOT_SUPPORTED: description: Not Supported value: status: 422 code: NOT_SUPPORTED message: Service not supported for this phoneNumber UNIDENTIFIABLE_PHONE_NUMBER: description: The phone number is not included in the request and the phone number information cannot be derived from the 3-legged access token value: status: 422 code: UNIDENTIFIABLE_PHONE_NUMBER message: The phone number cannot be identified Generic500: description: Internal Server Error headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' examples: GENERIC_500_INTERNAL: description: Problem in Server side. Regular Server Exception value: status: 500 code: INTERNAL message: Unknown server error. Typically a server bug. Generic401: description: Unauthorized headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' examples: GENERIC_401_UNAUTHENTICATED: description: Request cannot be authenticated value: status: 401 code: UNAUTHENTICATED message: Request not authenticated due to missing, invalid, or expired credentials. Generic403: description: Forbidden headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' examples: GENERIC_403_PERMISSION_DENIED: description: Permission denied. OAuth2 token access does not have the required scope or when the user fails operational security value: status: 403 code: PERMISSION_DENIED message: Client does not have sufficient permissions to perform this action. GENERIC_403_INVALID_TOKEN_CONTEXT: description: Reflect some inconsistency between information in some field of the API and the related OAuth2 Token value: status: 403 code: INVALID_TOKEN_CONTEXT message: phoneNumber is not consistent with access token Generic400: description: Bad Request headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' examples: GENERIC_400_INVALID_ARGUMENT: description: Invalid Argument. Generic Syntax Exception value: status: 400 code: INVALID_ARGUMENT message: Client specified an invalid argument, request body or query param. Generic504: description: Gateway Timeout headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' examples: GENERIC_504_TIMEOUT: description: API Server Timeout value: status: 504 code: TIMEOUT message: Request timeout exceeded. Generic404: description: Not found headers: x-correlator: $ref: '#/components/headers/x-correlator' content: application/json: schema: $ref: '#/components/schemas/ErrorInfo' examples: GENERIC_404_NOT_FOUND: description: Resource is not found value: status: 404 code: NOT_FOUND message: The specified resource is not found. schemas: PhoneNumber: type: string pattern: ^\+[1-9][0-9]{4,14}$ example: '+346661113334' description: A public identifier addressing a telephone subscription. In mobile networks it corresponds to the MSISDN (Mobile Station International Subscriber Directory Number). In order to be globally unique it has to be formatted in international format, according to E.164 standard, prefixed with '+'. ErrorInfo: type: object required: - status - code - message properties: status: type: integer description: HTTP response status code code: type: string description: Code given to this error message: type: string description: Detailed error description CreateCheckSimSwap: type: object properties: phoneNumber: $ref: '#/components/schemas/PhoneNumber' maxAge: type: integer example: 240 description: 'Period in hours to be checked for SIM swap. ' format: int32 minimum: 1 maximum: 2400 default: 240 CheckSimSwapInfo: type: object required: - swapped properties: swapped: type: boolean description: Indicates whether the SIM card has been swapped during the period within the provided age. headers: x-correlator: description: Correlation id for the different services schema: type: string parameters: x-correlator: name: x-correlator in: header description: Correlation id for the different services schema: type: string securitySchemes: openId: description: OpenID Provider Configuration Information. type: openIdConnect openIdConnectUrl: .well-known/openid-configuration externalDocs: description: Product documentation at CAMARA. url: https://github.com/camaraproject/EdgeCloud