This service filters and returns the Third Party Providers that are in a healthy state.
The purpose of this service is to prevent unnecessary timeouts for consumers by avoiding calls to API resolvers that are unresponsive or offline when validating item ownership.
What this service does:
- Retrieves all Third Party Providers from TheGraph
- Checks the health of each Third Party Provider by fetching the endpoint required in the ADR-42
- Caches the providers that are healthy in a memory storage (LRU cache)
- Returns the healthy providers every time the endpoint
GET /providers
is called
If any Third Party Provider's endpoint returns a 200 OK
status code when fetched, it will be regarded as healthy.
This service only exposes GET /providers
endpoint which returns a JSON containing the healthy providers (the unhealthy providers are not returned on this endpoint). Response example:
{
"thirdPartyProviders": [
{
"id": "urn:decentraland:mumbai:collections-thirdparty:first-collection",
"resolver": "https://third-party-resolver-api.decentraland.zone/v1",
"metadata": {
"thirdParty": {
"name": "First collection",
"description": "Nonexistent: only for docs purposes."
}
}
},
{
"id": "urn:decentraland:mumbai:collections-thirdparty:second-collection",
"resolver": "https://third-party-resolver-api.decentraland.zone/v1",
"metadata": {
"thirdParty": {
"name": "Second collection",
"description": "Nonexistent: only for docs purposes."
}
}
}
]
}