Grid objectSets admin API Resource

Object Sets admin API

POST /api/objectset/addobjects

add new object Set

Request Body
media type data type description
application/json ObjectSetContentRequest (JSON) - objectSet data
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with success information

Example

Request
POST /api/objectset/addobjects
Content-Type: application/json
Accept: application/json

                
{
  "userId" : 12345,
  "id" : 12345,
  "objects" : [ { }, { } ]
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{ }
                
              

DELETE /api/objectset/json

delete user object Set

Request Body
media type data type description
application/json HdcSimpleIdTO (JSON) - object with id of object Set
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if operation succeeded

Example

Request
DELETE /api/objectset/json
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{ }
                
              

GET /api/objectset/json

Get all objectSets for session user

Response Body
media type data type description
application/json array of ObjectSetTO (JSON) JSON Response with objectSet data

Example of response:

Example

Request
GET /api/objectset/json
Content-Type: */*
Accept: application/json

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

                
[ {
  "ownerId" : 12345,
  "canEdit" : true,
  "name" : "...",
  "id" : 12345,
  "createdAt" : "...",
  "isShared" : true,
  "ownerFullName" : "...",
  "description" : "...",
  "objects" : [ { }, { } ]
} ]
                
              

POST /api/objectset/json

add new object Set for user

Request Body
media type data type description
application/json SimpleAddObjectSetRequest (JSON) - objectSet data
Response Body
media type data type description
application/json SuccessAddObjectTO (JSON) JSON Response with description of objectSet with unique ID and success information

Example

Request
POST /api/objectset/json
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "currentUserId" : 12345,
  "description" : "...",
  "name" : "...",
  "objects" : [ { }, { } ]
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "success" : true,
  "list" : [ {
    "ownerId" : 12345,
    "canEdit" : true,
    "name" : "...",
    "id" : 12345,
    "createdAt" : "...",
    "isShared" : true,
    "ownerFullName" : "...",
    "description" : "...",
    "objects" : [ { }, { } ]
  }, {
    "ownerId" : 12345,
    "canEdit" : true,
    "name" : "...",
    "id" : 12345,
    "createdAt" : "...",
    "isShared" : true,
    "ownerFullName" : "...",
    "description" : "...",
    "objects" : [ { }, { } ]
  } ]
}
                
              

PUT /api/objectset/json

update object Set for user

Request Body
media type data type description
application/json SimpleUpdateObjectSetRequest (JSON) - objectSet data
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with success information

Example

Request
PUT /api/objectset/json
Content-Type: application/json
Accept: application/json

                
{
  "description" : "...",
  "name" : "...",
  "id" : 12345,
  "currentUserId" : 12345
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{ }
                
              

DELETE /api/objectset/removeobjects

delete objects from object Set

Request Body
media type data type description
application/json ObjectSetContentRequest (JSON) - objectSet data
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if operation succeeded

Example

Request
DELETE /api/objectset/removeobjects
Content-Type: application/json
Accept: application/json

                
{
  "userId" : 12345,
  "id" : 12345,
  "objects" : [ { }, { } ]
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{ }
                
              

GET /api/admin/objectset/json

Get all objectSets

Response Body
media type data type description
application/json array of ObjectSetTO (JSON) JSON Response with objectSet data

Example of response:

Example

Request
GET /api/admin/objectset/json
Content-Type: */*
Accept: application/json

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

                
[ {
  "ownerId" : 12345,
  "canEdit" : true,
  "name" : "...",
  "id" : 12345,
  "createdAt" : "...",
  "isShared" : true,
  "ownerFullName" : "...",
  "description" : "...",
  "objects" : [ { }, { } ]
} ]
                
              

POST /api/admin/objectset/json

add new object Set for user

Request Body
media type data type description
application/json SimpleAddObjectSetRequest (JSON) - objectSet data
Response Body
media type data type description
application/json SuccessAddObjectTO (JSON) JSON Response with object set data with Identifier and success information

Example

Request
POST /api/admin/objectset/json
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "currentUserId" : 12345,
  "description" : "...",
  "name" : "...",
  "objects" : [ { }, { } ]
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "success" : true,
  "list" : [ {
    "ownerId" : 12345,
    "canEdit" : true,
    "name" : "...",
    "id" : 12345,
    "createdAt" : "...",
    "isShared" : true,
    "ownerFullName" : "...",
    "description" : "...",
    "objects" : [ { }, { } ]
  }, {
    "ownerId" : 12345,
    "canEdit" : true,
    "name" : "...",
    "id" : 12345,
    "createdAt" : "...",
    "isShared" : true,
    "ownerFullName" : "...",
    "description" : "...",
    "objects" : [ { }, { } ]
  } ]
}
                
              

PUT /api/admin/objectset/json

update object Set for user

Request Body
media type data type description
application/json SimpleUpdateObjectSetRequest (JSON) - objectSet data
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with success information

Example

