UserResource

The User resource provides access to user details and preferences in InService.

Data Model Objects

  • WTUser

The following resources are applicable:

GET /user

Gets the current user'';s data.

Request Parameters

name type description default
$expand query The OData expand clause used to expand related objects and collections.

To expand the preferences collection when requesting the user use: $expand=preferences. The preferences will be available at scItem.objects.preferences.metadata.

To expand the properties collection when requesting the user use: $expand=properties. The properties will be available at scItem.objects.properties.metadata.

To expand bookmarks collection when requesting the user use: $expand=bookmarks. Bookmarks will be available at scItem.collections.bookmarks.

To expand user privileges collection when requesting the user use: $expand=userPrivileges. User privileges will be available at scItem.collections.userPrivileges.

User privileges includes a list of privileges the current session user is granted from the following privileges list:

  • CreateNotes
  • ShareNotes
  • ViewNotes
  • ViewAllFeedback

The following privileges are not included in the list as they are handled through a delegate: ORDER_SUBMITTER and ACCESS_PRICING_AVAILABILITY

The following named attributes are available on the user.

  • uid - user's authentication name
  • fullName - user's fully formatted name
  • prefix - user's name prefix
  • first - user's first name
  • middle - user's middle name
  • last - user's last name
  • suffix - user's name suffix
  • eMail - user's office email address
  • telephoneNumber - user's office telephone number
  • mobilePhoneNumber - user's mobile telephone number
  • organizationName - user's organization name
n/a

Response Codes

code condition
404 when unable to find the user data

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)

GET /user/external/{searchString}

Gets users from external Ldap.

Request Parameters

name type description default
searchString path String to match with the user names. n/a
$top query int the number of records to be fetched. n/a

Response Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)

GET /user/all

Gets user data of all the users.

Request Parameters

name type description default
$expand query The OData expand clause used to expand related objects and collections. n/a
$filter query -- Reserved for future use. -- n/a
$orderby query the ordering of user items when expanding items n/a
$skip query the number of user items to skip for paging when expanding items n/a
$top query the number of user items to return in a page when expanding items n/a

Response Codes

code condition
404 when unable to find the user data

Response Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)

GET /user/{userId}

Gets user data for the given userId.

Request Parameters

name type description default
userId path n/a

Response Codes

code condition
404 when unable to find the user data

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)

GET /user/{userId}/privileges

Retrieves the privileges for the given user.

Request Parameters

name type description default
userId path n/a

Response Codes

code condition
200 Returned if request was successfully executed.
500 Returned if request was NOT successfully executed.
404 Returned if requested user does not exist.

Response Body

media type data type
application/vnd.ptc.sc+json object (JSON)

POST /user/{userName}

Adds a given user to Service Centre.

Request Parameters

name type description default
userName path a String representing the unique user id in external Ldap n/a

Response Codes

code condition
400 returned when an invalid user id is provided
404 when unable to find the user data
500 if there is no external Ldap configured.

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)

PUT /user

Updates a given user.

-- By default this is not implemented in InService. --

Request Body

media type data type description
application/vnd.ptc.sc+json SCItem (JSON) an SCItem representing the user with modified values

Response Codes

code condition
400 returned when an invalid user object is provided
404 when unable to find the user data
501 if the backend will not support update of a user object

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)

PUT /user/{userId}/sync

Sync the given user with LDAP.

Request Parameters

name type description default
userId path id of the user to sync from LDAP n/a

Response Codes

code condition
400 returned when an invalid user object is provided
404 when unable to find the user data
501 if the backend will not support update of a user object

Response Body

media type data type
application/vnd.ptc.sc+json object (JSON)

GET /user/preferences

Gets a list of user preferences.

Response Codes

code condition
404 if no user preferences are found

Response Body

media type data type
application/vnd.ptc.sc+json array of object (JSON)

PUT /user/preferences

Updates a list of user preferences.

Request Body

media type data type description
application/vnd.ptc.sc+json array of object (JSON) the SCValueList of user preferences to be updated

Response Codes

code condition
400 if no preferences are provided for update
403 when attempting to update preferences without required permissions
404 if a requested preference does not exist

Response Body

media type data type
application/vnd.ptc.sc+json array of object (JSON)

GET /user/preferences/{prefName}

Gets a single user preference.

