Sign in or 

| Version | User | Scope of changes |
|---|---|---|
| Feb 12 2009, 4:06 PM EST (current) | boe_wetpaint | 12 words added, 13 words deleted |
| Oct 8 2008, 11:47 AM EDT | boe_wetpaint | 7 words added |
| 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 A sentenceThe orpurpose twoneeds describingto thebe generalone themeof orthe purposefollowing ofvalues: thepersonal, namespace.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 | |