📂 Request-Response Protocol

# Endpoint

Table of Contents

Airnode serves APIs to blockchains according to Oracle Integration Specifications (OIS). APIs are composed of operations, which represent individual functionalities that an API offers. OIS maps each API operation to an endpoint, which can be thought of as an Airnode operation. The endpoints that an Airnode will serve over the request–response protocol are listed under triggers of config.json.

# endpointId

endpointId identifies specific endpoints that a provider serves, and is computed in JS (using ethers.js) as follows:

endpointId = ethers.utils.keccak256(ethers.utils.defaultAbiCoder.encode(['string'], [`${OIS_TITLE}/${ENDPOINT_NAME}`]));
1

Note that this means that endpointIds are not unique, and two providers can serve equivalent endpoints using the same ID (in fact, this is the desired outcome). This is not an issue, as requests are made with a providerId and endpointId pair.

This convention of determining endpointIds is not enforced at the protocol-level. For example, the provider can choose to generate their endpointIds randomly, and as long as their requesters use correct endpointIds, this will not be an issue.

# Authorizers

Providers can assign a list of authorizers to their endpoints. See the section about authorizers for more details.

Last Updated: 8/9/2022, 2:28:25 PM