DataCloud Management Topics

Other Resources

Community
Contact Support

Other Help Sets

Home
Data Integrator Migration
DataFlow
DataConnect

Preferences





Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Table of Contents
maxLevel1

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.

Code Block
titleURL
languagetext
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

Expand

Request

Code Block
languagetext
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

Code Block
titleHeader
languagetext
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
Code Block
titleapplication/xml
languagexml
<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>
Code Block
titleapplication/json
languagetext
{"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"
}}
Code Block
titletext/xml
languagexml
<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.

Code Block
titleURL
languagetext
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.)
usernameStringUser 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

Expand

Request by ID

Code Block
languagetext
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

Code Block
languagetext
GET https://datacloud2.pervasive.com/EntityAPIService/REST/user/testuser?s=49bfe32d-df30-4797-a8b1-96da5c1b5609 HTTP/1.1
Host: datacloud2.pervasive.com

Response

Code Block
titleHeader
languagetext
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
Code Block
titleapplication/xml
languagexml
<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>
Code Block
titleapplication/json
languagetext
{
    "@id": "171",
    "account": "2708",
    "active": "true",
    "administrator": "true",
    "deleted": "false",
    "lastmodifieddate": "-1909755168",
    "name": "testuser",
    "parameters": {
		"parameter":    {
       		"@secure": "true",
       		"@key": "key"
    }},
    "superUser": "false",
    "temporarypassword": "false"
}
Code Block
titletext/xml
languagexml
<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.

Code Block
titleURL
languagetext
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

Expand

Request

Code Block
languagetext
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
Code Block
titleBody
languagexml
<User id="171">
    <name>testuser</name>
    <parameters>
        <parameter key="membership.company">Testing</parameter>
        <parameter key="membership.firstname">Test</parameter>
        <parameter key="awsSecretKey">9jY7cT605V4R3vdWJb3Ra+XbVXLwi7fYzum4fxKa</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="awsAccessKey">AKIAIGM4XXTMW3BYABPA</parameter>
        <parameter key="mykey">myValue</parameter>
    </parameters>
</User>

Response

Code Block
titleHeader
languagetext
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.

Code Block
titleURL
languagetext
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

Expand

Request

Code Block
languagetext
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
Code Block
titleBody
languagexml
<?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

Code Block
titleHeader
languagetext
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