Annotations
mPulseAPI.getAnnotation — Method
Fetches a single annotation from the mPulse annotations API by ID.
Arguments
token::AbstractString : The X-Auth-Token fetched by calling getRepositoryToken
annotationID::Int64 : The ID of the annotation to fetch.
Returns
Dict{String, Any} — The annotation object returned by the mPulse annotations API.
The annotation Dict typically contains:
id::Int : Unique annotation ID
title::AbstractString : Short description of the annotation (usually the alert name)
start::Int : Annotation start time as epoch milliseconds
end::Int : Annotation end time as epoch milliseconds
domainID::Int : The domain ID this annotation belongs to
Additional fields may be present depending on the mPulse API version.
Throws
ArgumentError : If token is empty or annotationID is not positive
mPulseAPIAuthException : If the token is invalid or has expired (HTTP 401)
mPulseAPIBugException : If the API returns an HTTP 500 (server-side bug)
mPulseAPIException : If the API returns an unexpected error response
mPulseAPI.getAnnotations — Method
Fetches annotations from the mPulse annotations API for a given domain and optional time range.
Annotations are written by the mPulse real-time alerting system when an anomaly is detected or cleared, and can be used to accurately reconstruct alert history for a domain without re-running the detection model locally.
Arguments
token::AbstractString : The X-Auth-Token fetched by calling getRepositoryToken
Keyword Arguments
domainID::Union{Int64, Nothing} : The ID of the app/domain to fetch annotations for. If omitted or nothing, returns all annotations for the authenticated tenant.
dateStart::Union{DateTime, ZonedDateTime, Nothing} : Start of the time range (inclusive). Converted to epoch milliseconds internally. Optional; omit to fetch annotations from the earliest available time.
dateEnd::Union{DateTime, ZonedDateTime, Nothing} : End of the time range (inclusive). Converted to epoch milliseconds internally. Optional; omit to fetch annotations up to the current time.
Returns
Vector — Array of annotation dicts returned by the mPulse annotations API. Each element is typically a Dict{String, Any}, but the exact element type reflects the raw JSON.parse output.
Each annotation Dict typically contains:
id::Int : Unique annotation ID
title::AbstractString : Short description of the annotation (usually the alert name)
start::Int : Annotation start time as epoch milliseconds
end::Int : Annotation end time as epoch milliseconds
domainID::Int : The domain ID this annotation belongs to
Additional fields may be present depending on the mPulse API version.
Throws
ArgumentError : If token is empty
mPulseAPIAuthException : If the token is invalid or has expired (HTTP 401)
mPulseAPIBugException : If the API returns an HTTP 500 (server-side bug)
mPulseAPIException : If the API returns an unexpected error response
mPulseAPIResultFormatException : If the API response is not in the expected format