getSkins()

Pixelsilk API function to get the skins object for a section--requires the edit-page-properties permission
Parameters:
sectionId: the unique identifier of the section (page)

Output:
The function getSkins returns a skins object containing all the properties of a skin: id, content, viewItem, alternatingItem, addEditItem, itemDetail, firstItem, separator, lastItem, activeItem, isSectionSkin, sectionId, typeId.

C# Example:
Guid sectionId = <section's id>;
object skins = GetSkins(sectionId);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/getSkins HTTP/1.1
HOST: www.example.com
Content-Length: 123
Content-Type: application/x-www-form-urlencoded
Cookie: auth=3A018460498D...08FC443442EF

Request Data:
Unencoded Data:
json={
   "sectionId":"03754619-b71b-47e7-866d-4f7856c081a0"
}&token=7AdbNHZQBtwc...RPTEK8UvSUQ=

Url-encoded Data:
json=%7b%0d%0a+++...%22%0d%0a%7d&token=7AdbNHZQBtwc...TEK8UvSUQ%3d

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=89CBFE47F35A...122AB1DAA23; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 367

Response Data:
{
  "id":"42b4835b-af96-48c0-8b80-0d57d1410242",
  "content":"\n\n\u003cdiv\u003e\n Here\u0027s my test\n
    \n\u003c/div\u003e\n",
  "viewItem":"\n",
  "alternatingItem":"",
  "addEditItem":"",
  "itemDetail":"",
  "firstItem":"",
  "separator":"",
  "lastItem":"",
  "activeItem":"null",
  "isSectionSkin":false,
  "sectionId":"a866eeb2-1e6a-4e31-931a-d1839dc29418",
  "typeId":null
}

JavaScript Example:
Method Call:
pixelsilk2.getSkins(input, callback);

Input Object:
{
    sectionId:"7af39bdb-633f-4328-be35-a41a88de7f02"
}

Returned Data:
{
    "id":"98a69eb5-7299-4934-9af6-4d2ebb424e64",
    "content":"",
    "viewItem":"",
    "alternatingItem":"",
    "addEditItem":"",
    "itemDetail":"",
    "firstItem":"",
    "separator":"",
    "lastItem":"",
    "activeItem":"",
    "isSectionSkin":false,
    "sectionId":null,
    "typeId":"031ce0ac-24c1-4254-a7ec-82a4d7fe5c8e"
}

Back to Pages »