Hoppa direkt till innehåll
api

Atlas API

API

Anslutmotorns API kan användas för att exportera, importera och uppdatera adresser, samt att importera och uppdatera anmälningar.
Alla anrop till API:et sker via documentation AXA: Atlas XML API och rättigeheter måste läggas upp i API Credentials-modulen hos er för att använda den. Alla anrop ska innehålla information om vilken API-användare som anropar som då ska ha rätt IP-nummer i API Credentials-modulen.

Methods
API Endpoint: Anslutamotorn
API för att hantera adresser och anmälningar i Anslutamotorn
Endpoint URL https://www.example.com/admin/edit/connect/plain/api
Note that this API requires an authenticated user id and IP address Note that this API requires an authenticated user id and IP address
  • Method: search_address

  • The search is always a direct search, searching for "Storgatan 2" and mode "address" will only show matches where address is exactly "Storgatan 2". This search function will never return more than 100 matches
  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    2 search string green Arholmagatan 12 The term to search for
    3 field string green address What to search, possible values are "address", "building" and "streetname"
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=search_address&api_user=1234&search=Arholmagatan+12&field=address
  • Method: application_data

  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    2 id int green 1234 What application to display data for
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=application_data&api_user=1234&id=1234
  • Method: insert_addresses

  • The data is an array of posts, max 100 posts in the array. All posts must follow the specification, but as with insert_address, can also contain an "id" field for updating existing posts. Consult the MdB import function for an example of using a similar API call.
    This is a shorthand for using the insert_address up to 100 times, so all info for insert_address applies here as well.
  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    2 data array green Array An array of arrays of the addresses
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=insert_addresses&api_user=1234&data=Array
  • Method: export_objectdata

  • Exporterar data för objektet i samma format som "Exportera objektdata" i admin, alla adresser på objektet med status, pris, bankid-info och annat.
  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    2 oid int green 1234 What OID to display data for
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=export_objectdata&api_user=1234&oid=1234
  • Method: bankid_log

  • Returns the BankID information, but pages with 100 entries per request - use the "stop" and "total" fields to determine if you need to fetch more, using the "start" parameter.
  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    2 start int 200 count to start from
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=bankid_log&api_user=1234&start=200
  • Method: export_addresses

  • This function only returns the URL for exporting the database as used in the admin section, but with an added parameter to include the local ID for every post, for using with insert_address and insert_addresses
  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    2 mode string green all What scope of addresses to export
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=export_addresses&api_user=1234&mode=all
  • Method: object_info

  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    2 id int green 1234 The object id (OID)
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=object_info&api_user=1234&id=1234
  • Method: export_applications

  • This function only returns the URL for exporting the applications as used in the admin section, but with an added parameter to include the local ID for every post, for using with insert_application.
  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=export_applications&api_user=1234
  • Method: insert_address

  • The array must follow the specification for the connection engine import function. However, you can add an "id" field to the data array to specify what post to update. The id of any given post is obtained via the search_address function. Without the id field, the address will always be added to the address database even if it is a duplicate.
    When using the api to create addresses, the "origin" field will be set to "api" always,
  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    2 data array green Array An array of the address
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=insert_address&api_user=1234&data=Array
  • Method: empty_addresses

  • "mode" can be "all", "admin", "web", "import" or "api", which means:

    all: Remove all addresses in the database
    admin: Remove all addresses created by an administrator using the web interface
    web: Remove all addresses created by visitors
    import: Remove all addresses created by file import
    api: Remove all addresses created by the API

    Note, however, that if you remove all addresses and then import new ones via the API, all those will be marked as "api" addresses and will no longer be identified as an address created by a visitor, for example
  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    2 mode string green admin What posts to delete, valid values are "all", "admin", "web", "import", "api"
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=empty_addresses&api_user=1234&mode=admin
  • Method: latest_applications

  • An array of the latest applications from a specified date. More data about each application may be present in application_data()
  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    2 date string green 2019-10-112 From what date you want to fetch new applications from
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=latest_applications&api_user=1234&date=2019-10-112
  • Method: bankid_data

  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    2 id int green 1234 Which bankid transaction to show info for
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=bankid_data&api_user=1234&id=1234
  • Method: qgis_object

  • Returnerar GeoJSON-formatterad data om ett objekt och dess geocode-data, för att läsa in i QGIS direkt

    "status" kan vara "all", "interest", "order" eller "connected"
  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    2 oid int green 1234 What OID to display data for
    3 status string green all Only return posts with this status
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=qgis_object&api_user=1234&oid=1234&status=all
  • Method: object_list

  • Request Parameters
    1 api_user int green XXXX API User ID with privileges
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=object_list&api_user=XXXX
  • Method: insert_application

  • The array must follow the specification for the connection engine import function. The array will be matched to existing posts and update if a duplicate exists.
  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    2 data array green Array An array of the application
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=insert_application&api_user=1234&data=Array
  • Method: search_application

  • Request Parameters
    1 api_user int green 1234 The ID for the API user in Atlas
    2 search string green Johan Bylund The term to search for
    3 field string green name What to search, possible values are "address", "building", "streetname", and "name"
    Endpoint example:
    GET: https://www.example.com/admin/edit/connect/plain/api?method=search_application&api_user=1234&search=Johan+Bylund&field=name