Reading the Register
Specific OAID
Every user can read the complete record of their OAID. This is done through a GET Request with the OAID specified directly in the path.
Tip
Always use a trailing slash ("/").
Example: https://api.oaid.at/v1/pip/codes/ABCD1234/
Example
$ curl --request GET --location "https://api.oaid.at/v1/pip/codes/ABCD1234/" \
$ --header "Authorization: Bearer <access_token>" \
$ --header "Accept: application/json"
---> 100%
{
"tenant": "fiberpark",
"code": "ABCD1234",
"token": "confirmed",
"version": "v8",
"status": "started",
"external_id": "7710fb1e-0efb-42af-9e30-ed46188d9bb9",
"created_at": "2022-03-01T10:35:03.392+01:00",
"modified_at": "2022-03-01T10:37:01.012+01:00",
"_links": {
"self": "https://api.oaid.at/v1/pip/codes/ABCD1234/"
}
}
All OAIDs
If the path parameter is omitted, the API returns a list of OAIDs page by page. To retrieve all OAIDs, you have to page through the list. A particular page can be reached via the _page
query parameter. The API includes all page information in the response header, but it is just as practical to keep increasing the page number (_page=1, 2, ... n
) until only an empty response is returned.
Example
$ curl --request GET --location "https://api.oaid.at/v1/pip/codes/?_page=1" \
$ --header "Authorization: Bearer <access_token>" \
$ --header "Accept: application/json"
---> 100%
[
{
"tenant": "fiberpark",
"code": "ABCD1234",
"token": "confirmed",
"version": "v8",
"status": "started",
"external_id": "aabbccdd-0011-cc11-ffa0-12937452b916",
"created_at": "2019-05-29T17:11:14.206+00:00",
"modified_at": "2021-04-12T13:03:07.566+00:00",
"_links": {
"self": "https://api.oaid.at/v1/pip/codes/ABCD1234/"
},
"business_key": "ext.87654321",
"center": "48.19404,15.64005",
"attr": {
"mode": 13,
"port_type": "STZ 13.3"
}
}
]
Note the difference in the responses. In the single query, a JSON object is returned, while the list query always returns a JSON array of objects, even if only one record is included.