JavaScript
import Opriven from '@opriven/sdk';
const client = new Opriven({
apiKey: process.env['OPRIVEN_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const issueListResponse of client.issues.list()) {
console.log(issueListResponse.uuid);
}curl --request GET \
--url https://bff.opriven.com/api/v2/issues \
--header 'Authorization: Bearer <token>'import requests
url = "https://bff.opriven.com/api/v2/issues"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://bff.opriven.com/api/v2/issues",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://bff.opriven.com/api/v2/issues"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://bff.opriven.com/api/v2/issues")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://bff.opriven.com/api/v2/issues")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"uuid": "<string>",
"number": 4503599627370495,
"title": "<string>",
"description": "<string>",
"severity": "low",
"status": "investigating",
"environment": "<string>",
"triggeredAt": "2023-11-07T05:31:56Z",
"seedCount": 4503599627370495
}
],
"has_more": true,
"after": "<string>",
"before": "<string>"
}{
"type": "api_error",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"type": "api_error",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"type": "api_error",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"type": "api_error",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"type": "api_error",
"message": "<string>",
"request_id": "<string>",
"details": {}
}Issues
Fetch issues for an organization
Returns a paginated list of issues for the authenticated organization
GET
/
issues
JavaScript
import Opriven from '@opriven/sdk';
const client = new Opriven({
apiKey: process.env['OPRIVEN_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const issueListResponse of client.issues.list()) {
console.log(issueListResponse.uuid);
}curl --request GET \
--url https://bff.opriven.com/api/v2/issues \
--header 'Authorization: Bearer <token>'import requests
url = "https://bff.opriven.com/api/v2/issues"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://bff.opriven.com/api/v2/issues",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://bff.opriven.com/api/v2/issues"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://bff.opriven.com/api/v2/issues")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://bff.opriven.com/api/v2/issues")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"uuid": "<string>",
"number": 4503599627370495,
"title": "<string>",
"description": "<string>",
"severity": "low",
"status": "investigating",
"environment": "<string>",
"triggeredAt": "2023-11-07T05:31:56Z",
"seedCount": 4503599627370495
}
],
"has_more": true,
"after": "<string>",
"before": "<string>"
}{
"type": "api_error",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"type": "api_error",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"type": "api_error",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"type": "api_error",
"message": "<string>",
"request_id": "<string>",
"details": {}
}{
"type": "api_error",
"message": "<string>",
"request_id": "<string>",
"details": {}
}