Roll an item
curl --request POST \
--url https://forgegames.org/api/items/roll \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://forgegames.org/api/items/roll"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://forgegames.org/api/items/roll', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://forgegames.org/api/items/roll",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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://forgegames.org/api/items/roll"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://forgegames.org/api/items/roll")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://forgegames.org/api/items/roll")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"item": {
"id": "<string>",
"name": "<string>",
"thumbnail": "<string>",
"rollNumerator": 123,
"createdAt": "<string>",
"updatedAt": "<string>",
"teamId": "<string>",
"classifiers": [
{
"id": "<string>",
"itemId": "<string>",
"classifierId": "<string>",
"classifierOptionId": "<string>",
"classifierOption": {
"id": "<string>",
"name": "<string>",
"dropRateMultiplier": 123,
"classifierId": "<string>"
}
}
]
},
"itemAttributeInstances": [
{
"itemAttributeId": "<string>",
"value": 123,
"attribute": {
"id": "<string>",
"name": "<string>",
"min": 123,
"max": 123,
"teamId": "<string>"
}
}
]
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}items
Roll an item
Generates a randomized variation of an item. This endpoint is commonly used for loot drops or creating unique instances in games.
POST
/
items
/
roll
Roll an item
curl --request POST \
--url https://forgegames.org/api/items/roll \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://forgegames.org/api/items/roll"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://forgegames.org/api/items/roll', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://forgegames.org/api/items/roll",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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://forgegames.org/api/items/roll"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://forgegames.org/api/items/roll")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://forgegames.org/api/items/roll")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"item": {
"id": "<string>",
"name": "<string>",
"thumbnail": "<string>",
"rollNumerator": 123,
"createdAt": "<string>",
"updatedAt": "<string>",
"teamId": "<string>",
"classifiers": [
{
"id": "<string>",
"itemId": "<string>",
"classifierId": "<string>",
"classifierOptionId": "<string>",
"classifierOption": {
"id": "<string>",
"name": "<string>",
"dropRateMultiplier": 123,
"classifierId": "<string>"
}
}
]
},
"itemAttributeInstances": [
{
"itemAttributeId": "<string>",
"value": 123,
"attribute": {
"id": "<string>",
"name": "<string>",
"min": 123,
"max": 123,
"teamId": "<string>"
}
}
]
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
⌘I