Rank inventory items
POST
header
AuthorizationBearer <JWT>Preferred API authentication. Use a JWT with the api audience.
application/json- body
scope?kind?soulfire.v1.InventoryRecommendationKindValue in
"INVENTORY_RECOMMENDATION_KIND_UNSPECIFIED""INVENTORY_RECOMMENDATION_KIND_TOOL""INVENTORY_RECOMMENDATION_KIND_MELEE_WEAPON""INVENTORY_RECOMMENDATION_KIND_ARMOR""INVENTORY_RECOMMENDATION_KIND_FOOD""INVENTORY_RECOMMENDATION_KIND_SCAFFOLD"selector?|nullareas?array<>targetBlock?|Required when kind is TOOL.
equipmentSlot?|Required when kind is ARMOR, such as "head", "chest", "legs", or "feet".
limit?integerDefaults to 10 and may not exceed 100.
Format
int64Range
0 <= value <= 4294967295preferHotbar?booleanAdds a small preference for already selectable hotbar items.
preferredEnchantmentIds?array<string>Adds a score bonus for each matching enchantment.
excludedEnchantmentIds?array<string>Removes candidates carrying any listed enchantment.
preferHighDurability?booleanPrefers a higher remaining durability ratio for damageable items.
Successful response.
application/json- response
recommendations?array<>revision?stringMatch
^(0|[1-9][0-9]*)$curl -X POST 'http://127.0.0.1:38765/v1/inventory:rank' \
-H 'Content-Type: application/json' \
-d '{
"kind": "INVENTORY_RECOMMENDATION_KIND_UNSPECIFIED",
"areas": [],
"limit": 0,
"preferHotbar": false,
"preferredEnchantmentIds": [],
"excludedEnchantmentIds": [],
"preferHighDurability": false
}'Example Response
{
"recommendations": [
{
"slot": {
"slot": 0,
"area": "INVENTORY_AREA_UNSPECIFIED",
"item": {
"itemId": "string",
"count": 0,
"maxStackSize": 0,
"damage": 0,
"maxDamage": 0,
"customName": {
"plainText": "string",
"json": "string"
},
"lore": [
{
"plainText": "string",
"json": "string"
}
],
"enchantments": [
{
"enchantmentId": "string",
"level": 0
}
],
"food": {
"nutrition": 0,
"saturationModifier": 0.1,
"canAlwaysEat": true,
"eatSeconds": 0.1
},
"tool": {
"toolTags": [
"string"
],
"defaultMiningSpeed": 0.1,
"harvestLevel": 0
},
"armor": {
"equipmentSlot": "string",
"defense": 0,
"toughness": 0.1,
"knockbackResistance": 0.1
},
"components": {},
"customDataNbt": "string",
"fingerprint": "string",
"potion": {
"potionId": "string",
"effects": [
{
"effectId": "string",
"amplifier": 0,
"durationTicks": 0,
"ambient": true,
"visible": true,
"showIcon": true
}
],
"color": 0
}
},
"mayPlace": true,
"mayPickup": true
},
"score": 0.1,
"factors": [
{
"name": "string",
"contribution": 0.1,
"detail": "string"
}
]
}
],
"revision": "string"
}Was this page helpful?
