There are lots of new changes in the pipeline but a few are already live in the system. One of these are useful tweaks to the user management API requested by a good number of people. The updated documentation is available on the docs page – the changes now allow you to:

  • set your own user keys on account creation.
  • refresh user keys via the API that you think might have been compromised
  • get metric usage update information via the API for any account.

So from now on, a normal signup is as before:

  curl -d "provider_key=3scale-5fc9d398ac02318e4e8f212cc1e8cf01d2&user[username]=tester_two&user[email]"

But you can sign up a new user with a given user_key:

   curl -d "provider_key=3scale-5fc9d398ac038e4e8f212cc1e8cf01d2&user[username]=tester_two&user[email]"

and refresh a user key, by passing empty user_key:

   curl -d "_method=put&provider_key=3scale-5fc9d398ac038e4e8f212cc1e8cf01d2&user_key="

You can also now set your own key prefixes (no more 3scale-… in front of your keys) if you like – contact to get this feature enabled for your account.

Lastly to see status information for your users we’ve updated the GET to /buyer/contract.xml method, which now also returns a status object like this:

   <usage metric="hits" period="month">
    <period_start>2009-08-01 00:00:00</period_start>
    <period_end>2009-08-31 23:59:59</period_end>


   <usage metric="hits" period="day">

    <period_start>2009-08-19 00:00:00</period_start>
    <period_end>2009-08-19 23:59:59</period_end>


   <usage metric="hits" period="hour">
    <period_start>2009-08-19 22:00:00</period_start>
    <period_end>2009-08-19 22:59:59</period_end>


This makes it possible to display usage information to users you’ve signed up via API. Look out for more changes coming up!