Retrieve all timeline reasons
Retrieves all timeline reasons associated with the current company. These reasons are used to track machine downtimes, operational issues, and other significant events.
curl -X GET "https://wm.novoai.de/v2/timeline_reason" \
-H "Content-Type: application/json" \
-H "accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
-H "X-API-KEY: YOUR_API_KEY"
import requests
import json
url = "https://wm.novoai.de/v2/timeline_reason"
headers = {
"Content-Type": "application/json",
"accept": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT)",
"X-API-KEY": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://wm.novoai.de/v2/timeline_reason", {
method: "GET",
headers: {
"Content-Type": "application/json",
"accept": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT)",
"X-API-KEY": "YOUR_API_KEY"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://wm.novoai.de/v2/timeline_reason", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("accept", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN (JWT)")
req.Header.Set("X-API-KEY", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://wm.novoai.de/v2/timeline_reason')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['accept'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN (JWT)'
request['X-API-KEY'] = 'YOUR_API_KEY'
response = http.request(request)
puts response.body
{
"status": 1,
"timeline_reason_list": [
{
"id": 1,
"name": "Downtime",
"level": "Critical",
"reason": "Power failure",
"meta_backend": {},
"meta_frontend": {}
}
]
}
{
"status": 0,
"message": "No timeline reasons are set. Get started by adding them from Admin Panel."
}
{
"status": 0,
"message": "An unexpected error occurred."
}
/v2/timeline_reason
Target server for requests. Edit to use your own host.
JWT Bearer token authentication. Include in the Authorization header as Bearer <token>.
Bearer <token>.API-Access Key authentication. Include the generated key in the X-API-KEY header.
X-API-KEY header.Must be application/json.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token (JWT). JWT Bearer token authentication. Include in the Authorization header as Bearer \<token\>.
API Key for authentication. API-Access Key authentication. Include the generated key in the X-API-KEY header.
Headers
Responses
Indicates the success of the request. 1 for success, 0 for failure.
A list of timeline reasons available for the company.