POST api/Collection/CreateCollection

Create new collection

Request Information

URI Parameters

None.

Body Parameters

Collection's info

CollectionData
NameDescriptionTypeAdditional information
Name

Collection name

string

None.

Parent

Parent value ID

integer

None.

ItemIds

List of Items Ids in this collection

Collection of integer

None.

Request Formats

application/json, text/json

Sample:
{
  "name": "sample string 1",
  "parent": 2,
  "itemIds": [
    1,
    2
  ]
}

application/xml, text/xml

Sample:
<CollectionData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DAMClient.Models">
  <ItemIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:long>1</d2p1:long>
    <d2p1:long>2</d2p1:long>
  </ItemIds>
  <Name>sample string 1</Name>
  <Parent>2</Parent>
</CollectionData>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'CollectionData'.

Response Information

Resource Description

Returns created collection

IndexedTagValues
NameDescriptionTypeAdditional information
Values

Values List

Collection of IndexedTagValue

None.

Path

Whole parent path for Catalog Tags supporting hierarchy

Collection of IndexedTagValue

None.

Tag

Catalog Tag description

IndexedTag

None.

TotalCount

Total number of items in the list

integer

None.

Error

Error description if the operation failed

string

None.

Success

Operation result

boolean

None.

ErrorCode

Error code

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "values": [
    {
      "text": "sample string 1",
      "ancestors": "sample string 2",
      "id": 3,
      "isSelected": true,
      "isDefaultValue": true,
      "hasTagLinks": true,
      "tagId": 7,
      "isApproved": true,
      "rawValue": {},
      "tagName": "sample string 10",
      "itemsCount": 11,
      "location": "sample string 12",
      "hasChilds": true,
      "count": 14
    },
    {
      "text": "sample string 1",
      "ancestors": "sample string 2",
      "id": 3,
      "isSelected": true,
      "isDefaultValue": true,
      "hasTagLinks": true,
      "tagId": 7,
      "isApproved": true,
      "rawValue": {},
      "tagName": "sample string 10",
      "itemsCount": 11,
      "location": "sample string 12",
      "hasChilds": true,
      "count": 14
    }
  ],
  "path": [
    {
      "text": "sample string 1",
      "ancestors": "sample string 2",
      "id": 3,
      "isSelected": true,
      "isDefaultValue": true,
      "hasTagLinks": true,
      "tagId": 7,
      "isApproved": true,
      "rawValue": {},
      "tagName": "sample string 10",
      "itemsCount": 11,
      "location": "sample string 12",
      "hasChilds": true,
      "count": 14
    },
    {
      "text": "sample string 1",
      "ancestors": "sample string 2",
      "id": 3,
      "isSelected": true,
      "isDefaultValue": true,
      "hasTagLinks": true,
      "tagId": 7,
      "isApproved": true,
      "rawValue": {},
      "tagName": "sample string 10",
      "itemsCount": 11,
      "location": "sample string 12",
      "hasChilds": true,
      "count": 14
    }
  ],
  "tag": {
    "isAllowAssign": true,
    "maxHierarchy": 2,
    "strongHierarchy": true,
    "isMultiplyValues": true,
    "allowSearch": true,
    "customTag": "sample string 6",
    "id": 7,
    "indexed": true,
    "guid": "7d9a2d4a-124d-41df-8c51-d89371252c3c",
    "locked": true,
    "name": "sample string 11",
    "originName": "sample string 12",
    "readOnly": true,
    "dataType": "sample string 14"
  },
  "totalCount": 1,
  "error": "sample string 2",
  "success": true,
  "errorCode": 4
}
bool hasModels = Model.ParameterModels.Count > 0; if (hasModels) {

Parameter Information

data

Collection properties

Property Description
Name (String)
            Collection name
            
Parent (Int64)
            Parent value ID
            
ItemIds (Int64[])
             List of Items Ids in this collection
            
}