commonText
--8<-- [start:headerAll] headers: { "x-am-response-case": "capitalCase", // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase "x-am-response-object-type": "make_flat", // no_action | make_flat "x-am-meta": "true", // true, false "x-am-secret": "PROVIDE_SECRET_ID", "x-am-internationalization": "USER_I18N_ID", "x-am-run-in-sandbox": "2", "x-am-content-type-response": "text/xml", // application/json | text/xml | text/yaml | text/plain | text/html | application/octet-stream "x-am-cache-control": "reset_cache", // no_action | reset_cache "x-am-get-encrypted-data": "get_only_encryption", // no_encryption | get_only_encryption | get_data_and_encryption "x-am-sandbox-timeout": "13000", "x-no-compression": "true", // true | false "x-am-encrypted-payload": "true", // user will send 'true', when payload is encrypted for transfer // Authorization headers "x-am-authorization": "AUTHORIZATION_TOKEN", "x-am-user-authorization": "API_USER_TOKEN", "x-aws-authorization": "AWS_TOKEN", "x-google-authorization": "GOOGLE_TOKEN", "x-azure-authorization": "AZURE_TOKEN", }, --8<-- [end:headerAll]
--8<-- [start:headerShort] headers: { "x-am-response-case": "capitalCase", // noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase }, --8<-- [end:headerShort]
--8<-- [start:insColDbReal] instance: "mysql_8", database: "inventory", collection: "customers", --8<-- [end:insColDbReal]
--8<-- [start:insColDbRealMongoDB] instance: "mongodb", database: "inventory", collection: "customers", --8<-- [end:insColDbRealMongoDB]
--8<-- [start:insColDbStructure] instance: "INSTANCE_NAME", database: "DATABASE_NAME", collection: "COLLECTION_NAME", --8<-- [end:insColDbStructure]
--8<-- [start:deepWithoutInsideDeep] deep: [ { s_key: "SOURCE_COLLECTION_COLUMN_NAME", t_instance: "TARGET_INSTANCE_NAME", t_db: "TARGET_DATABASE_NAME", t_col: "TARGET_COLLECTION_NAME", t_key: "TARGET_COLLECTION_COLUMN_NAME", find: { "COLUMN_NAME": "COLUMN_VALUE" }, isMultiple: true, limit: 10, select: "COMMA_SEPARATED_COLUMN_NAMES", skip: 2, sort: "COLUMN_NAME", } ], --8<-- [end:deepWithoutInsideDeep]
--8<-- [start:deepShort] deep: [ { s_key: "customer_id", t_instance: "mysql", t_db: "inventory", t_col: "products", t_key: "owner_id", } ], --8<-- [end:deepShort]
--8<-- [start:queryParamsWithPartialDeep] queryParams: { select: "first_name,last_name", limit: 10, sort: "customer_id", find: { "first_name": "John" }, skip: 1, getTotalCount: true, deep: [{ s_key: "customer_id", t_key: "owner_id", t_col: "products", select: "name, description, price" }] }, --8<-- [end:queryParamsWithPartialDeep]
--8<-- [start:queryParamsWithFullDeep] queryParams: { find: { "COLUMN_NAME": "COLUMN_VALUE" }, skip: 1, limit: 5, sort: "COLUMN_NAME", select: "COMMA_SEPARATED_COLUMN_NAMES", getTotalCount: true, deep: [ { s_key: "SOURCE_COLLECTION_COLUMN_NAME", t_instance: "TARGET_INSTANCE_NAME", t_db: "TARGET_DATABASE_NAME", t_col: "TARGET_COLLECTION_NAME", t_key: "TARGET_COLLECTION_COLUMN_NAME", find: { "COLUMN_NAME": "COLUMN_VALUE" }, isMultiple: true, limit: 10, select: "COMMA_SEPARATED_COLUMN_NAMES", skip: 2, sort: "COLUMN_NAME", deep: [ { s_key: "SOURCE_COLLECTION_COLUMN_NAME", t_instance: "TARGET_INSTANCE_NAME", t_db: "TARGET_DATABASE_NAME", t_col: "TARGET_COLLECTION_NAME", t_key: "TARGET_COLLECTION_COLUMN_NAME", find: { "COLUMN_NAME": "COLUMN_VALUE" }, isMultiple: true, limit: 10, select: "COMMA_SEPARATED_COLUMN_NAMES", skip: 2, sort: "COLUMN_NAME", } ] } ] }, --8<-- [end:queryParamsWithFullDeep]
--8<-- [start:headersExplain]
Header | Description |
---|---|
x-am-response-case | It will change the response keys text as requested case. noChange | camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase |
x-am-response-object-type | To get flat response we use this request header. no_action | make_flat |
x-am-meta | To get the meta-data of requested API. false | true |
x-am-secret | Place secret id from API Maker. |
x-am-internationalization |
We can get backend error messages in any user language and directly show them to the user in UI, so the user can take appropriate actions.
Provide saved internationalization name in request header. |
x-am-run-in-sandbox | System will try to run requests in maximum provided sandbox, so if 1 provided every request will run in one sandbox, even if we have multiple sandbox with multiple API Maker instances. |
x-am-content-type-response | We can provide response type in request header. As provided header value we can expect the response type. application/json | text/xml | text/yaml |
x-am-cache-control | To reset the cache of the requested API manually and get fresh data, we can use 'x-am-cache-control' request header. no_action | reset_cache |
x-am-get-encrypted-data | Encrypt response data and get in to the response. no_encryption | get_only_encryption | get_data_and_encryption |
x-am-authorization | Provide token of API user in "x-am-authorization" header which will be generated from API Users inside API Maker. |
x-am-user-authorization | User token should be provided in 'x-am-user-authorization' header which will be generated based on some database user if required. |
x-aws-authorization | Provide AWS Cognito token in request header 'x-aws-authorization', if required. |
x-google-authorization | Provide Google user token in request header 'x-google-authorization', if required. |
x-azure-authorization | Provide Azure active directory token in request header 'x-azure-authorization', if required. |
x-no-compression | If user do not send 'x-no-compression' in request header, and response characters are more than value of "maxCharsResToCache" than the response will be compressed. |
x-am-sandbox-timeout | If any API did not give a response within given time, the sandbox will break and give a proper error message in the response. |
x-am-encrypted-payload | When user sent encrypted payload, user must have to sent "x-am-encrypted-payload:true". |
--8<-- [end:headersExplain]
--8<-- [start:summaryQueryParamTable]
Key | Value |
---|---|
find | ?find={first_name:'Bob'} |
skip | 2 |
limit | 2 |
sort | customer_id |
select | ?select=first_name,customer_id |
deep | ?deep=[{s_key:'customer_id,t_col: 'products',t_key:'owner_id'}] |
getTotalCount | true |
All table fields | You can use any column name as query params. |
--8<-- [end:summaryQueryParamTable]
--8<-- [start:EAPIId] Schema APIs
- SCHEMA_GET_ALL
- SCHEMA_GET_ALL_STREAM
- SCHEMA_GET_BY_ID
- SCHEMA_POST_BULK_INSERT
- SCHEMA_MASTER_SAVE
- SCHEMA_ARRAY_OPERATIONS
- SCHEMA_UPDATE_MANY
- SCHEMA_PUT_UPDATE_BY_ID
- SCHEMA_PUT_REPLACE_BY_ID
- SCHEMA_DEL_DELETE_BY_ID
- SCHEMA_POST_QUERY
- SCHEMA_POST_QUERY_STREAM
- SCHEMA_POST_QUERY_DELETE
- SCHEMA_POST_AGGREGATE
- SCHEMA_POST_COUNT
- SCHEMA_GET_DISTINCT
- SCHEMA_POST_DISTINCT_QUERY
Generated APIs
- GEN_GET_ALL
- GEN_GET_ALL_STREAM
- GEN_GET_BY_ID
- GEN_POST_BULK_INSERT
- GEN_MASTER_SAVE
- GEN_ARRAY_OPERATIONS
- GEN_UPDATE_MANY
- GEN_PUT_UPDATE_BY_ID
- GEN_PUT_REPLACE_BY_ID
- GEN_DEL_DELETE_BY_ID
- GEN_POST_QUERY
- GEN_POST_QUERY_STREAM
- GEN_POST_QUERY_DELETE
- GEN_POST_AGGREGATE
- GEN_POST_COUNT
- GEN_GET_DISTINCT
- GEN_POST_DISTINCT_QUERY
System APIs
- EXECUTE_PLAIN_QUERY
- ENCRYPT_DATA
- DECRYPT_DATA
- HASH_DATA
- GET_TOKEN
- CALL_EXTERNAL_API
- GET_SECRET
- GET_REDIS_KEY
- SET_REDIS_KEY
- REMOVE_REDIS_KEY
- CUSTOM_USER_CACHING
- RESET_REDIS_CACHE_DB
- RESET_REDIS_CACHE_CUSTOM_APIS
- RESET_REDIS_CACHE_SYSTEM_APIS
- RESET_REDIS_CACHE_TP_APIS
- GET_TABLE_META
- EMIT_EVENT
- EMIT_EVENT_WS
- IS_VALID_DATA_FOR_TABLE
- IS_VALID_DATA_FOR_CUSTOM_API
- IS_VALID_DATA_FOR_THIRD_PARTY_API
--8<-- [end:EAPIId]
--8<-- [start:packageJSONExplain]
serverName | It will be seen in nodes summary dashboard, so you can easily identify different servers. |
processTitle | This will be title of API Maker process when it starts. |
cpuCount |
1 = default. One API Maker process will be created. AUTO = If you give this value, it will create N number of processes where N = CPU core. 2 = It will create 2 API Maker processes. |
port | API Maker will start on this port. |
wsPort | API Maker will start WebSocket connection on this port. So frontend or mobile app can connect to this port for WebSocket notifications. ```json "Default" : "38245" ``` |
mongo_db_connection | Database connection string of API Maker`s internal use. |
logs | |
---|---|
enableLogs | If true, logging is enable. |
mongo_db_connection_logs | Logging database connection string. API Maker will store user's logs in this database. |
logRemoveSchedulerInterval |
API Maker will start log removal scheduler based on this value. Default is every day. |
maxLogsCount |
Maximum amount of logs to keep in log database. API Maker will run scheduler based on `logRemoveSchedulerInterval` and remove older logs. |
redisInternal | |
---|---|
Used by API Maker for it's internal use. It stores user's auto increment values in this redis. Clustering supported. |
|
nodes | List of redis nodes. |
port | Internal redis port. |
host | Internal redis host. |
pass | Internal redis password. |
redisExternal | |
---|---|
Used to give caching support for user's APIs. Clustering supported. |
|
nodes | List of redis nodes. |
port | External redis port. |
host | External redis host. |
pass | External redis password. |
otherRedisClusterOptions | Other redis cluster related options supported by ioredis NPM Package. |
redisValueExpireInSeconds |
Every key set by user in redis will expire automatically after this many seconds. It will keep redis clean. Ex : If you set value 29 over here, it means every key in redis expires after 29 seconds or TTL given by user while setting the key. |
maxCharsResToCache |
1000000 = If value has more than 1000000 characters, it will not be stored in redis. We should not store huge strings in redis. |
jwtOptions | |
---|---|
expiresIn | We can specify Token expire time limit from here, it should be always number in seconds. |
issuer | Specify the API Maker issuer of JWT generator. |
sandbox | |
---|---|
imageName: { sandboxNode : } | |
sandboxReqTimeout | Defines the maximum milliSecond allowed to complete the execution process. |
sandboxCountForAdmin | Process will create these many sandbox environment containers to handle multiple requests. |
sandboxMaxOldSpaceMB | Default is 2500 or (total_memory / cpu_count) MB whichever is max. AM version required >= 1.10.0 |
removeSandboxInactiveSinceMinutes | Remove sandbox of admins which is not used since this minutes to free resources. For that scheduler will run every (removeSandboxInactiveCron = 10) minutes to check these minutes. (Note : We can give like 0.25 float value also) |
defaultCreation | |
---|---|
apiUserPass | Here, we can set password for the default API User. |
passCommunication |
Used for communication between API Maker frontend and API Maker backend. It's value should be same for all environments of that project in all server deployment. |
passJWT |
Used for generating jwt token. It's value should be same for all environments of that project in all server deployment. |
passDBEncryptDecrypt |
Values in API Maker mongoDB database and passwords in git repository, will be encrypted using this password. It's value should be same for all environments of that project in all server deployment. If value is not same, API Maker will not able to decrypt git repository values. |
feTransferDataValidityInSecondsDefault | Encrypted data sent by frontend or mobile apps, will be expired after this many seconds. |
refreshTokenValidForS | Refresh token will be valid after these many seconds of expiring access token. |
importDefaultUsers | API Maker will insert default users from this JSON file when these emails are not present in API Maker's MongoDB. |
compressThreshold | If response is greater than 51200 characters then it will be compressed otherwise not. |
bodyLimit | Defines the maximum payload in bytes, the server is allowed to accept. |
cron_job_time_zone | API Maker's internal schedulers will run on this time zone. |
store_url | API Maker will install APIs from store from below URL. |
maximum_test_user_count | Fetch maximum these many test usernames from table if count is not provided in schema |
uploadedFileCleaningSchedulerCron |
Scheduler will run every this much time and clean files which are older than uploadedFileRemoveOlderThanThisTimeInSeconds. Default : 30 minutes |
uploadedFileRemoveOlderThanThisTimeInSeconds |
Remove uploaded files older than time specified in second at this field. Default : 1800 seconds (30 Minutes) |
--8<-- [end:packageJSONExplain]
--8<-- [start:queryParamsAll] queryParams: { find: { first_name: 'James', }, }, --8<-- [end:queryParamsAll]