-
Notifications
You must be signed in to change notification settings - Fork 15
Description
We need a Node script that I can run to move content from the current groups API (http://api.topcoder-dev.com/v3/groups) to a new groups API configuration.
General requirements
- We don't want to lose any data, so if anything doesn't "match", we need to alert the caller and throw an error.
- The endpoints for both the current groups API and the new groups API should be configurable. I'll be deploying this on Heroku for our own integration at some point in the future, and I'll want to migrate data from dev to this new Heroku instance.
- To make things easier, it's alright to expect the caller to pass in an authentication token for use with the old API.
Member data should also be moved: http://api.topcoder-dev.com/v3/groups/20000000/members
For testing, you can login on dev with tonyj / appirio123
New functionality
The current groups ID in the old API is an int. We'd like to use UUIDs for the new groups API. Let's update the new groups API to support UUIDs for new data, with an optional mapping to the old ID. So, we'd potentially have two IDs for migrated data - an old ID and a new ID. Any new data that isn't migrated will only have the new ID.
Script
Here's a Ruby script that logs in, converts the token, and outputs the full list of groups.
Use either tonyj
or tcwebservice
with password appirio123