Skip to main content
Version: v5.0

IafNsProvider

Use the IafNsProvider API to manage namespace providers and their namespaces and resources on the platform.

addResourceByUserType#

Adds a resource with a userType you pass to a namespace provider.

ParameterRequiredTypeDescription
nsProviderYesObjectPass a UserGroup object.
resourceYesObjectPass a Project object.
updateFuncYesFunctionPass a JavaScript callback function with nsProvider and ctx as the parameters.
ctxNoCtxContext, such as namespaces and authentication token information.
Returns

UserGroup -

addResourceHelper#

A helper function that links a namespace provider to resources. The userType is added as a property to the namespace provider's "_userAttributes" property and its value is the resource's id.

ParameterRequiredTypeDescription
nsProviderYesObjectPass a UserGroup object.
resourceYesObjectPass a Project object.
propertyNameYesStringPass a user type name. The user type is added as a property to the namespace provider's "_userAttributes" property and its value is the resource's id.
updateFuncYesFunctionPass a JavaScript callback function with nsProvider and ctx as the parameters.
ctxNoCtxContext, such as namespaces and authentication token information.
Returns

UserGroup -

getResourcesByUserType#

Gets resources, such as a project's Workspace or UserGroup, in a namespace provider that match the userType you pass.

ParameterRequiredTypeDescription
nsProviderYesObjectPass a UserGroup or Project object.
userTypeYesStringPass a user type for a project Workspace or UserGroup.
ctxNoCtxContext, such as namespaces and authentication token information.
Returns

Object - Returns a UserGroup or Project object that matches the user type you pass.

purgeNamespaceContents#

Purges a namespace's contents.

ParameterRequiredTypeDescription
nsProviderYesObjectPass a Project object.
ctxNoCtxContext, such as namespaces and authentication token information.
Returns

Void -

removeResourceByUserType#

Removes a resource with the userType you pass from a namespace provider.

ParameterRequiredTypeDescription
nsProviderYesObjectPass a UserGroup object.
resourceYesObjectPass a Project object.
updateFuncYesFunctionPass a JavaScript callback function with nsProvider and ctx as the parameters.
ctxNoCtxContext, such as namespaces and authentication token information.
Returns

UserGroup -

removeResourceHelper#

A helper function that removes a project from a name space provider. The user type is added as a property to the namespace provider's "_userAttributes" property and its value is the resource's id.

ParameterRequiredTypeDescription
nsProviderYesObjectPass a UserGroup object.
resourceYesObjectPass a Project object.
propertyNameYesStringPass a user type name. The user type is added as a property to the namespace provider's "_userAttributes" property and its value is the resource's id.
updateFuncYesFunctionPass a JavaScript callback function with nsProvider and ctx as the parameters.
ctxNoCtxContext, such as namespaces and authentication token information.
Returns

UserGroup -