Skip to main content
NICE CXone Expert

We will be closed on Thursday November 28th & Friday November 29th due to the Thanksgiving Holiday

Expert Success Center

users/{userid}/properties/{key}/info (GET)

Overview

Retrieve the metadata about a user property

  • REST Method: GET
  • Method Access: public

Uri Parameters

Name Type Description
key string A unique identifier for a property that is obtained through GET:users/{userid}/properties
userid string either an integer user ID, "current", or "=" followed by a double uri-encoded user name

Query Parameters

Name Type Description
authenticate bool? Force authentication for request (default: false)
redirects int? If zero, do not follow page redirects.
contentcutoff int? Only show property content shorter than this number of bytes. Default: 2048

Return Codes

Name Value Description
OK 200 The request completed successfully
Bad Request 400 Invalid input parameter or request body
Forbidden 403 ADMIN access is required to access other user's properties
Not Found 404 Requested user and/or property could not be found

Message Format

Response is the standard property XML

<property name="{text}" href="{uri}" etag="{text}">
  <contents type="{text}" href="{uri}">{text}</contents>
  <date.modified>{date}</date.modified>
  <user.modified id="{int}" href="{uri}">
    <nick>{text}</nick>
    <username>{text}</username>
  </user.modified>
  <change-description>{text}</change-description>
</property>

Implementation Notes

  • The response XML will contain the contents text only for text based mimetypes with values less than 2048 chars in length. Otherwise the contents is available at the URI pointed to by property/contents/@href.

C# Code Sample: Retrieve Metadata of a User Property

The following code authenticates and retrieves information about a user property named 'foo' .

Sample Code

Plug p = Plug.New("http://devwiki/@api/deki"); 
p.At("users", "authenticate")
 .WithCredentials("sysop", "password").Get(); 
XDoc ret = p.At("users", "current", "properties", "foo", "info")
 .Get().AsDocument();

Sample Response from executing Code

<property name="foo" href="http://devwiki/@api/deki/users/1/properties/foo/info" etag="4463.r1_ts2009-03-20T22:48:15Z">
  <contents type="text/plain; charset=utf-8" href="http://devwiki/@api/deki/users/1/properties/foo">My Value</contents>
  <date.modified>2009-03-20T22:48:15Z</date.modified>
  <user.modified id="1" href="http://devwiki/@api/deki/users/1">
    <nick>Sysop</nick>
    <username>Sysop</username>
  </user.modified>
  <change-description>initial value</change-description>
</property>

Curl Code Sample: Retrieve Metadata of a User Property

The following command retrieves information about property "foo" associated to user "bar":

Sample Code

curl -u admin:password -i http://mindtouch.address/@api/deki/users/properties/foo/info

Sample Response from executing Code

Example of retrieving the metadata of the user property listed here:

Content-Type: application/xml

<property name="foo" href="http://192.168.59.128/@api/deki/users/88/properties/foo/info" etag="116.r1_ts2010-02-02T22:47:40Z">
  <contents type="text/plain" size="3" href="http://192.168.59.128/@api/deki/users/88/properties/foo">bar</contents>
  <date.modified>2010-02-02T22:47:40Z</date.modified>
  <user.modified id="1" href="http://192.168.59.128/@api/deki/users/1">
    <nick>Admin</nick>
    <username>Admin</username>
    <email hidden="true"/>
    <hash.email>64e1b8d34f425d19e1ee2ea7236d3028</hash.email>
    <uri.gravatar>http://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028</uri.gravatar>
  </user.modified>
  <change-description/>
</property>

Implementation notes 

curl flags

-u
Provides external user authentication.
-i
Outputs the HTTP response headers. Useful for debugging.

Permissions

ADMIN permission is required to execute above command unless an authenticated user performs the request on themselves.

User Properties

To view a list of a user's properties, follow the instructions here.

 

  • Was this article helpful?