getSectionsUrl()

Pixelsilk API function to get a section's (page's) relative url--requires the edit-page-properties permission
Parameters:
sectionId: the unique identifier of the section (page)

Output:
The function getSectionsUrl returns the url in string format

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

HTTP Example:
Request Headers:
POST /api2/getSectionsUrl HTTP/1.1
HOST: www.example.com
Content-Length: 123
Content-Type: application/x-www-form-urlencoded
Cookie: auth=587A39800ADC...930C765735B0

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=0D7BBFF351E4...53A621447B7; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 29

Response Data:
"/exampletest1/"

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

Input Object:
{
    sectionId:"be799b8b-e177-47fc-97dc-d10a1d2202a1"
}

Returned Data:
"/PixelSilk/Foo/"

Back to Pages »