Was this helpful?
User Resource
The user resource gives you access to view and manipulate the user entity using the CloudRest API.
The following actions are available through the user resource.
List Users
Returns a list of users associated with the current user (always returns a one-item list).
Use the GET method for this action.
URL
https://datacloud2.pervasive.com/EntityAPIService/REST/user?start={start}&max={max}&s={sessionId}
The following response types are available via the optional Accept header in your request:
application/xml (default)
application/json
text/xml
Parameters
 
Name
Type
Description
Required?
start
Integer
0-indexed ordinal of the first record to return.
No.
max
Integer
Maximum number of records to return.
No.
s
String
ID of the active session.
Optional if the sessionId cookie has been set.
Example
Request
GET https://datacloud2.pervasive.com/EntityAPIService/REST/user?max=1&start=0&s=49bfe32d-df30-4797-a8b1-96da5c1b5609
HTTP/1.1
Host: datacloud2.pervasive.com
Response
Header
HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 10 Nov 2011 21:20:02 GMT
Server: Sun GlassFish Enterprise Server v2.1.1
X-Powered-By: Servlet/2.5
Content-Length: 460
Connection: keep-alive
application/xml
<User xmlns:ns2="http://datasolutions.pervasive.com/api/entity">
    <item id="171">
        <account>2708</account>
        <active>true</active>
        <administrator>true</administrator>
        <deleted>false</deleted>
        <lastmodifieddate>-1909755168</lastmodifieddate>
        <name>testuser</name>
        <parameters>
            <parameter secure="true" key="key"/>
        </parameters>
        <superUser>false</superUser>
        <temporarypassword>false</temporarypassword>
    </item>
</User>
application/json
{"item": {
    "@id": "171",
    "account": "2708",
    "active": "true",
    "administrator": "true",
    "deleted": "false",
    "lastmodifieddate": "-1909755168",
    "name": "testuser",
    "parameters": {
        "parameter":    {
            "@secure": "true",
            "@key": "key"
    }},
    "superUser": "false",
    "temporarypassword": "false"
}}
text/xml
<User>
    <item id="171">
    <account>2708</account>
    <active>true</active>
    <administrator>true</administrator>
    <deleted>false</deleted>
    <lastmodifieddate>-1909755168</lastmodifieddate>
    <name>testuser</name>
    <parameters>
        <parameter secure="true" key="key"/>
    </parameters>
    <superUser>false</superUser>
    <temporarypassword>false</temporarypassword>
    </item>
</User>
Find User
Returns details for a user by ID number or user name.
Use the GET method for this action.
URL
https://datacloud2.pervasive.com/EntityAPIService/REST/user/{userid|username}?s={sessionId}
The following response types are available via the optional Accept header in your request:
application/xml (default)
application/json
text/xml
Parameters
 
Name
Type
Description
Required?
userid
Long
ID of the user to return.
Yes. (Either userid or username is required.)
username
String
User name for the user to return.
Yes. (Either userid or username is required.)
s
String
ID of the active session.
Optional if the sessionId cookie has been set.
Example
Request by ID
GET https://datacloud2.pervasive.com/EntityAPIService/REST/user/171?s=49bfe32d-df30-4797-a8b1-96da5c1b5609 HTTP/1.1
Host: datacloud2.pervasive.com
Request by Name
GET https://datacloud2.pervasive.com/EntityAPIService/REST/user/testuser?s=49bfe32d-df30-4797-a8b1-96da5c1b5609 HTTP/1.1
Host: datacloud2.pervasive.com
Response
Header
HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 10 Nov 2011 21:22:49 GMT
Server: Sun GlassFish Enterprise Server v2.1.1
X-Powered-By: Servlet/2.5
Content-Length: 447
Connection: keep-alive
application/xml
<User id="171" xmlns:ns2="http://datasolutions.pervasive.com/api/entity">
    <account>2708</account>
    <active>true</active>
    <administrator>true</administrator>
    <deleted>false</deleted>
    <lastmodifieddate>-1909755168</lastmodifieddate>
    <name>testuser</name>
    <parameters>
        <parameter secure="true" key="key"/>
    </parameters>
    <superUser>false</superUser>
    <temporarypassword>false</temporarypassword>
</User>
application/json
{
    "@id": "171",
    "account": "2708",
    "active": "true",
    "administrator": "true",
    "deleted": "false",
    "lastmodifieddate": "-1909755168",
    "name": "testuser",
    "parameters": {
"parameter":    {
        "@secure": "true",
        "@key": "key"
    }},
    "superUser": "false",
    "temporarypassword": "false"
}
text/xml
<User id="171">
    <account>2708</account>
    <active>true</active>
    <administrator>true</administrator>
    <deleted>false</deleted>
    <lastmodifieddate>-1909755168</lastmodifieddate>
    <name>testuser</name>
    <parameters>
        <parameter secure="true" key="key"/>
    </parameters>
    <superUser>false</superUser>
    <temporarypassword>false</temporarypassword>
</User>
Edit User
Edit the parameters for the currently logged in user.
Use the POST method for this action. Supply the user object with the modified parameters in the body of your request.
URL
https://datacloud2.pervasive.com/EntityAPIService/REST/user?s={sessionId}
Parameters
 
Name
Type
Description
Required?
s
String
ID of the active session.
Optional if the sessionId cookie has been set.
Example
Request
POST https://datacloud2.pervasive.com/EntityAPIService/REST/user?s=49bfe32d-df30-4797-a8b1-96da5c1b5609 HTTP/1.1
Content-Type: application/xml
Host: datacloud2.pervasive.com
Content-Length: 597
Body
<User id="171">
    <name>testuser</name>
    <parameters>
        <parameter key="membership.company">Testing</parameter>
        <parameter key="membership.firstname">Test</parameter>
        <parameter key="membership.email">testing@testing.com</parameter>
        <parameter key="membership.lastname">User</parameter>
        <parameter key="userkey">uservalue</parameter>
        <parameter key="membership.phone">123-456-7890</parameter>
        <parameter key="mykey">myValue</parameter>
    </parameters>
</User>
Response
Header
HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 10 Nov 2011 21:28:05 GMT
Server: Sun GlassFish Enterprise Server v2.1.1
X-Powered-By: Servlet/2.5
Content-Length: 0
Connection: keep-alive
Create User
Create a new user.
Use the POST method for this action. Supply the user object with the modified parameters in the body of your request.
URL
https://datacloud2.pervasive.com/EntityAPIService/REST/user/create?s={sessionId}
Parameters
 
Name
Type
Description
Required?
s
String
ID of the active session.
Optional if the sessionId cookie has been set.
Example
Request
POST https://datacloud2.pervasive.com/EntityAPIService/REST/user/create?s=49bfe32d-df30-4797-a8b1-96da5c1b5609 HTTP/1.1
Content-Type: application/xml
Host: datacloud2.pervasive.com
Content-Length: 404
Body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<User xmlns:ns2="http://datasolutions.pervasive.com/api/entity" lastName="User" firstName="Test" email="testing@testing.com">
    <active>true</active>
    <administrator>false</administrator>
    <deleted>false</deleted>
    <name>testuser</name>
    <namespace/>
    <parameters/>
    <superUser>false</superUser>
    <temporaryPassword>false</temporaryPassword>
</User>
Response
Header
HTTP/1.1 200 OK
Content-Type: application/xml
Date: Thu, 10 Nov 2011 21:28:05 GMT
Server: Sun GlassFish Enterprise Server v2.1.1
X-Powered-By: Servlet/2.5
Content-Length: 0
Connection: keep-alive
Last modified date: 12/17/2021