copyPageType()
Pixelsilk API function to make a copy of a page type--requires the advanced-admin-access permission
Parameters:
pageTypeId: the unique identifier of the page type
Output:
The function copyPageType returns a page type object containing the id, name, image, and groupName of the page type.
C# Example:
Guid pageTypeId = <page type's id>;
object CopyPageType(pageTypeId);
Note the capital first letter of the C# method.
HTTP Example:
Request Headers:
POST /api2/copyPageType HTTP/1.1
HOST: www.example.com
Content-Length: 124
Content-Type: application/x-www-form-urlencoded
Cookie: auth=FB90D97B01EE...E772F13538D1
Request Data:
Unencoded Data:
json={
"pageTypeId":"56e7e8e2-fb4a-4aea-8bdb-d335f0e83462"
}&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=FAA9617F71A2...BB8A68CF094; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 107
Response Data:
{"id":"acbfbeb5-29d4-4638-86be-2e9235cd5228",
"name":"Copy of ExampleList","image":"Books","groupName":null}
JavaScript Example:
Method Call:
pixelsilk2.copyPageType(input, callback);
Input Object:
{
pageTypeId:"56e7e8e2-fb4a-4aea-8bdb-d335f0e83462"
}
Returned Data:
{
"id":"e89f67d9-922b-432b-9664-5db8644009d3",
"name":"Copy of ExampleList",
"image":"Media",
"groupName":null
}
Back to Page Types »