Edit
Use this API to edit data in Marknadsdatabasen 2. One big difference between MdB1 and MdB2 is that MdB2 is split into several databases. The name of the databases are:
Every accessID is connected to a building, address and possibly a premise. A premise is connected to an address and an building. An address is connected to a building. If a single building has 10 addresses, 40 premises and 45 accessID and you edit the name of one of the addresses, it will still be connected to that premise, but the change will cascade down to all data that is connected to that address, such as premises and accessID's.
- buildings
- building_addresses
- building_premises
- building_sockets
Every accessID is connected to a building, address and possibly a premise. A premise is connected to an address and an building. An address is connected to a building. If a single building has 10 addresses, 40 premises and 45 accessID and you edit the name of one of the addresses, it will still be connected to that premise, but the change will cascade down to all data that is connected to that address, such as premises and accessID's.
FormatXML AuthLogin OriginMarknadsdatabasen ConsumerStadsnät
delete_post
WARNING!
This will totally delete a post in the database, there is no recovery function via API. The API user needs to have delete access in Atlas Admin. There will be a backup and log of the delete, but only for this particular post, if you delete an address that will also lead to deleting all premises and accessId's connected to that address post. There is no automatic backup of those posts.
Request
GET /admin/edit/mdb_buildings/plain/editapi
Attributes
- mandatory
Data format: integer
Example: 1234
ID of post to delete in selected database - mandatory
Data format: string
Example: buildings
What database to read data from. Valid values are "buildings", "building_addresses", "building_premises" and "building_sockets" - optional
Data format: string
Example: json
What format should the response be in, valid values are 'xml' and 'json'
Example request
GET /admin/edit/mdb_buildings/plain/editapi?method=delete_post&id=1234&database=buildings&hash=ABC123
Response success: 200
HTTP/1.1 200
Content-Type: application/xml<delete> <response> <message>post 3911 from building_addresses deleted</message> </response> <status>success</status> </delete>