Events
Utilize the Event endpoints within the myFiber SYS API to create and manage Events for a specific billable Entity. Events represent lifecycle actions such as activation, update, or deactivation, as well as purely informational entries using the notification event type.
Create Event
Generate new Events by calling the "Add Event on Entity" endpoint.
Each request creates (or reuses, see Idempotency) an event_id for the specified entity_id at the timestamp defined in event_at.
The following fields are required:
'entity_id': the UUID for the entity'event_type': either "activation", "update", "notification", or "deactivation"'event_at': timestamp of the event in ISO 8601 format (e.g.,2026-01-13T13:40:52+01:00)'sys_attributes': (only withevent_type= "activation" or "update") the attributes to set when activating or updating the event
Other optional fields can be provided, which are listed at the endpoint.
Required Fields by Event Type
Please note the fields that are required depend on the value of the event_type. Below are example request bodies for each scenario.
{
"entity_id": "8161163a-f227-466f-bc01-090a01e80165",
"event_type": "activation",
"event_at": "2026-02-01T17:00:14.305+01:00",
"sys_attributes": {
"partner_id": "6a3a39f6-861b-4a48-b868-5de838400e06",
"article_codes": [
"private_250_code"
]
}
}
Optional fields that may be included in sys_attributes are: option82 & partner_reference.
{
"entity_id": "8161163a-f227-466f-bc01-090a01e80165",
"event_type": "update",
"event_at": "2026-02-02T17:00:14.305+01:00",
"sys_attributes": {
"article_codes": [
"private_250_code"
]
}
}
Optional fields that may be included in sys_attributes are: option82 & partner_reference.
{
"entity_id": "8161163a-f227-466f-bc01-090a01e80165",
"event_type": "deactivation",
"event_at": "2026-02-03T17:00:14.305+01:00",
}
Where to get the entity_id and partner_id
- entity_id: "List of Entities" endpoint
- partner_id: "List of ISPs" endpoint
Idempotency
Event creation is idempotent with respect to the following core attributes:
entity_idevent_typeevent_atsys_attributes
If a request with identical core attributes is sent again, the API will not create a new event.
Instead, the API returns 200 OK, indicating the event already exists.
Event Modification
If a request is repeated with identical core attributes but different user attributes, the existing event is updated.
The following user attribute fields can modified:
usr_referenceusr_attributescomment
In this case, the API returns 201 Created, and the user attributes are overwritten.
Important
Core attributes cannot be modified.
Changing values such as event_type, event_at, or sys_attributes will not overwrite the existing event.
"Event Type"/ "Event At" Request Flow
Event requests of a specific event_type must generally occur in a particular order (based on event_at):
activation: first request or after adeactivationeventupdate: after anactivationorupdateeventdeactivation: following anactivationorupdateevent
For the event types above, event_at must be a date-time value in the past.
notification: can be requested for anyevent_atdate-time (including in the future)
Example
Suppose we create an activation type of event. An example request to the API appears as follows:
$ curl --request PUT "https://bss.myfiber.at/api/v2/sys/events/" \
$ --header "Authorization: Bearer <access_token>" \
$ --header "Accept: application/json" \
$ --header "Content-Type: application/json" \
$ --data '{
"entity_id": "8161163a-f227-466f-bc01-090a01e80165",
"event_type": "activation",
"event_at": "2026-02-01T17:00:14.305+01:00",
"event_timezone": "Europe/Vienna",
"sys_attributes": {
"partner_id": "6a3a39f6-861b-4a48-b868-5de838400e06",
"article_codes": [
"private_250_code"
]
}
}'
---> 100%
{
"tenant": "tenant_name",
"event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7"
}
Event Timezone Support
The time for the event (event_at) is stored in UTC in the backend.
To provide the event time:
- Set
event_timezone(IANA timezone where the event took place (default: Europe/Vienna)) - Ensure
event_atincludes the correct offset (e.g., Vienna: +01:00)
Read Single Event
A particular Event can be looked up at the "Single Event" endpoint by providing the event_id in the path.
$ curl --request GET "https://bss.myfiber.at/api/v2/sys/events/a7a26ff2-e851-45b6-9634-d595f45458b7/" \
$ --header "Authorization: Bearer <access_token>" \
$ --header "Accept: application/json"
---> 100%
{
"tenant": "tenant_name",
"event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
"entity_id": "8161163a-f227-466f-bc01-090a01e80165",
"event_type": "activation",
"event_at": "2026-02-01T16:00:14.305+00:00",
"event_timezone": "Europe/Vienna",
...
"sys_attributes": {
"partner_id": "6a3a39f6-861b-4a48-b868-5de838400e06",
"article_codes": [
"private_250_code"
]
},
"created_at": "2026-02-10T17:11:14.206+00:00",
"modified_at": "2026-02-12T13:03:07.566+00:00"
}
Read List of Events
Multiple Events can be obtained at a time via two different endpoints:
- "List of Events": may output all events
- "Latest Event per Entity": returns only the last created Event for each entity
Both endpoints enable the list to be filtered via the following parameters:
period: the date inYYYY-MM-DDformattoken: either: "fresh", "untouched", or "completed"entity_id: the UUID for the entity
Additionally, two query parameters are available to control pagination:
_page_cursor- a unique ID marking the starting point for the next page (defined in the next URL)_page_size- optional, the number of records to receive per page (default: 500, max: 2000)
Here are the steps how to read the list of all nodes with No Offset Pagination. We use the "Latest Event per Entity" endpoint in the example. The other endpoint works the same by removing latest/ in the URLs below.
Steps
-
Request the First Page
In the first page request, simply use the base URL. Optionally, you may set a different
_page_sizequery parameter from the default, if desired.$ curl --request GET "https://bss.myfiber.at/api/v2/sys/events/latest/" \ $ --header "Authorization: Bearer <access_token>" \ $ --header "Accept: application/json" ---> 100% HTTP/1.1 200 OK date: Thu, 27 Mar 2025 19:25:35 GMT ... x-page-size: 500 x-page-count: 163 link: <https://bss.myfiber.at/api/v2/sys/events/latest/>; rel=self, <https://bss.myfiber.at/api/v2/sys/events/latest/?_page_cursor=01953216-aaaa-788e-986e-822e157e5114&_page_size=500>; rel=next [ {"tenant": "tenant_name", ... {"tenant": "tenant_name", ... ... ] -
Retrieve the next URL
The next URL for pagination is provided in the API response header in the
linkfield. The method for extracting the next URL varies depending on the programming language used. The Link header is common implementation for pagination.For instance, in the Python script below, we use the
httpxpackage, which parses the links from the response header and stores them in theresponse.linksobject. If another page is available to retrieve, it will include a"next"object with the relevant"url"value for accessing the next page:next_url = response.links.get("next", {}).get("url") -
Request Next Page
Use the
next_urlobtained in Step 2 in your next request:request GET "https://bss.myfiber.at/api/v2/sys/events/latest/?_page_cursor=01953216-aaaa-788e-986e-822e157e5114&_page_size=500" -
Repeat Until Completion
Repeat Steps 2 and 3 until no next URL is provided or the last page returns an empty page of data (
[]), indicating all records have been retrieved.
Example Script (Python)
The following script automates pagination to fetch all pages of data. Please replace the <client_id> and <client_secret> placeholders with your credentials. The attributes token_url and scope are provided via API documentation.
# /// Pagination Script
# requires-python = ">=3.11"
# dependencies = [
# "httpx",
# "httpx-auth"
# ]
# ///
import os
import httpx
from httpx import URL
from httpx_auth import OAuth2ClientCredentials
BASE_URL = "https://bss.myfiber.at/api/v2"
RESOURCE = "/sys/events/latest/"
HEADERS = {"Content-Type": "application/json"}
CLIENT_ID = os.environ.get("client_id")
CLIENT_SECRET = os.environ.get("client_secret")
oauth2_cred = OAuth2ClientCredentials(
token_url="<token_url>", # fill in token_url from API documentation
scope="<scopes>", # fill in (list of) scopes from API documentation
client_id=CLIENT_ID, # provided by API provider
client_secret=CLIENT_SECRET, # provided by API provider
)
results_list = []
next_url = BASE_URL + RESOURCE # mind the slashes "/"
params = {'_page_size': 500}
with httpx.Client(headers=HEADERS, auth=oauth2_cred, verify=False, params=params, timeout=30) as client:
while next_url:
# parse the next_url explicitly to get access to all parts
next_url = URL(next_url)
# calling it with the parsed object is possible
response = client.get(next_url, params=next_url.params)
results_list.extend(response.json())
next_url = response.links.get("next", {}).get("url")
print(f"Total records: {len(results_list)}")
You may call this script with the environment variables set as ...
client_id="YOUR_ID" client_secret="YOUR_SECRET" python3 script.py
$env:client_id="YOUR_ID"; $env:client_secret="YOUR_SECRET"; py script.py
set client_id=YOUR_ID&& set client_secret=YOUR_SECRET&& py script.py
Namespace (Development Feature)
The namespace header is an optional feature intended for development and testing purposes only.
When provided, the namespace value is used by the API to logically separate events from other requests, ensuring they are processed independently from other namespaces.
This allows you to start with a clean event state by using a new namespace.
Over time, we will automatically delete no longer used namespaces.
Important
The namespace feature may be removed in future versions of the API.
Please do not rely on it for production workflows.