Request
PUT /api/admin/objectset/json
Content-Type: application/json
Accept: application/json

                
{
  "description" : "...",
  "name" : "...",
  "id" : 12345,
  "currentUserId" : 12345
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{ }
                
              

POST /api/objectset/assign/{osId}

Assign user to object set

Request Parameters
name type description constraints
osId path Id of object set long
Request Body
media type data type
application/json string (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if operation succeeded

Example

Request
POST /api/objectset/assign/{osId}
Content-Type: application/json
Accept: application/json

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

                
{ }
                
              

GET /api/objectset/json/{objectSetId}

Get user object Set

Request Parameters
name type description constraints
objectSetId path - id of object Set long
Response Body
media type data type description
application/json ObjectSetContent (JSON) JSON Response with objectSet data

Example

Request
GET /api/objectset/json/{objectSetId}
Content-Type: */*
Accept: application/json

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

                
{
  "unavailableObjects" : 12345,
  "list" : [ { }, { } ],
  "name" : "...",
  "id" : 12345
}
                
              

GET /api/objectset/members/{objectSetId}

Get list of object set members (users or groups)

Request Parameters
name type description constraints
objectSetId path long
mode query  
Response Body
media type data type description
application/json object (JSON) JSON with list of groups

Example of response:

{"list":[{"id":"x","description":"Members of Tessel Crew group","name":"Tessel Crew"},{"id":"y","description":"aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll ","name":"Group B"}]} or JSON with list of users

Example of response:

{"list":[{"id":1,"name":"admin","userFullName":"Admin","description":"","enabled":true,"email":"","loginCount":1840,"lastLoginDate":"2013-09-26T10:18:36.199072+02:00"},{"id":2,"name":"user1","userFullName":"User 1","description":"","enabled":true,"email":"","loginCount":784,"lastLoginDate":"2013-09-25T13:16:12.990218+02:00"}]}

Example

Request
GET /api/objectset/members/{objectSetId}
Content-Type: */*
Accept: application/json

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

                
...
                
              

POST /api/objectset/unassign/{osId}

Unassign user to object set

Request Parameters
name type description constraints
osId path Id of object set long
Request Body
media type data type
application/json string (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if operation succeeded

Example

Request
POST /api/objectset/unassign/{osId}
Content-Type: application/json
Accept: application/json

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

                
{ }
                
              

POST /api/admin/objectset/assign/{osId}

Assign user to object set

Request Parameters
name type description constraints
osId path Id of object set long
Request Body
media type data type
application/json string (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if operation succeeded

Example

Request
POST /api/admin/objectset/assign/{osId}
Content-Type: application/json
Accept: application/json

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

                
{ }
                
              

DELETE /api/admin/objectset/json/{objectSetId}

delete user object Set

Request Parameters
name type description constraints
objectSetId path - id of object Set long
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if operation succeeded

Example

Request
DELETE /api/admin/objectset/json/{objectSetId}
Content-Type: */*
Accept: application/json

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

                
{ }
                
              

GET /api/admin/objectset/json/{objectSetId}

Get user object Set

Request Parameters
name type description constraints
objectSetId path - id of object Set long
Response Body
media type data type description
application/json ObjectSetContent (JSON) JSON Response with objectSet data

Example

Request
GET /api/admin/objectset/json/{objectSetId}
Content-Type: */*
Accept: application/json

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

                
{
  "unavailableObjects" : 12345,
  "list" : [ { }, { } ],
  "name" : "...",
  "id" : 12345
}
                
              

GET /api/admin/objectset/members/{objectSetId}

Get list of object set members (users or groups)

Request Parameters
name type description constraints
objectSetId path long
mode query  
Response Body
media type data type description
application/json object (JSON) JSON with list of groups

Example of response:

{"list":[{"id":"x","description":"Members of Tessel Crew group","name":"Tessel Crew"},{"id":"y","description":"aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll ","name":"Group B"}]} or JSON with list of users

Example of response:

{"list":[{"id":1,"name":"admin","userFullName":"Admin","description":"","enabled":true,"email":"","loginCount":1840,"lastLoginDate":"2013-09-26T10:18:36.199072+02:00"},{"id":2,"name":"user1","userFullName":"User 1","description":"","enabled":true,"email":"","loginCount":784,"lastLoginDate":"2013-09-25T13:16:12.990218+02:00"}]}

Example

Request
GET /api/admin/objectset/members/{objectSetId}
Content-Type: */*
Accept: application/json

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

                
...
                
              

DELETE /api/admin/objectset/removeobjects/{objectSetId}

delete objects from object Set

Request Parameters
name type description constraints
objectSetId path - id of object Set long
Request Body
media type data type description
application/json array of array of number (JSON) - objectSet data
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if operation succeeded

Example

Request
DELETE /api/admin/objectset/removeobjects/{objectSetId}
Content-Type: application/json
Accept: application/json

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

                
{ }
                
              

POST /api/admin/objectset/unassign/{osId}

Unassign user to object set

Request Parameters
name type description constraints
osId path Id of object set long
Request Body
media type data type
application/json string (JSON)
Response Body
media type data type description
application/json HdcSuccessTO (JSON) JSON Response with information if operation succeeded

Example

Request
POST /api/admin/objectset/unassign/{osId}
Content-Type: application/json
Accept: application/json

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

                
{ }