BeAPI Framework Configuration

Once you have completed installation, you will next need to configure your environment. Follow these configuration steps in order to get your environment setup and working:


Application Properties

in your 'src/main/resources' directory, you will find your application.properties file. The following stats are what you are most concerned with changing:

NOTE: These are already preconfigured in the demo project; if you create a NEW PROJECT, these will have to be changed.


Gradle Properties Settings

Since this is an API application, people will want to get into the nuts an bolts of configuring this so we also supply some of the more advanced configuration settings:

  • JVM Args: Should you need to tweak the default BUILD JVM ARGS, you will find the JVM Args in the 'gradle.properties'; there is a section that looks like the following:

    You can use these default per your instance or change them to your needs. You then simply pass the 'configType' variable with the OPTION for your instance [nano/medium/large] with your 'BUILD':

    gradle clean build -Pargs=configType=nano

Beapi Api Config Changes

Once you have created your project, you will need to edit your 'beapi_api.yaml' file in your ~/.boot/{env}/ directory and changes the following settings:

  • API
  • BOOTSTRAP

    You will also need to change the following. For more information about this, see the installation process.


By Default, the beapi_api.yml file has the following settings:


API Properties Definition Default
attemptsInteger representing number of login failures5
procCoresInteger representing number of system cores [set to be deprecated in 0.7]4
documentationUrlString representing documentation url'http://orubel.github.io/Beapi-API-Framework/'
views[deprecated]['admin','apidoc','api','login','logout']
reservedurisList representing restricted URI's ['/authenticate','/register','/error','/login','/logout']
publicEndpointList representing static endpoint in application['jwtAuthentication','beapiError']
staticEndpointList representing hardcoded endpoints in starter['apidoc','connector','properties','user','authority','hook']
apiServerString representing the (protocol / FQDN or IP / port) used by server'http://localhost:8080'
apichainLimitInteger representing number of times api can be chained3
postcrement[deprecated]false
chainingEnabledBoolean representing if chaining is enabledtrue
batchingEnabledBoolean representing if batching is enabledtrue
encodingString representing the default encodingUTF-8
iostateDirString representing the configuration dir'.boot/.iostate'
serverTypeString representing the server type; can be either master/slavemaster
configTypeString representing the Tomcat config type; can be either nano/medium/largelarge
testingProtocolString representing the default protocol to use when testinghttp
autoTestBoolean representing if the app uses automated testingfalse

API/Throttle Properties Definition Default
activeBoolean representing if throttling is onfalse
rateLimitMap representing roles/rate-limits{'ROLE_USER':1000,'ROLE_ADMIN':10000}
dataLimitMap representing roles/data-limits{'ROLE_USER':1000000}
expiresInteger representing number of seconds til reset['admin','apidoc','api','login','logout']

API/Webhook Properties Definition Default
activeBoolean representing if webhooks are activefalse

API/Security Properties Definition Default
superuserRoleString representing super user roleROLE_ADMIN
userRoleString representing user roleROLE_USER
anonRoleString representing unknown userROLE_ANONYMOUS
networkGroupsList representing network types['open','public','private']
networkRolesMap representing roles associated with network types{'open':['ROLE_ADMIN','ROLE_ANONYMOUS','ROLE_USER'],'public':['ROLE_ADMIN','ROLE_USER'],'private':['ROLE_ADMIN']}
corsWhitelistList representing whitelisted FQDN's and IP's for CORS['http://localhost','http://localhost:8080','http://127.0.0.1','http://127.0.0.1:8080']

API/Bootstrap Properties Definition Default
superUserkey/val map representing login/password/email of the super-userN/A
superUserkey/val map representing login/password/email of the test-userN/A

Beapi DB Config Changes

You will then need to edit your 'beapi_db.yaml' file in your ~/.boot/{env}/ directory and changes the following settings (for more information, see springboots information about setting up a datasource):