openapi: 3.0.1 info: title: Dizme API description: Dizme agent API documentation. termsOfService: http://swagger.io/terms/ contact: url: https://dizme.io email: team.dizme@etuitus.it version: 2.0.0 servers: - url: https://demo-agent-cl.dizme.io/api/v2 tags: - name: config description: Configurations (proof, credential_def, schemas info etc) can be made througt dizme agent - name: verify description: Verify credential operation can be made througt dizme agent - name: connection description: Pairwise connection operation can be made througt dizme agent - name: transaction - name: credential description: Credential issuing operation can be made througt dizme agent paths: /verify/{service_bc}/request: post: parameters: - in: path name: service_bc schema: type: string required: true description: Business code of the organization service configurated on DizmeAgent tags: - verify summary: Create a new verify request. description: "The verify request can be created for an already exisisting pairwise\ \ connection (providing the connection_id) or for a not yet executed pairwise connection. \nIn this last case,\ \ a connection will be previously performed automatically.\nMultiple read\ \ parameter is allowed only for request without connection_id provided" operationId: create_verify_request requestBody: description: Request object needed to execute the verify request operation. content: application/json: schema: $ref: '#/components/schemas/VerifyRequest' required: true responses: 200: description: Successfull response content: application/json: schema: $ref: '#/components/schemas/InvitationResponse' 401: description: Not authorized content: application/json: schema: type: string security: - Auth_token: [] - Agent_id: [] x-codegen-request-body-name: body /verify/response: post: tags: - verify summary: Send a response for a verify request description: This service can be used in order to send an async response related to a verify credential operation previously executed. operationId: create_verify_response requestBody: description: Request object needed to execute the verify response operation. content: application/json: schema: $ref: '#/components/schemas/VerifyResponseRequest' required: true responses: 200: description: Successfull response content: application/json: schema: $ref: '#/components/schemas/DizmeAgentResponse' 401: description: Not authorized content: application/json: schema: type: string security: - Auth_token: [] - Agent_id: [] x-codegen-request-body-name: body /connection/{service_bc}/invitation: post: parameters: - in: path name: service_bc schema: type: string required: true description: Business code of the organization service configurated on DizmeAgent tags: - connection summary: Send a connection_invitation description: The service allow to create a pairwise connection invitation for an Owner. After the pairwise connection has been established, it's possible to send using that connection, verify request, issue credential offer, notification message and so on. operationId: create_connection_invitation requestBody: description: Request object needed to execute the connection invitation operation. content: application/json: schema: $ref: '#/components/schemas/ConnectionInvitationRequest' required: true responses: 200: description: Successfull response content: application/json: schema: $ref: '#/components/schemas/InvitationResponse' 401: description: Not authorized content: application/json: schema: type: string security: - Auth_token: [] - Agent_id: [] x-codegen-request-body-name: body /agent/notify/send: post: tags: - connection summary: Send a Notify message through established pairwise connection description: The service allow to send a notify message to a pairwise connection. The supported notify message types are Plain text and Html. operationId: send_notify_message requestBody: description: Request object needed to send the notify message. content: application/json: schema: $ref: '#/components/schemas/NotifyRequest' example: { "connection_id": "d36b5123-27a3-45db-a5c1-ba696b42880a", "mime-type": "text/html", "title": [ { "lang": "it", "message": "Titolo notifica dall'organizzazione" }, { "lang": "en", "message": "Notify title from the organization" } ], "body": [ { "lang": "it", "message": "PGh0bWw+CiAgPGJvZHk+CiAgPGgyPldlbGNvbWUgVG8gZGl6bWU8L2gyPgoKPHRhYmxlIGNsYXNzPSJlZGl0b3JEZW1vVGFibGUiPgo8dGJvZHk+Cjx0cj4KPHRkPjxzdHJvbmc+TmFtZTwvc3Ryb25nPjwvdGQ+Cjx0ZD48c3Ryb25nPkNpdHk8L3N0cm9uZz48L3RkPgo8dGQ+PHN0cm9uZz5BZ2U8L3N0cm9uZz48L3RkPgo8L3RyPgo8dHI+Cjx0ZD5Kb2huPC90ZD4KPHRkPkNoaWNhZ288L3RkPgo8dGQ+MjM8L3RkPgo8L3RyPgo8dHI+Cjx0ZD5MdWN5PC90ZD4KPHRkPldpc2NvbnNpbjwvdGQ+Cjx0ZD4xOTwvdGQ+CjwvdHI+Cjx0cj4KPHRkPkFtYW5kYTwvdGQ+Cjx0ZD5NYWRpc29uPC90ZD4KPHRkPjIyPC90ZD4KPC90cj4KPC90Ym9keT4KPC90YWJsZT4KPHA+VGhpcyBpcyBhIHRhYmxlIHlvdSBjYW4gZXhwZXJpbWVudCB3aXRoIDxhIGhyZWY9Ind3dy5kaXptZS5pbyIgYWx0PSJkaXptZSI+IGRpem1lIHdhbGxldDwvYT48L3A+CiAgICAgIDxib2R5Pgo8L2h0bWw+" }, { "lang": "en", "message": "PGh0bWw+CiAgPGJvZHk+CiAgPGgyPldlbGNvbWUgVG8gZGl6bWU8L2gyPgoKPHRhYmxlIGNsYXNzPSJlZGl0b3JEZW1vVGFibGUiPgo8dGJvZHk+Cjx0cj4KPHRkPjxzdHJvbmc+TmFtZTwvc3Ryb25nPjwvdGQ+Cjx0ZD48c3Ryb25nPkNpdHk8L3N0cm9uZz48L3RkPgo8dGQ+PHN0cm9uZz5BZ2U8L3N0cm9uZz48L3RkPgo8L3RyPgo8dHI+Cjx0ZD5Kb2huPC90ZD4KPHRkPkNoaWNhZ288L3RkPgo8dGQ+MjM8L3RkPgo8L3RyPgo8dHI+Cjx0ZD5MdWN5PC90ZD4KPHRkPldpc2NvbnNpbjwvdGQ+Cjx0ZD4xOTwvdGQ+CjwvdHI+Cjx0cj4KPHRkPkFtYW5kYTwvdGQ+Cjx0ZD5NYWRpc29uPC90ZD4KPHRkPjIyPC90ZD4KPC90cj4KPC90Ym9keT4KPC90YWJsZT4KPHA+VGhpcyBpcyBhIHRhYmxlIHlvdSBjYW4gZXhwZXJpbWVudCB3aXRoIDxhIGhyZWY9Ind3dy5kaXptZS5pbyIgYWx0PSJkaXptZSI+IGRpem1lIHdhbGxldDwvYT48L3A+CiAgICAgIDxib2R5Pgo8L2h0bWw+" } ] } required: true responses: 200: description: Successfull response content: application/json: schema: $ref: '#/components/schemas/NotifyResponse' 401: description: Not authorized content: application/json: schema: type: string security: - Auth_token: [] - Agent_id: [] x-codegen-request-body-name: body /credential/{service_bc}/offer: post: parameters: - in: path name: service_bc schema: type: string required: true description: Business code of the organization service configurated on DizmeAgent tags: - credential summary: Send a credential offer description: The service allow to create a credential offer. The offer can be sent througt a pairwise connection (using connection_id), or created with an inviation link and the owner can open or scan. operationId: create_credentil_offer requestBody: description: Request object needed to execute the credential offer. content: application/json: schema: $ref: '#/components/schemas/CredentialOfferRequest' required: true responses: 200: description: Successfull response content: application/json: schema: $ref: '#/components/schemas/InvitationResponse' 401: description: Not authorized content: application/json: schema: type: string security: - Auth_token: [] - Agent_id: [] x-codegen-request-body-name: body /proof/set: post: tags: - config summary: Save a proof request. description: The service allow to save a proof request. The proof requet will be proposed to the owner using the credential verify requests (see /verify/request). operationId: proof_set requestBody: description: Request object needed to execute the proof set. content: application/json: schema: $ref: '#/components/schemas/ProofSetRequest' required: true responses: 200: description: Successfull response content: application/json: schema: $ref: '#/components/schemas/DizmeAgentInitResponse' 401: description: Not authorized content: application/json: schema: type: string security: - Auth_token: [] - Agent_id: [] x-codegen-request-body-name: body /proof/delete: post: tags: - config summary: Delete a proof request. description: The service allow to delete a proof request previously created. operationId: proof_delete requestBody: description: Request object needed to execute the proof delete. content: application/json: schema: $ref: '#/components/schemas/ProofDeleteRequest' required: true responses: 200: description: Successfull response content: application/json: schema: $ref: '#/components/schemas/DizmeAgentResponse' 401: description: Not authorized content: application/json: schema: type: string security: - Auth_token: [] - Agent_id: [] x-codegen-request-body-name: body /proof/attributes: post: tags: - config summary: List all attributes of a proof. description: The service allow to list all attributed of a proof. operationId: proof_attributes_list requestBody: description: Request object needed to execute the list proof attributes. content: application/json: schema: type: object required: - proof_business_code properties: proof_business_code: type: string description: The unique identifier of the proof example: proof_business_code: "PUT YOUR BUSINESS_CODE HERE, example: PROOF_YOUR_COMPANYNAME_0000000001" required: true responses: 200: description: Successfull response content: application/json: schema: $ref: '#/components/schemas/ProofAttributesAgentResponse' 401: description: Not authorized content: application/json: schema: type: string security: - Auth_token: [] - Agent_id: [] x-codegen-request-body-name: body /proof/attributes/delete: post: tags: - config summary: Delete the provided attributes from the proof. description: The service allow to delete all the provided attributes from the proof. Note that the proof cannot be empty, al least one attribute is needed. operationId: proof_atributes_delete requestBody: description: Request object needed to execute the delete proof attributes. content: application/json: schema: type: object required: - proof_business_code - attributes properties: proof_business_code: type: string description: The unique identifier of the proof attributes: type: "array" items: type: string description: The list of the attributes referent to be deleted example: proof_business_code: "PUT YOUR BUSINESS_CODE HERE, example: PROOF_YOUR_COMPANYNAME_0000000001" attributes: ["referent1", "referent2", "referentxxx"] required: true responses: 200: description: Successfull response content: application/json: schema: $ref: '#/components/schemas/ProofAttributesAgentResponse' 401: description: Not authorized content: application/json: schema: type: string security: - Auth_token: [] - Agent_id: [] x-codegen-request-body-name: body /proof/attributes/add: post: tags: - config summary: Add the provided attributes to the proof. description: The service allow to add all the provided attributes to the proof. operationId: proof_atributes_add requestBody: description: Request object needed to execute the add proof attributes. content: application/json: schema: type: object required: - proof_business_code - attributes properties: proof_business_code: type: string description: The unique identifier of the proof attributes: type: "array" items: type: object description: The list of the attributes with the detail to be added example: proof_business_code: "PUT YOUR BUSINESS_CODE HERE, example: PROOF_YOUR_COMPANYNAME_0000000001" attributes: [ { "names": [ "name", "surname" ], "revealed": true, "description": [ { "lang": "en", "message": "Your personal data" }, { "lang": "it", "message": "I tuoi dati personali" } ], "attr_reference": "referent_1", "restrictions": [ { "cred_def_id": "FqtdLvcM2i4Q7Ewd8Uf8FJ:3:CL:80920:L1" } ] }, { "names": "email", "revealed": true, "description": [ { "lang": "en", "message": "Your Email" }, { "lang": "it", "message": "La tua Email" } ], "attr_reference": "referent_2", "restrictions": [ { "cred_def_id": "Nkm6Gvyb5wCru52raJ8DkV:3:CL:80915:Email" } ] }, { "name": owner_consent, "revealed": true, "description": [ { "lang": "en", "message": "Your consent" }, { "lang": "it", "message": "Il tuo consenso" } ], "attr_reference": "referent_3", "selection_type": "SINGLE", "choice_list": [ "Consenso accesso" ], "type": "CHOICE" } ] required: true responses: 200: description: Successfull response content: application/json: schema: $ref: '#/components/schemas/ProofAttributesAgentResponse' 401: description: Not authorized content: application/json: schema: type: string security: - Auth_token: [] - Agent_id: [] x-codegen-request-body-name: body /proof/attributes/edit: post: tags: - config summary: Edit the provided attributes of the proof. description: The service allow to edit all the provided attributes present in the proof. The referent is the attribute key operationId: proof_atributes_edit requestBody: description: Request object needed to execute the edit proof attributes. content: application/json: schema: type: object required: - proof_business_code - attributes properties: proof_business_code: type: string description: The unique identifier of the proof attributes: type: "array" items: type: object description: The list of the attributes with the detail to be added example: proof_business_code: "PUT YOUR BUSINESS_CODE HERE, example: PROOF_YOUR_COMPANYNAME_0000000001" attributes: [ { "names": [ "name", "surname" ], "revealed": true, "description": [ { "lang": "en", "message": "Your personal data" }, { "lang": "it", "message": "I tuoi dati personali" } ], "attr_reference": "referent_1", "restrictions": [ { "cred_def_id": "FqtdLvcM2i4Q7Ewd8Uf8FJ:3:CL:80920:L1" } ] }, { "names": "email", "revealed": true, "description": [ { "lang": "en", "message": "Your Email" }, { "lang": "it", "message": "La tua Email" } ], "attr_reference": "referent_2", "restrictions": [ { "cred_def_id": "Nkm6Gvyb5wCru52raJ8DkV:3:CL:80915:Email" } ] }, { "name": owner_consent, "revealed": true, "description": [ { "lang": "en", "message": "Your consent" }, { "lang": "it", "message": "Il tuo consenso" } ], "attr_reference": "referent_3", "selection_type": "SINGLE", "choice_list": [ "Consenso accesso" ], "type": "CHOICE" } ] required: true responses: 200: description: Successfull response content: application/json: schema: $ref: '#/components/schemas/ProofAttributesAgentResponse' 401: description: Not authorized content: application/json: schema: type: string security: - Auth_token: [] - Agent_id: [] x-codegen-request-body-name: body /transaction/{transaction_id}/status: get: tags: - transaction parameters: - name: transaction_id in: path description: The transaction identifier required: true schema: type: string responses: 200: description: Successfull response content: '*/*': schema: $ref: '#/components/schemas/TransactionStatusResponse' components: schemas: VerifyRequest: required: - business_code type: object properties: connection_id: type: string description: connection_id, if provided the request will be sent to that pairwise connection, otherwise an invitation link is returned in order to request the verify to the owner business_code: type: string description: business code associated to the proof request previously created. allow_multiple_read: type: boolean description: Usable only if connection_id is not provided, true if the verify request can be used multiple times (multiple owner can use the same link or qr-code), false otherwise request_uid: type: string description: The identifier of the request to be used, if not provided it will be automatically generated for you by dizme agnet InvitationResponse: allOf: - $ref: '#/components/schemas/DizmeAgentResponse' properties: invitation_short_link: type: string description: The short link to be used in order to accept this invitation. Returned only if the connection_id is not provided. VerifyResponseRequest: type: object properties: presentation_id: type: string description: presentation_id of the involved verify request. It is the identifier associated with the proof request executed, this id must be used in case an async verify response (using the verify/response service) must be sent to the owner. result: type: boolean description: The result of the verify request executed, True if successfull false otherwise descriptions: type: array description: The localized description related to the verify response items: $ref: '#/components/schemas/DizmeDescription' DizmeAgentResponse: required: - message - message_code - status_code type: object properties: status_code: type: integer format: int32 description: '100=>Success, 101=>Failed' message_code: type: integer format: int32 message: type: string description: 'description of the operation executed' ProofAttributesAgentResponse: allOf: - $ref: '#/components/schemas/DizmeAgentResponse' type: object properties: proof_descriptions_list: type: object properties: $PROOF_BUSINESS_CODE$: type: array description: The list of attributes present in the proof items: type: object example: [ "PROOF_XYZ": { "description": [ { "lang": "en", "message": "Your consent" }, { "lang": "it", "message": "Il tuo consenso" }, ], "attr_referent": "attr6_referent", "revealed": true, "name": "consenso_999999", "selection_type": "SINGLE", "choice_list": [ "Testo del consenso" ], "type": "CHOICE" }, { "description": [ { "lang": "en", "message": "Dalla credenziale Email" }, { "lang": "it", "message": "From credential Email" }, ], "attr_referent": "email_referent", "revealed": true, "restrictions": [ { "cred_def_id": "Nkm6Gvyb5wCru52raJ8DkV:3:CL:80915:Email" } ], "name": "email" } ] DizmeAgentInitResponse: allOf: - $ref: '#/components/schemas/DizmeAgentResponse' type: object properties: business_code: type: string description: 'The business code associated with the item created' NotifyResponse: allOf: - $ref: '#/components/schemas/DizmeAgentResponse' type: object properties: notify_id: type: string description: 'Unique identifier associated to the notify message sent' DizmeDescription: required: - lang - message type: object properties: lang: type: string message: type: string CredentialAttributePreview: required: - mime_type - name - value type: object properties: name: type: string description: "The name of the attribute defined in the related schema" mime_type: type: string description: "text/plain, image/jpg ..." value: type: string description: "The value of the attribute for the credential issue" ConnectionInvitationRequest: type: object properties: allow_multiple_read: type: boolean description: Usable only if connection_id is not provided, true if the verify request can be used multiple times, false otherwise request_uid: type: string description: The identifier of the request to be used, if not provided it will be automatically generated NotifyRequest: required: - connection_id - mime-type - title - body type: object properties: connection_id: type: string description: connection_id to which the notify will be sent mime-type: type: string description: the type of notify (html/text) title: type: array description: The localized title of the notify items: $ref: '#/components/schemas/DizmeDescription' body: type: array description: The localized body of the notify, message must be base64 encoded items: $ref: '#/components/schemas/DizmeDescription' CredentialOfferRequest: required: - credential_def_id type: object properties: request_uid: type: string description: The identifier of the request to be used, if not provided it will be automatically generated connection_id: type: string description: connection_id to which the request will be sent credential_def_id: type: string description: The credential definition id to offer credential_values: type: array description: The list of the credential attributes to offer, Mandatory in case of connection_id provided items: $ref: '#/components/schemas/CredentialAttributePreview' comment: type: string description: A comment description of the operation to present to the user TransactionStatusResponse: allOf: - $ref: '#/components/schemas/DizmeAgentResponse' ProofItem: required: - proof - proof_details type: object properties: proof: type: object proof_details: type: object ProofSetRequest: required: - credential_def_id type: object properties: proof_business_code: type: string description: The unique identifier associated to the proof request. If not provided one will be automatically generated. This is the code that will be used in the verify request or in the dizme widget init. description: type: string description: Description of the proof request. It's a label only for internal use. proof_value: type: object description: The json object of the proof request. items: $ref: '#/components/schemas/ProofItem' example: proof_business_code: "PUT YOUR BUSINESS_CODE HERE, example: PROOF_YOUR_COMPANYNAME_0000000001" description: "Proof for identity verification" proof_value: { "proof": { "requested_attributes": { "attr1_referent": { "restrictions": [ { "cred_def_id": "Nkm6Gvyb5wCru52raJ8DkV:3:CL:80915:Email" } ], "name": "email" }, "attr2_referent": { "name": "selfie_img", "restrictions": [ { "cred_def_id": "Nkm6Gvyb5wCru52raJ8DkV:3:CL:80917:L0_BIO" } ] } }, "nonce": "1234567890", "name": "Proof Example", "requested_predicates": {}, "version": "1.0" }, "proof_details": { "comment": [ { "lang": "en", "message": "Verify identity request" }, { "lang": "it", "message": "Richiesta credenziali per verifica identità" } ], "proof_details": [ { "attr_reference": "attr1_referent", "revealed": true, "description": [ { "lang": "en", "message": "From Credential Email" }, { "lang": "it", "message": "Dalla credenziale Email" } ] }, { "attr_reference": "attr2_referent", "revealed": true, "description": [ { "lang": "en", "message": "From Credential Selfie" }, { "lang": "it", "message": "Dalla credenziale Selfie" } ] } ] } } ProofDeleteRequest: required: - proof_business_code properties: proof_business_code: type: string description: The unique identifier associated to the proof request. securitySchemes: Auth_token: type: apiKey name: X-Auth-Token in: header Agent_id: type: apiKey name: X-Dizme-Agent-Id in: header