User Profiles Resource

Endpoints under /user allow administrators to manage user profiles, represented by the User object. The caller must have a roles that includes an Administrator access level to create, update, or delete user profiles.
User objects are uniquely identified by a key, assigned on creation. Requests to a {key} endpoint under /user address a specific User object.

GET /v2/user

A GET request to the /user endpoint retrieves a list of all Waterline Data users.

Response Body
media type data type description
application/json array of User (JSON) An array of User objects, in JSON format.

Example

Request
GET /v2/user
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "prefiltersEnabled" : true,
  "assignedByMap" : { },
  "accessLevels" : [ "...", "..." ],
  "attributes" : {
    "property1" : { },
    "property2" : { }
  },
  "roles" : [ "...", "..." ],
  "admin" : true,
  "name" : "...",
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
} ]
                
              

POST /v2/user

A POST request to the /user endpoint creates a new Waterline Data user profile.

Request Body
media type data type description
application/json User (JSON) A JSON object containing the new user profile information, specifying at least a name value.
Response Body
media type data type description
application/json User (JSON) The new User object in JSON format, containing the assigned unique identifying key value.

Example

Request
POST /v2/user
Content-Type: application/json
Accept: application/json

                
{
  "prefiltersEnabled" : true,
  "assignedByMap" : { },
  "accessLevels" : [ "...", "..." ],
  "attributes" : {
    "property1" : { },
    "property2" : { }
  },
  "roles" : [ "...", "..." ],
  "admin" : true,
  "name" : "...",
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "prefiltersEnabled" : true,
  "assignedByMap" : { },
  "accessLevels" : [ "...", "..." ],
  "attributes" : {
    "property1" : { },
    "property2" : { }
  },
  "roles" : [ "...", "..." ],
  "admin" : true,
  "name" : "...",
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              

GET /v2/user/_me

A GET request to the /user/_me endpoint returns the User object for the current user.

Response Body
media type data type description
application/json User (JSON) A User object in JSON format.

Example

Request
GET /v2/user/_me
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "prefiltersEnabled" : true,
  "assignedByMap" : { },
  "accessLevels" : [ "...", "..." ],
  "attributes" : {
    "property1" : { },
    "property2" : { }
  },
  "roles" : [ "...", "..." ],
  "admin" : true,
  "name" : "...",
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              

PUT /v2/user/_me

A PUT request to the /user/_me endpoint allows user to customize few things. At present, the only thing supported through this api is prefiltersEnabled returns http code 204 on success with empty response.

Request Body
media type data type
application/json map of string (JSON)
Response Body
media type data type description
application/json User (JSON)

Example

Request
PUT /v2/user/_me
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "prefiltersEnabled" : true,
  "assignedByMap" : { },
  "accessLevels" : [ "...", "..." ],
  "attributes" : {
    "property1" : { },
    "property2" : { }
  },
  "roles" : [ "...", "..." ],
  "admin" : true,
  "name" : "...",
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              

DELETE /v2/user/{key}

A DELETE request to the /user/{key} endpoint removes an existing user profile.

Request Parameters
name type description
key path The unique identifier of a user profile, assigned on creation.

Example

Request
DELETE /v2/user/{key}
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content

              

GET /v2/user/{key}

A GET request to the /user/{key} endpoint retrieves a specific user profile.

Request Parameters
name type description
key path The unique identifier of a user profile, as assigned when the profile is created.
Response Body
media type data type description
application/json User (JSON)

Example

Request
GET /v2/user/{key}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "prefiltersEnabled" : true,
  "assignedByMap" : { },
  "accessLevels" : [ "...", "..." ],
  "attributes" : {
    "property1" : { },
    "property2" : { }
  },
  "roles" : [ "...", "..." ],
  "admin" : true,
  "name" : "...",
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              

PUT /v2/user/{key}

A PUT request to the /user/{key} endpoint updates an existing user profile.

Request Parameters
name type description
key path The unique identifier of a user profile, assigned on creation.
Request Body
media type data type description
application/json User (JSON) A JSON object containing the new user profile properties and values. Properties that are not present are not changed.
Response Body
media type data type description
application/json User (JSON) The updated User object in JSON format.

Example

Request
PUT /v2/user/{key}
Content-Type: application/json
Accept: application/json

                
{
  "prefiltersEnabled" : true,
  "assignedByMap" : { },
  "accessLevels" : [ "...", "..." ],
  "attributes" : {
    "property1" : { },
    "property2" : { }
  },
  "roles" : [ "...", "..." ],
  "admin" : true,
  "name" : "...",
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "prefiltersEnabled" : true,
  "assignedByMap" : { },
  "accessLevels" : [ "...", "..." ],
  "attributes" : {
    "property1" : { },
    "property2" : { }
  },
  "roles" : [ "...", "..." ],
  "admin" : true,
  "name" : "...",
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              

POST /v2/user/assign/role

A POST request to the /user/assign/role endpoint updates a user role assignment.

Request Body
media type data type description
application/json map of string (JSON) A JSON map associating one or more Role objects with a user profile. The map has the form: {"userName" : "USER", "roleName" : "ROLE"} where USER and ROLE are the actual values for user profile and the role being assigned.
Response Body
media type data type description
application/json User (JSON) The updated User object in JSON format.

Example

Request
POST /v2/user/assign/role
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "prefiltersEnabled" : true,
  "assignedByMap" : { },
  "accessLevels" : [ "...", "..." ],
  "attributes" : {
    "property1" : { },
    "property2" : { }
  },
  "roles" : [ "...", "..." ],
  "admin" : true,
  "name" : "...",
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              

GET /v2/user/list/roles

A GET request to the /user/{key}/roles endpoint retrieves a current user profile roles.

Response Body
media type data type description
application/json array of Role (JSON)

Example

Request
GET /v2/user/list/roles
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "metadataAccessOption" : "...",
  "jobTemplateCreationAllowed" : true,
  "virtualFolderKeys" : [ "...", "..." ],
  "name" : "...",
  "domainKeys" : [ "...", "..." ],
  "dataAccessOption" : "...",
  "jobExecutionAllowed" : true,
  "defaultRole" : true,
  "accessLevel" : "Analyst",
  "resourceReadAccessLevel" : "...",
  "dataSourceKeys" : [ "...", "..." ],
  "datasetKeys" : [ "...", "..." ],
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
} ]
                
              

