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

{
	totalChunks: 0,
	chunkId: 0,
	mainDestination: String,
	metadata: 
	{
		title: String,
		source: String,
		author: String,
		publishedDate: 0001-01-01,
		status: String
	},
	subdestinations: 
	[
		String
	],
	highlightTerms: 
	[
		String
	],
	html: String
}