Updated version 0.1 of Nikita - interface update

Petter Reinholdtsen pere at hungry.com
Thu Feb 2 14:27:57 CET 2017


[Thomas Sødring]
> I run the run_curl and test, but it seems ok. Could you the curl with -v
> and post here to see if there is any more information available?

Sure.

$ curl -v --header Accept:application/vnd.noar5-v4+json -X GET -b   ~/tmp/cookie.txt   http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/dokumentobjekt/
* Hostname was NOT found in DNS cache
*   Trying ::1...
* connect to ::1 port 8092 failed: Connection refused
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8092 (#0)
> GET /noark5v4/hateoas-api/arkivstruktur/dokumentobjekt/ HTTP/1.1
> User-Agent: curl/7.38.0
> Host: localhost:8092
> Cookie: JSESSIONID=D026A8CDEC3CDEF6FEBAF682B9B7A298
> Accept:application/vnd.noark5-v4+json
> 
< HTTP/1.1 200 OK
* Server Apache-Coyote/1.1 is not blacklisted
< Server: Apache-Coyote/1.1
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
< Expires: 0
< X-Frame-Options: DENY
< X-Application-Context: HiOA Noark 5 Core (Demo mode):demo:8092
< Content-Type: application/vnd.noark5-v4+json;charset=UTF-8
< Transfer-Encoding: chunked
< Date: Thu, 02 Feb 2017 13:23:51 GMT
< 
{
  "dokumentobjekt" : [ {
    "systemID" : "c189fb64-8c70-467f-8013-acd6bb6e5229",
    "versjonsnummer" : "1",
    "variantformat" : "Arkivformat",
    "format" : "PDF",
    "formatDetaljer" : "PDF/A PDFv1.4",
    "_links" : [ ]
  } ]
}
* Connection #0 to host localhost left intact

I suspect the probelm is that the script is looking for _links at the
same level as dokuemt objekt, and not inside
{ "dokumentobjekt" : [ { ... } ] }.

Btw, is the order of the URLs returned in _links deterministic (aka
sorted)?  I do not get the failure in the same URL every time and
suspect the ordering changes.

-- 
Vennlig hilsen
Petter Reinholdtsen


More information about the nikita-noark mailing list