---
last_review: "2025-01-01"
last_reviewer: "-"
documented_code: [ ]
---
```{tags} explanation, administrator
```
# AbstractProperty Specification
:::{note}
This page has been migrated from the old documentation, and has not yet been fully revised.
There might be inconsistencies or errors when using with current LinkAhead versions.
:::
% TODO: Issue: https://gitlab.indiscale.com/caosdb/src/linkahead-docs/-/issues/77
% TODO: Split property explanation (general) and API
% TODO: Old comments:
% TODO: - This specification is outdated. It is included to serve as a starting point for a more
% TODO: up-to-date description of the `Property` entity.
% TODO: - This document has not been updated for a long time. Although it is concerned with a
% TODO: mostly stable API, its content may no longer reflect the actual LinkAhead behavior.
## Introduction
An `AbstractProperty` is one of the base objects of LinkAhead.
An `AbstractProperty` MUST have the following _qualities_ (shortcut in brackets):
* a persistent id (`id`)
* an unique name (`name`)
* a description (`description`)
* a type (`type`)
* a generator `generator`)
* a creator (`creator`)
* a timestamp of it's date of creation (`created`)
* a set of owners and owning groups (`owner`)
* a set rules which controls the access to that `AbstractProperty` (`permission`)
Depending on the `AbstractProperty's` type it MUST have one of the following _qualities_:
* a unit (`unit`)
* a RecordType which is referenced by any instantiating ConcreteProperty. (`reference`)
This is described below.
## Property Types
An `AbstractProperty` MUST have one of the following 7 types:
* `text`
* `integer`
* `double`
* `datetime`
* `reference`
* `file`
An `AbstractProperty` of type `text`, `datetime`, or `file` MUST NOT have any unit or referenced
RecordType. A `double`, `integer` AbstractProperty MUST have a unit but MUST NOT have a referenced
RecordType. A `reference` `AbstractProperty` MUST have referenced RecordType und MUST NOT have a
unit.
## XML Representation of AbstractProperty Objects
An `AbstractProperty` is represented in xml by a `` tag. It's _qualities_ except for
`owner` and `permission` are represented by an xml attribute of the same name. For example
`` denotes an AbstractProperty whose `name` is _length_.
% TODO: The `owner` and `permission` qualities are not in use, yet. Depending on the purpose of the
% TODO: xml document (shall it represent an object in the database or an object to be posted to the
% TODO: database?) the `` tag may actually have just a few of the mentioned
% TODO: "quality-attributes".
### GET AbstractProperty
Any xml representation of an `AbstractProperty` that is retrieved from the LinkAhead Server MUST
have exactly ONE of the following forms, depending on the `AbstractProperty's` type:
#### text
#### integer
#### double
#### datetime
#### reference
#### file
'''General Notes:
* If the called Property does not exist or if the Property called without permission, the LinkAhead
Server will return an Error.
### POST AbstractProperty
Any xml representation of an `AbstractProperty` that is to be posted to the LinkAhead server MUST
have exactly ONE of the following forms, depending on the `AbstractProperty's` type:
#### text
#### integer
#### double
#### datetime
#### reference
#### file
*General Notes:*
* The `AbstractProperty's` `id` and timestamp (`created`) will be generated by the LinkAhead Server.
* The `AbstractProperty's` creator will be determined by the LinkAhead Server depending on it's
policy configuration.
* Any given attribute beyond these will be *ignored*.
* If the `` tag isn't compliant with these the LinkAhead Server will return an Error.
----
## Examples
### GET Requests
#### Single-Get
*Request:*
GET http://localhost:8122/mpidsserver/AbstractProperty/1
*Response:*
----
*Request:*
GET http://localhost:8122/mpidsserver/AbstractProperty/explanation
*Response:*
----
#### Multi-Get
*Request:*
GET http://localhost:8122/mpidsserver/AbstractProperty/explanation&2&3
*Response:*
----
#### Get all
*Request:*
GET http://localhost:8122/server/AbstractProperty/
GET http://localhost:8122/server/AbstractProperty
*Response:*
#### Erroneous Requests
##### Non-existing
*Request:*
GET http://localhost:8122/mpidsserver/AbstractProperty/123456
*Response:*
----
### POST Requests
*Request is to be sent to:*
POST http://localhost:8122/mpidsserver/AbstractProperty/
POST http://localhost:8122/mpidsserver/AbstractProperty
----
#### Single-Post
*Request body:*
*Response:*
----
*Request body (with a reference to Property 12345):*
----
#### Multi-Post
*Request body:*
*Response:*
...
----
#### Erroneous Requests
##### No Description
*Request body:*
*Response:*
----
##### No generator
*Request body:*
*Response:*
----
##### No Type
*Request body:*
*Response:*
----
##### No Unit
*Request body:*
*Response:*
----
##### No Name
*Request body:*
*Response:*
----
##### Invalid Name
*Request body:*
*Response:*
----
##### Mixed
*Request body:*
*Response:*
...
= DELETE AbstractProperties =
HTTP-DELETE-requests are to be sent to `http://${host}:${port}/mpidsserver/AbstractProperty/...`.
Default port is 8123.
*Example*
`DELETE http://${host}:${port}/mpidsserver/AbstractProperty/1&2&3&4`