Step 1

 

 

Before you start

Before you start, you must have entered into an agreement with Nets, and have received a client certificate and information about a test archive. Go to Contact us and ask for access to the test system.

When this is done, you will have received a certificate of type Eurida Connect, in a p12 file. You need to ensure that the CA is trusted. This is done differently in different languages and environment.

Constructing a base URL

To build the base URL for your archive, you need the following values:

  • The domain name (for test, this is usually arkiv-test.nets.no)
  • ​​​​An organization number
  • An archive name

The base URL is then produced like this:

public class BaseUrlFactory {
    static String ORGANIZATION = "912341234";
    static String ARCHIVE = "documents";
    static String DOMAIN = "arkiv-test.nets.no";

    public static String createURL() {
        return "http://" + DOMAIN + "/arkiv-rest-generic/external/" + ORGANIZATION + "/eArchive/" + ARCHIVE;
    }

    public static void main(String[] args) {
        System.out.println(createURL());
    }
}

Testing access 

You can test access to the URL by downloading the archive definition (a json or xml document describing the structure of the archive), simply by appending /definition?format=json  (or xml) to the  path.
 
If your organization is 912341234, the archive name is documents and you want to receive the structure in json format, you can call:
 
https://arkiv-test.nets.no/arkiv-rest-generic/external/912341234/eArchive/documents/definition?format=json

 You should then receive something that looks like: 
​{"control":
  {"re​{"control":
    {"retention":{"daysFromDelete":4015},
      "owner":"516406-0922","id":1,
      "version":4,
      "authorizationEnabled":false,
      "trust":true},
"system":[
  {"indexName":"documentId", "displayName":null, "control":"user", "required":true,
   "searchable": true,"visible":false,"modifiable":false,
   "validation":{"type":"string","minLength":26,"maxLength":26,"occurs":1}},
  {"indexName":"mimetype","displayName":null,"control":"user","required":true,...

If this works, then you have successfully connected to the E-Archive REST service and can proceed to the nest step.

Identifying errors


​First inspect the HTTP response. If you were granted access to the service, but something went wrong with the request, then a number of headers starting with "X-Archive-" will be present in the response. These headers will contain a specific error message describing what the problem is. If these headers are not present, then the request was rejected before it reached the service. This can happen if the certificate does not provide access, or if the URL is incorrect.​
 
The headers are described in detail in Response codes and headers.​​