Method CreateSelection
CreateSelection(String, SelectionContract)
Create custom button selection
Declaration
SelectionContract CreateSelection(string connectionId, SelectionContract selection)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionId | The connection id to identify your connection. See also ConnectionId |
SelectionContract | selection | Custom button selection to create. See also SelectionContract |
Returns
Type | Description |
---|---|
SelectionContract |
Examples
POST http://YourServerName/InfoShare/Json/Common/CreateSelection
Example for create custom button selection.{
"connectionId": "b5cd6bdb-6ae6-4f54-ae4b-d598c40140a7",
"selection": {
"AllObjectIds": [
{
"ObjectId": "80aee0df-bf12-470b-934c-960694ac61ac",
"ObjectTypeEnum": "file"
},
{
"ObjectId": "8baeff5f-3e47-4003-b01b-0bcea2052bfe",
"ObjectTypeEnum": "task"
}
],
"ObjectIds": [
{
"ObjectId": "f5ae54b6-c154-4992-86ac-fabee415f6a2",
"ObjectTypeEnum": "process"
},
{
"ObjectId": "efaed4c3-d54c-4c16-b696-bca20cdf33aa",
"ObjectTypeEnum": "folder"
}
],
"ParentObjectId": {
"ObjectId": "79aeda39-dcb5-414a-85b3-5085132f14f0",
"ObjectTypeEnum": "document"
}
}
}
Response:
{
"CreateSelectionResult": {
"AllObjectIds": [
{
"Id": "d3e72024-d603-eb11-a0da-00155d109000",
"ObjectId": "80aee0df-bf12-470b-934c-960694ac61ac",
"ObjectTypeEnum": "file"
},
{
"Id": "d9e72024-d603-eb11-a0da-00155d109000",
"ObjectId": "8baeff5f-3e47-4003-b01b-0bcea2052bfe",
"ObjectTypeEnum": "task"
}
],
"Id": "b6e72024-d603-eb11-a0da-00155d109000",
"ObjectIds": [
{
"Id": "c7e72024-d603-eb11-a0da-00155d109000",
"ObjectId": "f5ae54b6-c154-4992-86ac-fabee415f6a2",
"ObjectTypeEnum": "process"
},
{
"Id": "cde72024-d603-eb11-a0da-00155d109000",
"ObjectId": "efaed4c3-d54c-4c16-b696-bca20cdf33aa",
"ObjectTypeEnum": "folder"
}
],
"ParentObjectId": {
"Id": "bfe72024-d603-eb11-a0da-00155d109000",
"ObjectId": "79aeda39-dcb5-414a-85b3-5085132f14f0",
"ObjectTypeEnum": "document"
}
}
}
Exceptions
Type | Condition |
---|---|
ServiceException | The connection id {connectionId} isn't valid or has expired (10008) |
ServiceException | Verification code is needed: Verification code not yet verified (10152) |