Sign in or 

| HTTP Method | Returns | |
| POST |
| |
Overview: To allow the creation and maintenance of multiple namespaces, we have introduced two changes to our server API. First, we have added a new API call to programmatically create namespaces associated with a developer key. Second, we have modified the user role change API call to allow the association of your users with new namespaces. Once one of your users has been logged in via the UserService.login API call, their ticket may be used to give them access to all namespaces associated with your developer key. It is not necessary or desirable to log them in individually to each namespace. However, your users do not automatically have a role on all your namespaces. It is necessary to grant your usersspecific roles on each namespace for which you would like to grant them access. The preferred mechanism for doing this is the UserService.changeRole API. NAMESPACE CREATIONThis API call creates a new content namespace. The primary argument to this call is a namespaceId. Injected will incorporate this identifier into the resulting namespace; however to guarantee uniqueness, the namespace will likely differ from your identifier. You should parse the response from this call to determine the actual namespace to use in future calls. The createNamespace call requires a developer signature, similar to the UserService calls. Whereas the signature for the UserService calls includes the userId of the user in question, the createNamespace call includes the namespaceId, as included in the namespace.namespaceId parameter. ROLE CHANGEWhen you log in users to Injected using the UserService.login API call, you grant them access to a particular namespace (as specified by the ns and user.role parameters). By default, users will not have a role on any namespaces other than the one specified in this API call. Any calls to these namespaces using their ticket will result in an INVALID_ROLE failure.The role change API call has been updated to allow you to grant your users access to newly created namespaces. Simply call the role change API to specify the desired role in the new namespace. | ||
| Common Parameters plus... Required Parameters: namespace.namespaceId Identifier to be used for the new namespace. The actual resulting namespace will differ from this. namespace.displayName The display name to be used for the new namespace. namespace.url The URL for the namespace. Example: http://MyInjectedSite.com namespace.timezone The timezone for the namespace. Timezone values are those from the tz database, http://home.tiscali.nl/~t876506/TZworld.html#nam namespace.category The category needs to be one of the following values: arts, auto, business, education, entertainment, family, games, healthFitness, hobbies, lifestyles, music, organizations, people, politics, photosVideos, shopping, sportsRecreation, technology, teen, travel, other namespace.purpose The purpose needs to be one of the following values: personal, business.cred.ts The current time, expressed as the number of seconds since January 1, 1970 12:00 am GMT. This must be within five minutes of Wetpaint server time. cred.sig Developer credential signature. This is calculated as the HMAC-SHA-1 hash of the developer key (the key parameter), the namespace ID (the namespace.namespaceId parameter, described above), and the current timestamp (the cred.ts parameter). The key used by the HMAC-SHA-1 algorithm should be the developer secret. output=api Inform the service that you would like an XML response. | ||
Example Request ( required parameters in red ):http://wapi.wetpaint.com/NamespaceService/createNamespace.do | Example Response | |
|
boe_wetpaint |
Latest page update: made by boe_wetpaint
, Feb 12 2009, 4:06 PM EST
(about this update
About This Update
12 words added 13 words deleted view changes - complete history) |
|
Keyword tags:
None
More Info: links to this page
|
| Started By | Thread Subject | Replies | Last Post | ||
|---|---|---|---|---|---|
| msndev | error message VALIDATION invalid value supplied for namespace.purpose | 1 | Feb 12 2009, 4:07 PM EST by boe_wetpaint | ||
|
Thread started: Feb 11 2009, 5:08 PM EST
Watch
Hi Boe,
I called this method with the following params: .... "&namespace.timezone=America/Los_Angeles" + "&namespace.category=entertainment" + "&namespace.purpose=test"; And I got back "invalid value supplied for namespace.purpose". Is there some minimum length requirments which causes the error? Thanks. |
|||||