Search code examples
amazon-web-servicesamazon-mobile-analytics

AWS mobile analytics KIPs API


I need to call aws mobile analytics KIP's api (http://docs.aws.amazon.com/mobileanalytics/latest/ug/drs-querying-kpis-lifetime-count.html) but I am stuck with how headers for this request should be passed. I have gone through their api reference.

What is the header format for calling this api?


Solution

  • Here is an example of my raw Headers for one of my requests:

    Host: mobileanalytics.us-east-1.amazonaws.com
    User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Firefox/45.0
    Accept: application/hal+json
    Accept-Language: en-US,en;q=0.5
    Accept-Encoding: gzip, deflate
    X-Amz-Date: 20161024T192952Z
    X-Amz-Security-Token: INSERT_SECURITY_TOKEN
    Authorization: AWS4-HMAC-SHA256 Credential=INSERT_CREDENTIAL/20161024/us-east-1/mobileanalytics/aws4_request, SignedHeaders=accept;host;x-amz-date;x-amz-security-token, Signature=INSERT_SIGNATURE
    Connection: keep-alive
    

    Be sure to include the Accept header:

    Accept: application/hal+json