Service activation

Before another party can interact with you, they will first need to find your endpoints. The discovery service in the Nuts node can help you. The Nuts node can act as both server and client. From a use case definition you'll receive the following information/files:

Example:

{
   "id": "coffeecorner",
   "did_methods": ["web", "nuts"],
   "endpoint": "https://example.com/discovery/coffeecorner",
   "presentation_max_validity": 36000,
   "presentation_definition": {
     "id": "coffeecorner2024",
     "format": {
       "ldp_vc": {
         "proof_type": [
           "JsonWebSignature2020"
         ]
       },
       "jwt_vp": {
         "alg": ["ES256"]
       }
     },
     "input_descriptors": [
       {
         "id": "NutsOrganizationCredential",
         "constraints": {
           "fields": [
             {
               "path": [
                 "$.type"
               ],
               "filter": {
                 "type": "string",
                 "const": "NutsOrganizationCredential"
               }
             },
             {
               "id": "organization_name",
               "path": [
                 "$.credentialSubject.organization.name"
               ],
               "filter": {
                 "type": "string"
               }
             },
             {
               "path": [
                 "$.credentialSubject.organization.city"
               ],
               "filter": {
                 "type": "string"
               }
             }
           ]
         }
       }
     ]
   }
 }

The constraint for organization name (organization_name) can be used as search parameter.

Activate service for subject

POST /internal/discovery/v1/coffeecorner/my_subject_identifier

{
  "registrationParameters": {
    "fhir": "https://api.example.com/fhir",
    "contact": "alice@example.com"
  }
}

As you can see, contact information can also be added. Follow the use case requirements.

The response can be a 200 OK which means the service has been activated immediately. It can also be a 202 Accepted which means that the Nuts node received your request but was unable to send the activation to the discovery server. The Nuts node will retry periodically. Others can't find you yet. The logs will keep you posted.

To know if you're findable for others, you can perform a search on the registered subject.


Revision #5
Created 23 September 2024 09:26:48 by Wout Slakhorst
Updated 23 September 2024 12:05:14 by Wout Slakhorst