What would you like to see next?

Accept Access Key and Bucket Key as get parameters in API

Some devices can't set HTTP headers and are limited to HTTP GET. Please support such devices by accepting all parameters in guery rather than headers and json.

2 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Tibor Jakab shared this idea  ·   ·  Admin →

    The API now supports using the HTTP GET verb for sending data. This is a-typical of HTTP REST style APIs, but very convenient for many simple HTTP clients. Since GET requests cannot contain request bodies, you will have to supply data via url parameters. An example would be this:

    curl ‘https://groker.initialstate.com/api/events?accessKey=YOUR_ACCESS_KEY&bucketKey=YOUR_BUCKET_KEY&some_key=some_value&some_other_key=some_other_value’;

    This curl command doesn’t specify a verb action, and therefore uses the default HTTP GET verb. You could also paste this url into a browser and the browser will perform a GET which will send the data to that bucket.

    5 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • AdminInitial State Team (Support Lead, Initial State) commented  · 

        This feature is being dramatically improved. Currently, in order to use bucketKey and accessKey as query parameters it requires the Content-Type header be set to `application/x-www-form-urlencoded`. We're working on an improved implementation of this that will allow url parameters without a Content-Type header set.

        Likewise, we're evaluating allowing GET verbs to POST data. Since this is a break in the HTTP/1.1 spec, we're being very thoughtful about it. You can expect to see a version that addresses both of these concerns in the next week or so.

      • Tibor Jakab commented  · 

        Tried accessKey as query parameter and got this response:
        {
        "code": "InvalidCredentials"
        "message": "must provide valid X-IS-AccessKey header"
        }

        I set the header and used this uri:
        https://groker.initialstate.com/api/events?bucketKey=Test

        With this the response was:
        "X-IS-BucketKey header or bucketKey parameter required"

        If GET is not supported this idea is not yet completed.

      Feedback and Knowledge Base