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

HTTP + XML

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

<TocResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bff.Dto.Toc">
  <Toc>
    <TocEntry>
      <Children>
        <TocEntry>
          <Children>
            <TocEntry>
              <Children i:nil="true" />
              <DestinationName>String</DestinationName>
              <IsTopLevel>false</IsTopLevel>
              <Title>String</Title>
            </TocEntry>
          </Children>
          <DestinationName>String</DestinationName>
          <IsTopLevel>false</IsTopLevel>
          <Title>String</Title>
        </TocEntry>
      </Children>
      <DestinationName>String</DestinationName>
      <IsTopLevel>false</IsTopLevel>
      <Title>String</Title>
    </TocEntry>
  </Toc>
</TocResponse>