GET /v2/user/name/{username}

A GET request to the /user/name/{byname} endpoint retrieves a user profile by the user name.

Request Parameters
name type description
username path The user profile name.
Response Body
media type data type description
application/json User (JSON) The User object in JSON format.

Example

Request
GET /v2/user/name/{username}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "prefiltersEnabled" : true,
  "assignedByMap" : { },
  "accessLevels" : [ "...", "..." ],
  "attributes" : {
    "property1" : { },
    "property2" : { }
  },
  "roles" : [ "...", "..." ],
  "admin" : true,
  "name" : "...",
  "timeOfLastChange" : 12345,
  "timeOfCreation" : 12345,
  "key" : "...",
  "description" : "...",
  "type" : "...",
  "restricted" : [ "...", "..." ],
  "viewAble" : [ "...", "..." ],
  "updateable" : [ "...", "..." ],
  "richDescription" : "...",
  "score" : 12345.0,
  "customProperties" : [ {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  }, {
    "description" : "...",
    "value" : { },
    "facetAble" : true,
    "name" : "...",
    "type" : "...",
    "displayName" : "..."
  } ]
}
                
              

GET /v2/user/permit/resource

A GET request to the /user/permit/resource endpoint retrieves a list of users and a flag to indicate if the user has access to the specified data resource.

Request Parameters
name type description
dataSourceName query The name of a data source.
resourcePath query The path to a data resource in the specified data source.
Response Body
media type data type description
application/json map of boolean (JSON) A JSON map associating each user name with the Boolean value indicating whether that user has access to the data source.

Example

Request
GET /v2/user/permit/resource
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /v2/user/permit/source

A GET request to the /user/permit/source endpoint retrieves a list of users and a flag to indicate if the user has access to the specified data source.

Request Parameters
name type description
dataSourceName query The name of the data source.
Response Body
media type data type description
application/json map of boolean (JSON) A JSON map associating each user name with the Boolean value indicating whether that user has access to the data source.

Example

Request
GET /v2/user/permit/source
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

POST /v2/user/remove/role

A POST request to the /user/remove/role endpoint removes one or more role assignments. Users cannot be saved without a role, so if you are removing the last role associated with a user, first use /user/assign/role to add the new role before removing the unneeded role or roles.

Request Body
media type data type description
application/json map of string (JSON) A JSON map associating a user profile key with the Role objects to remove.

Example

Request
POST /v2/user/remove/role
Content-Type: application/json

                
...
                
              
Response
HTTP/1.1 201 Created