Updated version 0.1 of Nikita - interface update

Thomas Sødring thomas.sodring at hioa.no
Wed Feb 1 10:39:07 CET 2017


Now I'm wondering if everything is actually OK. Can you check the
following steps?

curl -v --header "Accept:application/vnd.noark5-v4+json" -X GET
http://localhost:8092/noark5v4/

is giving me:

{
  "_links" : [ {
    "href" : "http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur"
  }, {
    "href" : "http://localhost:8092/noark5v4/hateoas-api/sakarkiv/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/sakarkiv"
  }, {
    "href" : "http://localhost:8092/noark5v4/gui/",
    "rel" : "http://nikita.arkivlab.no/noark5/v4/gui"
  }, {
    "href" : "http://localhost:8092/noark5v4/import-api/",
    "rel" : "http://nikita.arkivlab.no/noark5/v4/import-api"
  } ]
}

now I need to make sure I'm logged in.

curl -v --header "Accept:application/vnd.noark5-v4+json" -X GET -b
cookie.txt http://localhost:8092/noarkv4/hateoas-api/arkivstruktur/

is giving me

{
  "_links" : [ {
    "href" :
"http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/klasse/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/klasse",
    "templated" : true,
    "reltemplatedSpecified" : true
  }, {
    "href" :
"http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/basisregistrering/",
    "rel" :
"http://rel.kxml.no/noark5/v4/api/arkivstrukturbasisregistrering",
    "templated" : true,
    "reltemplatedSpecified" : true
  }, {
    "href" :
"http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/mappe/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/mappe",
    "templated" : true,
    "reltemplatedSpecified" : true
  }, {
    "href" :
"http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/arkiv/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/arkiv",
    "templated" : true,
    "reltemplatedSpecified" : true
  }, {
    "href" :
"http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/dokumentbeskrivelse/",
    "rel" :
"http://rel.kxml.no/noark5/v4/api/arkivstrukturdokumentbeskrivelse",
    "templated" : true,
    "reltemplatedSpecified" : true
  }, {
    "href" : "http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/arkivdel",
    "templated" : true,
    "reltemplatedSpecified" : true
  }, {
    "href" :
"http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/registrering/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/registrering",
    "templated" : true,
    "reltemplatedSpecified" : true
  }, {
    "href" :
"http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/dokumentobjekt/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstrukturdokumentobjekt",
    "templated" : true,
    "reltemplatedSpecified" : true
  }, {
    "href" :
"http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/klassifikasjon/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/klassifikasjon",
    "templated" : true,
    "reltemplatedSpecified" : true
  }, {
    "href" :
"http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/arkivskaper/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/arkivskaper",
    "templated" : true,
    "reltemplatedSpecified" : true
  }, {
    "href" :
"http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/ny-arkiv",
    "rel" : "http://rel.kxml.no/noark5/v4/api/administration/ny-arkiv",
    "templated" : false,
    "reltemplatedSpecified" : true
  } ]
}

and

 curl -v --header "Accept:application/vnd.noark5-v4+json" -X GET -b
cookie.txt http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/arkiv/

is giving me:
{
  "arkiv" : [ ]
}

 - Tom
On 02/01/2017 10:22 AM, Thomas Sødring wrote:
> On 02/01/2017 10:04 AM, Petter Reinholdtsen wrote:
>> [Thomas Sødring]
>>> Just to make sure we are talking about the same thing. The equivalent of
>>>
>>>  http://n5test.kxml.no/api/
>>>
>>> is
>>>
>>>  http://localhost:8092/noark5v4/hateoas-api/
>> Oh.  But the last one give 404 not found, not a JSON documents with
>> links?
> Hmmm, Sorry I made a mistake here.  This:
>
>  http://localhost:8092/noark5v4/
>
>
> is equvialent to:
>  
>
>  http://n5test.kxml.no/api/
>
>
> "api" is a contextpath, equivalent to my "noark5v4"
>
>>> http://localhost:8092/noark5v4/hateoas-api/ should lead you
>>> http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/
>>>
>>> and from here you should be able to get
>> Not happening when I test.
> Argh! Something must have happened yesterday in the final round of
> commits! I checked every step to match the readme. I will take a quick
> at it now!
>>> Maybe your script should only be looking for official Noark services.
>> Could be.  So far it is a simple recursive discovery of all listed URLs.
>>
> _______________________________________________
> nikita-noark mailing list
> nikita-noark at nuug.no
> https://lists.nuug.no/mailman/listinfo/nikita-noark



More information about the nikita-noark mailing list