Announcement: Change of OpenSocial ID Prefix – Migration plan

Posted on by

In order to simplify the communication between app backends and our OpenSocial API and to fix the issue of user migration between studiVZ and meinVZ we are planning to reduce the amount of possible endpoints by one.

Therefore, we will change the OpenSocial User ID Prefixes as follows:

  • www.studivz.net:abcdefg → www.vz.net:abcdefg
  • www.meinvz.net:abcdefg → www.vz.net:abcdefg
  • www.schuelervz.net:abcdefg → www.schuelervz.net:abcdefg
  • sandbox.developer.studivz.net:abcdefg → sandbox.developer.studivz.net:abcdefg

The ID suffix will not change!

We won’t change the hostnames of the different endpoints, but if you have an www.vz.net id it won’t matter if you request the meinVZ or studiVZ endpoint. This means, that the following endpoints are
available:

  • http://meinvz.gadgets.apivz.net/social/rest or http://studivz.gadgets.apivz.net/social/rest
  • http://schuelervz.gadgets.apivz.net/social/rest
  • http://sandbox.gadgets.apivz.net/social/rest
  • http://meinvz.gadgets.apivz.net/social/rpc or http://studivz.gadgets.apivz.net/social/rpc
  • http://schuelervz.gadgets.apivz.net/social/rpc
  • http://sandbox.gadgets.apivz.net/social/rpc

Our migration plan has two steps:

April, 13th – May, 18th:
While we still send the old OpenSocial Ids in our requests to your backend an in our API responses, our REST and RPC API will accept both old and new Ids as request parameters. In this timeframe you have to change your backend, to replace the old prefix with the new prefix in all our requests and responses (see example code below) and only store the new ids in your database.

May, 18th:
We will start sending out the new ids in our requests to your backend in in our API responses. Your backend should be ready for this after phase one, because while the replace logic is still applied to every request and response, it won’t find any matches. You can now remove this replace logic from your backend if you want.

Example source code for replacement logic:

When your backend receives request from the gadget (makeRequest):

$viewerId = str_replace('www.studivz.net', 'www.vz.net', $_GET['opensocial_viewer_id']);
$viewerId = str_replace('www.meinvz.net', 'www.vz.net', $_GET['opensocial_viewer_id']);
$ownerId = str_replace('www.studivz.net', 'www.vz.net', $_GET['opensocial_owner_id']);
$ownerId = str_replace('www.meinvz.net', 'www.vz.net', $_GET['opensocial_owner_id']);

When your backend receives a response from our REST or RPC API (example for receiving a list of users):

foreach ($decodedResponse['entry'] as $id => $user) {
$decodedResponse['entry'][$id]['id'] = str_replace('www.studivz.net', 'www.vz.net', $decodedResponse['entry'][$id]['id'])
$decodedResponse['entry'][$id]['id'] = str_replace('www.meinvz.net', 'www.vz.net', $decodedResponse['entry'][$id]['id'])
}

If you are a developer and have an app live, that has its own backend, you will be contacted in the next days by our support team in order to coordinate your personal migration process.

This entry was posted in Uncategorized by admin. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*