DEV Community

Cover image for 🚀 API Maker - Headers
API Maker®
API Maker®

Posted on

🚀 API Maker - Headers

⭐ List of Headers ⭐

x-am-response-case
▸ It will modify the response keys text according to the requested case.
▸ list of supported case : camelCase | capitalCase | constantCase | dotCase | headerCase | noCase | paramCase | pascalCase | pathCase | sentenceCase | snakeCase

x-am-response-object-type
▸ This header try to make flat the nested field by combining all sub-fields with an underscore.
▸ It can also handle arrays of objects with unlimited depth.
▸ This header simplifies working with any compiled language [Kotlin, Swift], as the user can avoid creating nested classes.

x-am-meta
▸ A plenty of information about the API execution is given by these headers. like,

  • executionTime : Represents the execution time taken by the API Maker, not including network travel time..
  • executionPlan : It gives the execution plan of MongoDb.
  • apiAccessGroups : Provide details about the API user group and its permission.
  • runBy : It give information about the sandbox, who ran the code.

x-am-secret
▸ The user provides this header when he wants to use secret values in code.
▸ User can create multiple secret and select one of them at time of use.

x-am-internationalization
▸ Internationalization enables you to receive error or response messages in different languages from the API Maker.
▸ Support multiple languages, use of Symbols & Special characters, switch language in sec, reflected immediately these are the key feature of internationalization.

x-am-run-in-sendbox
▸ The system will use the sandboxes specified by the user. For example, if the user specifies 2, every request will run in the 2 sandbox, no matter there are multiple sandboxes and multiple instances existed in API Maker.

x-am-content-type-response
▸ The user can specify the content type of response using this header.
▸ List of content-type support by API Maker,

  • application/json
  • text/xml
  • text/yaml
  • application/octet-stream

x-am-cache-control
▸ As name suggest it will manage the caching of API.
▸ Two Operation allow on this header

  • No action : If caching enable, return result from cache.
  • Reset cache : It will reset the cache and return result from database.

x-am-get-encrypted-data
▸ Encrypted response can be obtained by providing "x-am-get-encrypted-data" in the header.
▸ Three Operation allow on this header

  • No encryption : Response return without encryption.
  • Get only encryption : Response return with only encrypted data.
  • Get data and encryption : Response return with actual data and it`s encryption.

x-am-sandbox-timeout
▸ The timeout period for code execution in the sandbox can be increased by using this header. If the code does not complete its execution in 13 seconds, which is the default value, API Maker will destroy the sandbox.
▸ This header allows the user to set the time period in milliseconds that the request needs to execute.

x-am-authorization
▸ It contains a token of the API Maker's API user.
▸ The end user must have to provide x-am-authorization in every API request.

x-am-user-authorization
▸ It contains the token of the end user.
▸ The API user has to provide x-am-user-authorization in every request which has access_type=TOKEN_ACCESS.

x-aws-authorization
▸ If API Maker's admin did the configuration in API Maker to take a token for AWS Cognito, the API user must pass the AWS Cognito token value in the 'x-aws-authorization' header.

x-google-authorization
▸ If API Maker's admin did the configuration in API Maker to take a token for a Google user, the API user must pass the Google user token value in the 'x-google-authorization' header.

x-azure-authorization
▸ If API Maker's admin did the configuration in API Maker to take a token for Azure Active Directory, the API user must pass the Azure Active Directory token value in the 'x-azure-authorization' header.

x-am-compression
▸ If a user sends 'x-no-compression:true' then it will not compress the response.

x-am-encrypted-payload
▸ The user must send "x-am-encrypted-payload:true" when they send an encrypted payload.


Youtube video link

https://youtu.be/t3icgWkcmFU

Websites

https://apimaker.dev

API Docs link

https://docs.apimaker.dev/v1/docs/apis-all/header/requestHeader.html

Follow on twitter

https://twitter.com/api_maker

Linked In

https://www.linkedin.com/company/api-maker

Top comments (0)