Skip to main content

Find care organizations and their endpoints

DiscoveryBefore ofyou Organizationscan query another care organization, you need its API endpoint and Endpointsits authorization server URL. Find both by searching the use case's Discovery Service through your own Nuts node.

Once

Before organizationsyou havestart

activated
themselvesThe node has the use case's Discovery Service definition (see chapter "Configure the node for a use casecase"). (covered in previous chapters), they become discoverable. This chapter focuses exclusively on how clients find organizations and their service endpoints using the Service Discovery API:
GET <internal Nuts interface>/internal/discovery/v1/{serviceID}360-graden?credentialSubject.subject.O=Zorgorganisatie*

This

API returns all organizations registered for a given service, optionally filtered by search parameters. It360-graden is the primaryservice mechanismID: forthe discovering:id field of the Discovery Service definition. Without query parameters, you get all registered care organizations.

Query parameters are paths in the registered credentials:

  • WhichWrite organizationsthe participatepath without $., e.g. credentialSubject.subject.O.
Field IDs from the definition, like organization_name, don't work as query parameters. Matching is case-insensitive. Use * at the start or end of a value as a wildcard. With several query parameters, all of them must match the same credential. Name and city are both in yourthe useX509Credential, caseso Whatyou endpointscan theycombine expose (FHIR URL, OAuth server, etc.)them.

Example

For instance,360-graden-clientbeeld:

Search by Query parameter Name credentialSubject.subject.O=Zorgorganisatie* City credentialSubject.subject.L=Utrecht

Your node searches its own copy of the Discovery Service. It updates that copy every 10 minutes by default (discovery.client.refreshinterval), so a new registration can take that long to searchshow the "eOverdracht" service for a care organization that contains "Thuiszorg" in its name, perform the following HTTP query:up.

GET

The <internal Nuts interface>/internal/discovery/v1/eOverdracht?credentialSubject.organization.name=*Thuiszorg*

Could yield (some fields omitted for brevity):

result
[
  {
    "id": "did:web:nuts.other.example:iam:2f1b7c3e-0d1a-4a7e-9a55-4b8f3c2e9d10#7c4e...",
    "credential_subject_id": "did:web:example.com"nuts.other.example:iam:2f1b7c3e-0d1a-4a7e-9a55-4b8f3c2e9d10",
    "fields": {
      "organization_name": "Thuiszorg de Zonnebloem"
    },
    "id"organization_id": "did:web:example.com#1"nuts.other.example:iam:2f1b7c3e-0d1a-4a7e-9a55-4b8f3c2e9d10",
      "organization_name": "Zorgorganisatie B",
      "organization_city": "Utrecht",
      "organization_ura": "87654321",
      "authorization_server_url": "https://nuts.other.example/oauth2/careorg-b",
      "fhir_base_url_r4": "https://fhir.other.example/r4"
    },
    "registrationParameters": {
      "fhirBaseURL"authServerURL": "https://example.com/fhir"nuts.other.example/oauth2/careorg-b",
      "fhirR4BaseURL": "https://fhir.other.example/r4"
    },
    "vp": { // etc... }
  }
]

Part What it is credential_subject_id The care organization's DID fields Values taken from the credentials, named by the field IDs in the Discovery Service definition registrationParameters The values the care organization registered, e.g. its FHIR base URL authServerURL The authorization server URL. You need it to request an access token (see "Requesting access (outbound)")

Which fields and registrationParametersregistration areparameters returnedyou get depends on the use case.

Review

API thereference: use case's Discovery Service's Presentation Definition for more information.Service