API settings
- To save API settings click on the
Add API Settingsbutton.
API setting code
Accept only encrypted data
- If you set the
acceptOnlyEncryptedDatavalue astrueAPI Maker will accept only the encrypted body, query params, and URL. - In the header provide
x-am-encrypted-payload: truewhen you setacceptOnlyEncryptedData: true.
API access type
- There are two possible values of
apiAccessType. - When you set
IS_PUBLICthis API should be publicly available. - When you set
TOKEN_ACCESSthis API should require a token to access. - Provide API User token in the
x-am-authorizationheader.
Auth token info
- If you do not provide authTokenInfo it will take authTokenInfo from the default secret.
- If the authTokenInfo value is an empty array then provide only AM's API user's token in the
x-am-authorizationheader because we are overriding the default secret's authTokenInfo. In that, you have to provide API Maker's API user token in thex-am-authorizationheader.
- Now, if you set
authTokenType: T.EAuthTokenType.AM_DBand given required values in theauthTokenAMDBobject. The end user(who will use APIs) needs to provide the token in thex-am-user-authorizationheader. - The end user needs to create a token using the given instance, database, collection, usernameColumn, and passwordColumn values. Use the
getTokensystem API to get the token.