Templates

# config.json

A template for an Airnode's configuration file. Below are notations to help explain contents of the template.

  • <FILL_*>: The value added is independent from other fields and a value is needed. These values are not considered secret unless you want them to be.

  • <FILL_OPERATION_PARAMETER_1_NAME>: If two fields contain the same expression, use the same value in them because they are referencing each other. Usually these are not considered to be secret.

  • ${CHAIN_PROVIDER_URL}: Interpolated values ${} that should be added to secrets.env though it is not required.

Consider the following relationships.

  • ois[0].title is related to triggers.rrp[0].oisTitle when they share the same field name.

  • ois[0].apiSpecifications.paths[path][method].parameters[0].in shows up in ois[0].endpoints[0].fixedOperationParameters[0].operationParameter.in

See config.json as a reference while building a config.json file.

{
  "chains": [
    {
      "authorizers": ["<FILL_*>"],
      "contracts": {
        "AirnodeRrp": "<FILL_*>"
      },
      "id": "<FILL_*>",
      "providers": {
        "<FILL_PROVIDER_NAME_1>": {
          "url": "${CHAIN_PROVIDER_URL}" // In secrets.env
        }
      },
      "type": "<FILL_*>",
      "blockHistoryLimit": "<FILL_*>",
      "ignoreBlockedRequestsAfterBlocks": "<FILL_*>"
    }
  ],
  "nodeSettings": {
    "cloudProvider": "aws",
    "airnodeWalletMnemonic": "<FILL_*>",
    "heartbeat": {
      "enabled": true,
      "url": "${HEARTBEAT_API_KEY}", // In secrets.env
      "apiKey": "${HEARTBEAT_API_KEY}", // In secrets.env
      "id": "${HEARTBEAT_ID}" // In secrets.env
    },
    "httpGateway": {
      "enabled": true,
      "apiKey": "${HTTP_GATEWAY_API_KEY}" // In secrets.env
    },
    "logFormat": "json",
    "logLevel": "INFO",
    "nodeVersion": "0.2.2",
    "region": "<FILL_*>",
    "stage": "<FILL_*>"
  },
  "triggers": {
    "rrp": [
      {
        "endpointId": "<FILL_*>",
        "oisTitle": "<FILL_OIS_TITLE>",
        "endpointName": "<FILL_ENDPOINT_NAME>"
      }
    ]
  },
  "ois": [
    {
      "oisFormat": "1.0.0",
      "version": "<FILL_*>",
      "title": "<FILL_OIS_TITLE>",
      "apiSpecifications": {
        "servers": [
          {
            "url": "<FILL_*>"
          }
        ],
        "paths": {
          "<FILL_PATH>": {
            "<FILL_METHOD>": {
              "parameters": [
                {
                  "in": "<FILL_OPERATION_PARAMETER_1_IN>",
                  "name": "<FILL_OPERATION_PARAMETER_1_NAME>"
                },
                {
                  "in": "<FILL_OPERATION_PARAMETER_2_IN>",
                  "name": "<FILL_OPERATION_PARAMETER_2_NAME>"
                }
              ]
            }
          }
        },
        "components": {
          "securitySchemes": {
            "<FILL_SECURITY_SCHEME_NAME>": {
              "in": "<FILL_*>",
              "type": "<FILL_*>",
              "name": "<FILL_*>",
              "scheme": "<FILL_*>"
            }
          }
        },
        "security": {
          "<FILL_SECURITY_SCHEME_NAME>": []
        }
      },
      "endpoints": [
        {
          "name": "<FILL_ENDPOINT_NAME>",
          "operation": {
            "method": "<FILL_METHOD>",
            "path": "<FILL_PATH>"
          },
          "fixedOperationParameters": [
            {
              "operationParameter": {
                "in": "<FILL_OPERATION_PARAMETER_1_IN>",
                "name": "<FILL_OPERATION_PARAMETER_1_NAME>"
              },
              "value": "<FILL_*>"
            }
          ],
          "reservedParameters": [
            {
              "name": "<FILL_*>",
              "fixed": "<FILL_*>"
            },
            {
              "name": "<FILL_*>",
              "fixed": "<FILL_*>"
            },
            {
              "name": "<FILL_*>",
              "default": "<FILL_*>"
            },
            {
              "name": "<FILL_*>"
            }
          ],
          "parameters": [
            {
              "name": "<FILL_*>",
              "default": "<FILL_*>",
              "operationParameter": {
                "in": "<FILL_OPERATION_PARAMETER_2_IN>",
                "name": "<FILL_OPERATION_PARAMETER_2_NAME>"
              }
            }
          ]
        }
      ]
    }
  ],
  "apiCredentials": [
    {
      "oisTitle": "<FILL_OIS_TITLE>",
      "securitySchemeName": "<FILL_SECURITY_SCHEME_NAME>",
      "securitySchemeValue": "${SS_API_KEY}" // In secrets.env
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
Last Updated: 12/31/2021, 8:03:53 AM