API Builder uses the configuration files in the project's
Note: API key values and session object are auto-generated when you create a new project.
For environment-specific configuration files, add either
.production to the end of the filename. For example,
foo.development.js will be used for the development environment, while
foo.production.js will be used for the production environment.
If multiple files set the same keys, the value from the last file loaded will be used unless its an environment-specific file. Files are loaded based on the order returned from the OS's readdir() method. For example, if Foo.js and foo.development.js set the same key, the value in Foo.js is used since it is not environment specific. However, if
foo.development.js set the same key, the value from
foo.development.js is used since it is loaded last.
Since Release 5.0.0, you can override the configuration file settings with an environment variable. For the setting you want to override, prefix variable with
ARROW_. For example, if you want to override the
apikey setting, set the
ARROW_APIKEY environment variable.
Configures the Admin Console. The
admin object may contain the following key-value pairs:
|apiDocPrefix||String||/apidoc||Path to access the generated API docs|
|css||Array<String>||-||CSS files to inject to customize the styling of the Admin Console and API docs. Files must be relative to |
|String||-||HTML content to display for unauthorized access (HTTP 401 error code)|
|disableAuth||Boolean||false||Set to |
|disableAPIDoc||Boolean||false||Set to |
|Boolean||false||Set to |
|enabled||Boolean||true||Set to |
|prefix||String||/arrow||Path to access the Admin Console|
|Array<String>||developer's e-mail address||When the application is in production, restrict access to the Admin Console to the specified accounts|
|Array<Number>||developer's organization||When the application is in production, restrict access to the Admin Console to the specified organizations|
Generated API key used when testing the application, that is, running the application locally.
Generated API key used when running the application in production, that is, when it is deployed to Arrow Cloud.
Location of the authorization module if
APIKeyAuthType is set to
For details, see Authentication Schemes.
String value indicating the authorization type for the application. By default, it is set to
For details, see Authentication Schemes.
Prefix path to use for the API requests for Models and APIs. Each endpoint you define in a Model or API will be prefixed by this value. By default, it is set to
Configures body-parser middleware settings. The
bodyParser object may contain the following key-value pairs:
|limit||Number/String||'1mb'||Sets the maximum request body size in bytes for the body-parser middleware|
Configuration object to pass to the busboy constructor, which is created when the API Builder middleware is initialized. For properties you can set, see the busboy documentation.
Configures the connectors used by the application. The connectors field is an object of key-value pairs where the key is the name of the connector and the value is another key-value pair object used to configure the connector. The configuration object is specific to each connector.
Most connectors will have their own default configuration file in the
Configures the CORS settings. The
cors object may contain the following key-value pairs:
|String||Specifies the URI that can access the server. Defaults to all.|
|safeHeaders||Array<String>||HTTP headers to expose and allow, that is, the specified value is set for |
Specify the name of the default connector. Used if a Model does not specify one.
true to ignore duplicate Model definitions. Defaults to false, which will throw an error if a model definition is duplicated.
Configures the logger utility. The
logging object may contain the following key-value pairs:
|logdir||String||./logs||Location of the transaction logs if enabled|
|Boolean||true||Set to |
Sets the log level for the logger utility. Accepted values are
Sets the port number for the server if the
PORT environment variable is not set. By default, the port is set to 8080.
Configures SSL settings for the server. The
ssl object may contain the following key-value pairs:
|Number||8443||SSL port number|