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 .jsv suffix or ?format=jsv

HTTP + JSV

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/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

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