openapi: 3.0.1 info: title: Digital Identity Management version: 4.0.0 description: "## TMF API Reference: TMF720 - Digital Identity Management\n\nDigital Identity Management API goal is to provide\ \ the ability to manage a digital identity. This digital identity allows to identify an individual, a resource, or a partyRole\ \ (a specific role - or set of roles - for a given individual). A digital identity is associated with credential/authentification\ \ method. These credential/authentification methods should be extensible to describe all type of authentification method\ \ like login/password, biometric, token, etc.. A contact medium is also associated with digital identity (or directly\ \ at credential level) to manage credential recovery UCs. \n\nThis page targets a sandbox stub with canned responses and\ \ fake data." servers: - url: https://api.ooredoo.com tags: - name: oauth description: Access token - name: digitalIdentity paths: /tmf-api/oauth/v4/token: post: tags: - oauth summary: Generate Access Token operationId: generateAccessToken description: Token generation endpoint (client_id & client_secret in headers, grant_type in body). Pre-filled with the developer portal sandbox credentials. Leave scope empty to receive every scope of the sandbox app. parameters: - name: client_id in: header required: true description: Client ID of onboarded client. schema: type: string format: password default: 67Q4itU3ivApTHRB4dJKFh4R5UAdG5RAsMeEq2NppNgd6LBH - name: client_secret in: header required: true description: Client secret of onboarded client. schema: type: string format: password default: yp1CUQyGwEMNruGXtnhIbpTOuK6BGlxAFmiGlG2FQea3cHgaVqRw7rybKnWAUeKB - name: scope in: header required: false description: OAuth scope (optional, space-separated), e.g. urn:mdv:digitalidentitymanagement:listdigitalidentity schema: type: string requestBody: required: true content: application/x-www-form-urlencoded: schema: type: object required: - grant_type properties: grant_type: type: string enum: - client_credentials default: client_credentials description: OAuth grant type responses: '200': description: Access token content: application/json: schema: type: object properties: access_token: type: string token_type: type: string expires_in: type: string scope: type: string '401': description: Invalid client credentials /tmf-api/digitalIdentityManagement/v4/digitalIdentity: get: tags: - digitalIdentity summary: List or find DigitalIdentity objects description: 'This operation list or find DigitalIdentity entities Sandbox: canned responses with fake data.' operationId: listDigitalIdentity parameters: - name: countryCode in: header required: true description: OpCo country code (ISO 3166-1 alpha-3). The sandbox accepts DZA, IRQ, KWT, MDV, OMN, PSE, QAT, TUN; your token must hold the scope for that country. schema: type: string enum: - DZA - IRQ - KWT - MDV - OMN - PSE - QAT - TUN example: MDV default: MDV - name: transactionId in: header required: true description: Caller-generated transaction identifier, 20-30 alphanumeric characters. schema: type: string minLength: 20 maxLength: 30 pattern: ^[A-Za-z0-9]+$ example: SBX0123456789ABCDEF0123 default: SBX0123456789ABCDEF0123 - name: fields in: query required: false description: Comma-separated properties to be provided in response schema: type: string - name: offset in: query required: false description: Requested index for start of resources to be provided in response schema: type: integer - name: limit in: query required: false description: Requested number of resources to be provided in response schema: type: integer responses: '200': description: Success content: application/json;charset=utf-8: schema: type: array items: $ref: '#/components/schemas/DigitalIdentity' '400': description: Bad Request content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '405': description: Method Not allowed content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' security: - BearerAuth: [] post: tags: - digitalIdentity summary: Creates a DigitalIdentity description: 'This operation creates a DigitalIdentity entity. Sandbox: canned responses with fake data.' operationId: createDigitalIdentity parameters: - name: countryCode in: header required: true description: OpCo country code (ISO 3166-1 alpha-3). The sandbox accepts DZA, IRQ, KWT, MDV, OMN, PSE, QAT, TUN; your token must hold the scope for that country. schema: type: string enum: - DZA - IRQ - KWT - MDV - OMN - PSE - QAT - TUN example: MDV default: MDV - name: transactionId in: header required: true description: Caller-generated transaction identifier, 20-30 alphanumeric characters. schema: type: string minLength: 20 maxLength: 30 pattern: ^[A-Za-z0-9]+$ example: SBX0123456789ABCDEF0123 default: SBX0123456789ABCDEF0123 requestBody: description: The DigitalIdentity to be created required: true content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/DigitalIdentity_Create' example: nickname: new-sandbox-user credential: - id: SBX-CRED-0001 '@type': LoginPasswordCredential login: new-sandbox-user currentPasscode: fake-0000 newPasscode: fake-1111 responses: '201': description: Created content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/DigitalIdentity' '400': description: Bad Request content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '405': description: Method Not allowed content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' security: - BearerAuth: [] /tmf-api/digitalIdentityManagement/v4/digitalIdentity/{id}: get: tags: - digitalIdentity summary: Retrieves a DigitalIdentity by ID description: 'This operation retrieves a DigitalIdentity entity. Attribute selection is enabled for all first level attributes. Sandbox: canned responses with fake data.' operationId: retrieveDigitalIdentity parameters: - name: countryCode in: header required: true description: OpCo country code (ISO 3166-1 alpha-3). The sandbox accepts DZA, IRQ, KWT, MDV, OMN, PSE, QAT, TUN; your token must hold the scope for that country. schema: type: string enum: - DZA - IRQ - KWT - MDV - OMN - PSE - QAT - TUN example: MDV default: MDV - name: transactionId in: header required: true description: Caller-generated transaction identifier, 20-30 alphanumeric characters. schema: type: string minLength: 20 maxLength: 30 pattern: ^[A-Za-z0-9]+$ example: SBX0123456789ABCDEF0123 default: SBX0123456789ABCDEF0123 - name: id in: path required: true description: Identifier of the DigitalIdentity schema: type: string example: SBX-DID-0001 default: SBX-DID-0001 - name: fields in: query required: false description: Comma-separated properties to provide in response schema: type: string responses: '200': description: Success content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/DigitalIdentity' '400': description: Bad Request content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '405': description: Method Not allowed content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json;charset=utf-8: schema: $ref: '#/components/schemas/Error' security: - BearerAuth: [] components: securitySchemes: BearerAuth: type: http scheme: bearer bearerFormat: JWT schemas: AttachmentRefOrValue: type: object description: An attachment by value or by reference. An attachment complements the description of an element, for example through a document, a video, a picture. properties: id: example: 4aafacbd-11ff-4dc8-b445-305f2215715f type: string description: Unique identifier for this particular attachment href: example: http://host/Attachment/4aafacbd-11ff-4dc8-b445-305f2215715f type: string format: uri description: URI for this Attachment attachmentType: example: video type: string description: Attachment type such as video, picture content: type: string format: base64 description: The actual contents of the attachment object, if embedded, encoded as base64 description: example: Photograph of the Product type: string description: A narrative text describing the content of the attachment mimeType: type: string description: Attachment mime type such as extension file for video, picture and document name: type: string description: The name of the attachment url: example: http://host/Content/4aafacbd-11ff-4dc8-b445-305f2215715f type: string format: uri description: Uniform Resource Locator, is a web page address (a subset of URI) size: $ref: '#/components/schemas/Quantity' description: The size of the attachment. validFor: $ref: '#/components/schemas/TimePeriod' description: The period of time for which the attachment is valid '@baseType': type: string description: When sub-classing, this defines the super-class '@schemaLocation': type: string format: uri description: A URI to a JSON-Schema file that defines additional attributes and relationships '@type': type: string description: When sub-classing, this defines the sub-class Extensible name '@referredType': type: string description: The actual type of the target instance when needed for disambiguation. Credential: type: object description: Credential is a class that allow to describe an authentification method. required: - id - '@type' - currentPasscode - newPasscode properties: id: type: string description: an identifier for a credential/authentification method for this digital identity state: type: string description: Used to indicate the current lifecycle state of this credential (like active, inactive, expired). trustLevel: type: string description: A level of assurance associated with this credential - this could be used to limit/allow specific permission based on this trust level. contactMedium: type: array items: $ref: '#/components/schemas/DigitalIdentityContactMedium' description: List of contact medium associated with this credential/authentification method. validFor: $ref: '#/components/schemas/TimePeriod' description: The period for which this digial identity is valid. currentPasscode: type: string description: currentPasscode . newPasscode: type: string description: newPasscod '@baseType': type: string description: When sub-classing, this defines the super-class '@schemaLocation': type: string format: uri description: A URI to a JSON-Schema file that defines additional attributes and relationships '@type': type: string description: In Credential Object, for Maldives Type can be of 4 types PhoneCredential,LoginPasswordCredential,EmailPasswordCredential,EFaasCredential login: type: string description: this attribute will have value when @type will be LoginPasswordCredential and EFaasCredential password: type: string description: this attribute will have value when @type will be LoginPasswordCredential email: type: string description: this attribute will have value when @type will be EmailPasswordCredential redirectUrl: type: string description: this attribute will have value when @type will be EFaasCredential DigitalIdentity: type: object description: DigitalIdentity is a class that allow to describe a digital identity for an individual or a resource or a specific party role. One of these three MUST be provided. If an individual is provided, this identity will be for all her/his partyRole. To avoid confusion it is recommended in this case to not provide partyRoleIdentified. properties: id: type: string description: unique identifier href: type: string description: Hyperlink reference creationDate: type: string format: date-time description: Date and time of the Digital Identity creation (timestamp) lastUpdate: type: string format: date-time description: Date and time of the Digital Identity last update (timestamp) nickname: type: string description: Nickname associated to this digital identity (like Juanito17 or the QuebecMoose etc...). status: type: string description: Used to indicate the current lifecycle status of this digital identity (unknown, active, suspended, archived). attachment: type: array items: $ref: '#/components/schemas/AttachmentRefOrValue' description: List of attachment associated with this digital identity. Could be use to link a cute cat or moose picture to a digital identity for example. contactMedium: type: array items: $ref: '#/components/schemas/DigitalIdentityContactMedium' description: List of contact medium associated with the digital identity. credential: type: array items: $ref: '#/components/schemas/Credential' description: A list of credential/authentification method that are used for this digital identity. individualIdentified: $ref: '#/components/schemas/PartyRef' description: 'Individual identified by this digital identity. In this case the digitial identity is for all her/his role. It is recommended to not provide partyRoleIdentified if individualIdentified provided ' partyRoleIdentified: type: array items: $ref: '#/components/schemas/RelatedParty' description: Related Parties who are identified by this digital identity. relatedParty: type: array items: $ref: '#/components/schemas/RelatedParty' description: Parties who have an interest in this digital identity (like the organization in charge of providing identity). This is NOT the party identified by this digital identity. resourceIdentified: $ref: '#/components/schemas/ResourceRef' description: Resource identified by this digital identity. It is recommended to no provided individualIdentified or partyRoleIdentified if resourceIdentified provided. validFor: $ref: '#/components/schemas/TimePeriod' description: The period for which this digial identity is valid. '@baseType': type: string description: When sub-classing, this defines the super-class '@schemaLocation': type: string format: uri description: A URI to a JSON-Schema file that defines additional attributes and relationships '@type': type: string description: When sub-classing, this defines the sub-class entity name DigitalIdentityContactMedium: type: object description: Indicates the contact medium that could be used to contact the party. required: - '@type' - id properties: id: type: string description: Identifier for this contact medium. contactType: type: string description: Type of the contact medium to qualifiy it like pro email / personal email. This is not used to define the contact medium used. preferred: type: boolean description: If true, indicates that is the preferred contact medium validFor: $ref: '#/components/schemas/TimePeriod' description: The time period that the contact medium is valid for '@baseType': type: string description: When sub-classing, this defines the super-class '@schemaLocation': type: string format: uri description: A URI to a JSON-Schema file that defines additional attributes and relationships '@type': type: string description: When sub-classing, this defines the sub-class Extensible name mobileNumber: type: string description: Mobile Number if contact medium type is mobile DigitalIdentity_Create: type: object description: 'DigitalIdentity is a class that allow to describe a digital identity for an individual or a resource or a specific party role. One of these three MUST be provided. If an individual is provided, this identity will be for all her/his partyRole. To avoid confusion it is recommended in this case to not provide partyRoleIdentified. Skipped properties: id,href,status,digitalIdentityDate' required: - credential properties: creationDate: type: string format: date-time description: Date and time of the Digital Identity creation (timestamp) lastUpdate: type: string format: date-time description: Date and time of the Digital Identity last update (timestamp) nickname: type: string description: Nickname associated to this digital identity (like Juanito17 or the QuebecMoose etc...). attachment: type: array items: $ref: '#/components/schemas/AttachmentRefOrValue' description: List of attachment associated with this digital identity. Could be use to link a cute cat or moose picture to a digital identity for example. contactMedium: type: array items: $ref: '#/components/schemas/DigitalIdentityContactMedium' description: List of contact medium associated with the digital identity. credential: type: array items: $ref: '#/components/schemas/Credential' minItems: 1 description: A list of credential/authentification method that are used for this digital identity. individualIdentified: $ref: '#/components/schemas/PartyRef' description: 'Individual identified by this digital identity. In this case the digitial identity is for all her/his role. It is recommended to not provide partyRoleIdentified if individualIdentified provided ' partyRoleIdentified: type: array items: $ref: '#/components/schemas/RelatedParty' description: Related Parties who are identified by this digital identity. relatedParty: type: array items: $ref: '#/components/schemas/RelatedParty' description: Parties who have an interest in this digital identity (like the organization in charge of providing identity). This is NOT the party identified by this digital identity. resourceIdentified: $ref: '#/components/schemas/ResourceRef' description: Resource identified by this digital identity. It is recommended to no provided individualIdentified or partyRoleIdentified if resourceIdentified provided. validFor: $ref: '#/components/schemas/TimePeriod' description: The period for which this digial identity is valid. '@baseType': type: string description: When sub-classing, this defines the super-class '@schemaLocation': type: string format: uri description: A URI to a JSON-Schema file that defines additional attributes and relationships '@type': type: string description: When sub-classing, this defines the sub-class entity name Error: description: Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx) type: object required: - code - reason properties: code: type: string description: Application relevant detail, defined in the API or a common list. reason: type: string description: Explanation of the reason for the error which can be shown to a client user. message: type: string description: More details and corrective actions related to the error which can be shown to a client user. status: type: string description: HTTP Error code extension referenceError: type: string format: uri description: URI of documentation describing the error. '@baseType': type: string description: When sub-classing, this defines the super-class. '@schemaLocation': type: string format: uri description: A URI to a JSON-Schema file that defines additional attributes and relationships '@type': type: string description: When sub-classing, this defines the sub-class entity name. PartyRef: type: object required: - '@referredType' - id properties: id: type: string description: unique identifier href: type: string description: Hyperlink reference name: type: string description: Name of the related entity. '@baseType': type: string description: When sub-classing, this defines the super-class '@schemaLocation': type: string format: uri description: A URI to a JSON-Schema file that defines additional attributes and relationships '@type': type: string description: When sub-classing, this defines the sub-class Extensible name '@referredType': type: string description: The actual type of the target instance when needed for disambiguation. Quantity: type: object description: An amount in a given unit properties: amount: default: 1 type: number format: float description: Numeric value in a given unit units: type: string description: Unit '@baseType': type: string description: When sub-classing, this defines the super-class '@schemaLocation': type: string format: uri description: A URI to a JSON-Schema file that defines additional attributes and relationships '@type': type: string description: When sub-classing, this defines the sub-class entity name RelatedParty: type: object description: Related Entity reference. A related party defines party or party role linked to a specific entity. required: - '@referredType' - id properties: id: type: string description: unique identifier href: type: string description: Hyperlink reference name: type: string description: Name of the related entity. role: type: string description: Role played by the related party '@baseType': type: string description: When sub-classing, this defines the super-class '@schemaLocation': type: string format: uri description: A URI to a JSON-Schema file that defines additional attributes and relationships '@type': type: string description: When sub-classing, this defines the sub-class Extensible name '@referredType': type: string description: The actual type of the target instance when needed for disambiguation. ResourceRef: type: object required: - id properties: id: type: string description: unique identifier href: type: string description: Hyperlink reference name: type: string description: Name of the resource value: type: string description: 'The resource value that can be used to identify a resource with a public key (e.g.: a tel nr, an msisdn)' '@baseType': type: string description: When sub-classing, this defines the super-class '@schemaLocation': type: string format: uri description: A URI to a JSON-Schema file that defines additional attributes and relationships '@type': type: string description: When sub-classing, this defines the sub-class Extensible name '@referredType': type: string description: The actual type of the target instance when needed for disambiguation. TimePeriod: type: object description: A period of time, either as a deadline (endDateTime only) a startDateTime only, or both properties: endDateTime: example: '1985-04-12T23:20:50.52Z' type: string format: date-time description: End of the time period, using IETC-RFC-3339 format startDateTime: example: '1985-04-12T23:20:50.52Z' type: string format: date-time description: Start of the time period, using IETC-RFC-3339 format. If you define a start, you must also define an end '@baseType': type: string description: When sub-classing, this defines the super-class '@schemaLocation': type: string format: uri description: A URI to a JSON-Schema file that defines additional attributes and relationships '@type': type: string description: When sub-classing, this defines the sub-class entity name