Hackathon2019

<back to all web services

TocRequest

Requires Authentication
The following routes are available for this service:
GET/api/toc/{TopDestination}Retrieve table of content for the document
TocRequest Parameters:
NameParameterData TypeRequiredDescription
TopDestinationpathstringNo
TocResponse Parameters:
NameParameterData TypeRequiredDescription
TocformList<TocEntry>No
TocEntry Parameters:
NameParameterData TypeRequiredDescription
TitleformstringNo
DestinationNameformstringNo
ChildrenformList<TocEntry>No
IsTopLevelformboolNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/toc/{TopDestination} HTTP/1.1 
Host: hackathon2019.rettsdata.no 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"toc":[{"title":"String","destinationName":"String","children":[{"title":"String","destinationName":"String","children":[{"title":"String","destinationName":"String","isTopLevel":false}],"isTopLevel":false}],"isTopLevel":false}]}