Hackathon2019

<back to all web services

SubDestinationRequest

Requires Authentication
The following routes are available for this service:
GET/api/document/{TopDestination}/subdestination/{SubDestination}Lookup chunk in document by document destination and a subdestination
SubDestinationRequest Parameters:
NameParameterData TypeRequiredDescription
TopDestinationpathstringNo
SubDestinationpathstringYes
DocumentResponse Parameters:
NameParameterData TypeRequiredDescription
TotalChunksformintNoNumber of chunks in the document
ChunkIdformintNoThe current chunk id
MainDestinationformstringNoThe document destination
MetadataformDocumentMetadataNoDocument Metadata
SubdestinationsformList<string>NoList of subdestinations in this chunk
HighlightTermsformList<string>NoList of highlighted terms (when a documentsearch is performed to fetch chunk)
HtmlformstringNoThe actual Rhtml (Rettsdata html) belonging to this chunk
DocumentMetadata Parameters:
NameParameterData TypeRequiredDescription
TitleformstringNoThe document title
SourceformstringNoThe document source
AuthorformstringNoThe document author
PublishedDateformDateTimeNoThe document publish date
StatusformstringNoThe legal status of the document

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/document/{TopDestination}/subdestination/{SubDestination} HTTP/1.1 
Host: hackathon2019.rettsdata.no 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<DocumentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bff.Dto.Document">
  <ChunkId>0</ChunkId>
  <HighlightTerms xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </HighlightTerms>
  <Html>String</Html>
  <MainDestination>String</MainDestination>
  <Metadata>
    <Author>String</Author>
    <PublishedDate>0001-01-01T00:00:00</PublishedDate>
    <Source>String</Source>
    <Status>String</Status>
    <Title>String</Title>
  </Metadata>
  <Subdestinations xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Subdestinations>
  <TotalChunks>0</TotalChunks>
</DocumentResponse>