Request Parameters

name type description default
prefName path the Windchill preference key n/a

Response Codes

code condition
404 if the preference is not found
403 when attempting to fetch preferences without required permissions

Response Body

media type data type
application/vnd.ptc.sc+json SCValue (JSON)

PUT /user/preferences/{prefName}

Updates a single user preference.

Request Parameters

name type description default
prefName path the Windchill preference key n/a

Request Body

media type data type description
application/vnd.ptc.sc+json SCValue (JSON) the SCValue representing the preference value

Response Codes

code condition
400 returned if the preference object provided does not have a value, its key does not match the preference on the resource URL, or if the value provided is an integer that exceeds the range constraint
403 when attempting to update a preference that is locked
404 if the preference does not exist

Response Body

media type data type
application/vnd.ptc.sc+json SCValue (JSON)

GET /user/helplink

Gets the link to the InService help documentation.

Response Body

media type data type
application/vnd.ptc.sc+json SCLink (JSON)

POST /user/preferences/options

Returns the map of the user preferences with all user preferred options.

Request Body

media type data type
application/vnd.ptc.sc+json SCArray (JSON)

Response Body

media type data type
application/vnd.ptc.sc+json object (JSON)

DELETE /user/{userName}

Remove a Give User from InService

Request Parameters

name type description default
userName path a String representing the unique userId in InService n/a

Response Codes

code condition
400 returned when an invalid user Id is provided
404 when unable to find user data

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)

DELETE /user/{userName}/deprovision

Deprovision a Give User from InService

Request Parameters

name type description default
userName path a String representing the unique userId in InService n/a

Response Codes

code condition
400 returned when an invalid user Id is provided
404 when unable to find user data

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)

POST /user

Adds a given user to ServiceCenter.

Request Body

media type data type description
application/vnd.ptc.sc+json SCItem (JSON) a SCItem representing the unique user in service Center

Response Codes

code condition
400 returned when an invalid user id is provided
404 when unable to find the user data
500 if there is no external Ldap configured.

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)

GET /user/dealerships

Get details for all affiliated dealers for the session user.

Response Codes

code condition
200 Returned if dealers are successfully retrieved..
500 Returned if dealers are NOT successfully retrieved.

Response Body

media type data type
application/vnd.ptc.sc+json object (JSON)

GET /user/dealership/admin

Get the details of dealership for which session user is administrator.

Response Codes

code condition
200 Returned if dealers are successfully retrieved..
500 Returned if dealers are NOT successfully retrieved.

Response Body

media type data type
application/vnd.ptc.sc+json object (JSON)

GET /user/hasAccess/{object_type}/{permisssion}

Service to evaluate users access over an object specified by its type.

Request Parameters

name type description default
object_type path Object type on which access permissions are to be evaluated. n/a
permisssion path Access permission to be checked against an object for user. n/a

Response Body

media type data type
application/vnd.ptc.sc+json object (JSON)

GET /user/external

Gets users from external Ldap.The uid is being passed as QueryParam.

Request Parameters

name type description default
$top query n/a
uid query String to match with the user names. n/a

Response Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)

GET /user/isAdmin

Check if current user is administrator.

Response Codes

code condition
403 Returned when system type is not disconnected

Response Body

media type data type
application/vnd.ptc.sc+json object (JSON)

PUT /user/{userId}

Update a user

Request Parameters

name type description default
userId path String to match with the user names n/a

Request Body

media type data type description
application/vnd.ptc.sc+json SCItem (JSON) contains profile details which need to be updated

Response Codes

code condition
200 Returned if user is successfully updated.
500 Returned if user is NOT successfully updated.

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)

GET /user/{userId}/isNonSGUser

Check if user is service group or non-service group user.

Request Parameters

name type description default
userId path String to match with the user names n/a

Response Codes

code condition
200 Returned if boolean value is successfully retrieved.
500 Returned if user is NOT successfully updated.

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)

GET /user/getOwnedDealers

To get List of SCDealership to which the session user is an administrator.

Response Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)

PUT /user/updatePassword

Rest point to change/update session users password without validating it with any password reg ex pattern.

Request Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)

Response Codes

code condition
204 Returned if password was successfully changed.
403 Returned when system type is not disconnected
406 Returned when new supplied password doesn't pass validation

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)