DEPRECATED for 2.0

New Article: https://portal.arcavis.ch/help-article/154

Introduction

The Arcavis-API is setup as RESTful Webservice and sends and receives JSON-Content.

The API can be accessed with the following URL. (Web-API-Module must be licensed).

  

https://yourpage.arcavis.ch/api/

  

The Resources accept the following HTTP Methods

  • GET to getdata
  • POST to create/update new data
  • PUT to change existing data
  • DELETE to delete data


Not for every resource all methods are available. Helper-Ressources usually only have GET-Methods to obtain values and corresponding keys.


Documentation

The Documentation is generated with Swagger, you can access it via


https://yourpage.arcavis.ch/swagger


Authorization

Authentication and Authorization is done via HTTP Header

Authorization: Basic d2ViYXBpOjEyMzQ1Ng==


Since these credentials are not encrypted, the API should only be accessed via HTTPS Channel.

Create a user in Arcavis with the Role "Web-API" and use the username and password to create the authentication token. To do this, you need to encode a string (Base 64 Encoding) with the following content: "username:password". This can be done with https://www.base64encode.org for example.

Basic return object

The return object of any API-Call is a JSON object with the following structure:

 

FieldTypeDescription
ResultValueThis could contain a Integer, a Boolean, a JSON Object or a List of JSON Objects
IsSuccessfulBooleanTrue if the operation was successful.
MessageStringContains additional information about the success of the operation.


Example


{
  "Result": 12968,
  "IsSuccessful": true,
  "Message": ""
}

 

Sync return object

Additionaly to the field above, the return objects for all diff-sets have the following fields.

Diff sets are used to only fetch data since a given time.


FieldTypeDescription
DataAgeTicksLongThe datetime of when the data was fetched
DeletedIdsList<object>The List of deleted Ids since the provided date


Example


{
  "DataAgeTicks": 636458124504177200,
  "Result": [],
  "IsSuccessful": true,
  "Message": "",
  "DeletedIds": [
    58
  ]
}


Paged return object

If the results are paged, the return object will have the following fields (additionaly to the ones above).

Paging helps to speed up data fetching for a large result set. It can only be used for the Articles resource.


FieldTypeDescription
TotalPagesIntegerThe number of total pages to be expected
PageIntegerThe current page displayed
PageSizeIntegerThe number of results per page


Example


{
  "TotalPages": 395,
  "Page": 1,
  "PageSize": 10,
  "Result": [],
  "IsSuccessful": true,
  "Message": ""
}