<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.crafters.one/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GlowChad</id>
	<title>Crafters Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.crafters.one/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GlowChad"/>
	<link rel="alternate" type="text/html" href="https://wiki.crafters.one/wiki/Special:Contributions/GlowChad"/>
	<updated>2026-06-05T04:49:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.crafters.one/mediawiki/index.php?title=API_Usage&amp;diff=22736</id>
		<title>API Usage</title>
		<link rel="alternate" type="text/html" href="https://wiki.crafters.one/mediawiki/index.php?title=API_Usage&amp;diff=22736"/>
		<updated>2024-06-18T02:08:52Z</updated>

		<summary type="html">&lt;p&gt;GlowChad: /* Update top_players parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CraftersAPI Documentation =&lt;br /&gt;
&lt;br /&gt;
Welcome to the CraftersAPI documentation. This API allows players to access various statistics from the Crafters.one server . To use the API, you need to obtain an API key, which is given on request via tickets, and make requests to the endpoints provided.&lt;br /&gt;
&lt;br /&gt;
== Obtaining an API Key ==&lt;br /&gt;
&lt;br /&gt;
To interact with the CraftersAPI, you must have an API key. Open a ticket to request permission to use the API. Once permission is obtained; follow these steps to get your API key:&lt;br /&gt;
&lt;br /&gt;
1. &#039;&#039;&#039;In-Game Command&#039;&#039;&#039;: Use the command &amp;lt;code&amp;gt;/craftersapi new &amp;lt;NameOfAPIKey&amp;gt;&amp;lt;/code&amp;gt; in-game to generate a new API key.&lt;br /&gt;
&lt;br /&gt;
2. &#039;&#039;&#039;Viewing Keys&#039;&#039;&#039;: Use the command &amp;lt;code&amp;gt;/craftersapi keys&amp;lt;/code&amp;gt; to view your API keys.&lt;br /&gt;
&lt;br /&gt;
3. &#039;&#039;&#039;Cancelling a Key&#039;&#039;&#039;: Use the command &amp;lt;code&amp;gt;/craftersapi cancel &amp;lt;NameOfAPIKey&amp;gt;&amp;lt;/code&amp;gt; to cancel an existing API key.&lt;br /&gt;
&lt;br /&gt;
== Making Requests ==&lt;br /&gt;
&lt;br /&gt;
=== Base URL ===&lt;br /&gt;
&lt;br /&gt;
All API requests are made to the following base URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;https://crafters.one/api/v1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Authentication ===&lt;br /&gt;
&lt;br /&gt;
All requests to the API must include a valid API key. The API key should be included in the request headers with the key x-api-key.&lt;br /&gt;
&lt;br /&gt;
=== Rate Limiting ===&lt;br /&gt;
&lt;br /&gt;
The API is rate-limited to 600 requests per 10 minutes per API Key.&lt;br /&gt;
&lt;br /&gt;
== Endpoints ==&lt;br /&gt;
&lt;br /&gt;
== Get Player Stats ==&lt;br /&gt;
&lt;br /&gt;
==== Endpoint ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET /stats/players&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Headers ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;x-api-key&amp;lt;/code&amp;gt; (required): Your API key.&lt;br /&gt;
&lt;br /&gt;
==== Parameters ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;player&amp;lt;/code&amp;gt; (required): The UUID of the player whose stats you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
==== Example Request ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET https://crafters.one/api/v1/stats/players?player=PLAYER_UUID&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Response ====&lt;br /&gt;
&lt;br /&gt;
A successful request returns a JSON object containing the player&#039;s statistics. Example response:&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;animals_bred&amp;quot;: 172,&lt;br /&gt;
    &amp;quot;cake_slices_eaten&amp;quot;: 52,&lt;br /&gt;
    &amp;quot;damage_absorbed&amp;quot;: 649,&lt;br /&gt;
    &amp;quot;damage_dealt&amp;quot;: 1296101,&lt;br /&gt;
    &amp;quot;damage_dealt_absorbed&amp;quot;: 1061,&lt;br /&gt;
    &amp;quot;damage_dealt_resisted&amp;quot;: 0,&lt;br /&gt;
    &amp;quot;damage_resisted&amp;quot;: 17131,&lt;br /&gt;
    &amp;quot;damage_taken&amp;quot;: 241982,&lt;br /&gt;
    &amp;quot;deaths&amp;quot;: 44,&lt;br /&gt;
    &amp;quot;fish_caught&amp;quot;: 715,&lt;br /&gt;
    &amp;quot;is_online&amp;quot;: false,&lt;br /&gt;
    &amp;quot;join_date&amp;quot;: 1611876703869,&lt;br /&gt;
    &amp;quot;jumps&amp;quot;: 514088,&lt;br /&gt;
    &amp;quot;last_seen&amp;quot;: 1717894499615,&lt;br /&gt;
    &amp;quot;mob_kills&amp;quot;: 83480,&lt;br /&gt;
    &amp;quot;netherite_hoes_crafted&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;play_time&amp;quot;: 9566304,&lt;br /&gt;
    &amp;quot;player_kills&amp;quot;: 291,&lt;br /&gt;
    &amp;quot;score&amp;quot;: 100,&lt;br /&gt;
    &amp;quot;time_since_death&amp;quot;: 8611,&lt;br /&gt;
    &amp;quot;time_since_rest&amp;quot;: 8631,&lt;br /&gt;
    &amp;quot;username&amp;quot;: &amp;quot;Plexiate&amp;quot;,&lt;br /&gt;
    &amp;quot;uuid&amp;quot;: &amp;quot;34e9f59b-854d-4889-9b06-a862933c3c94&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Additional Information ====&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;animals_bred&#039;&#039;&#039;: The number of animals bred by the player.&lt;br /&gt;
* &#039;&#039;&#039;cake_slices_eaten&#039;&#039;&#039;: The number of cake slices eaten by the player.&lt;br /&gt;
* &#039;&#039;&#039;damage_absorbed&#039;&#039;&#039;: The total damage absorbed by the player.&lt;br /&gt;
* &#039;&#039;&#039;damage_dealt&#039;&#039;&#039;: The total damage dealt by the player.&lt;br /&gt;
* &#039;&#039;&#039;damage_dealt_absorbed&#039;&#039;&#039;: The total damage dealt by the player that was absorbed.&lt;br /&gt;
* &#039;&#039;&#039;damage_dealt_resisted&#039;&#039;&#039;: The total damage dealt by the player that was resisted.&lt;br /&gt;
* &#039;&#039;&#039;damage_resisted&#039;&#039;&#039;: The total damage resisted by the player.&lt;br /&gt;
* &#039;&#039;&#039;damage_taken&#039;&#039;&#039;: The total damage taken by the player.&lt;br /&gt;
* &#039;&#039;&#039;deaths&#039;&#039;&#039;: The number of times the player has died.&lt;br /&gt;
* &#039;&#039;&#039;fish_caught&#039;&#039;&#039;: The number of fish caught by the player.&lt;br /&gt;
* &#039;&#039;&#039;is_online&#039;&#039;&#039;: A boolean indicating if the player is currently online.&lt;br /&gt;
* &#039;&#039;&#039;join_date&#039;&#039;&#039;: The timestamp of when the player first joined the server.&lt;br /&gt;
* &#039;&#039;&#039;jumps&#039;&#039;&#039;: The number of jumps made by the player.&lt;br /&gt;
* &#039;&#039;&#039;last_seen&#039;&#039;&#039;: The timestamp of when the player was last seen online.&lt;br /&gt;
* &#039;&#039;&#039;mob_kills&#039;&#039;&#039;: The number of mobs killed by the player.&lt;br /&gt;
* &#039;&#039;&#039;netherite_hoes_crafted&#039;&#039;&#039;: The number of netherite hoes crafted by the player.&lt;br /&gt;
* &#039;&#039;&#039;play_time&#039;&#039;&#039;: The total playtime in seconds.&lt;br /&gt;
* &#039;&#039;&#039;player_kills&#039;&#039;&#039;: The number of other players the player has killed.&lt;br /&gt;
* &#039;&#039;&#039;score&#039;&#039;&#039;: The player&#039;s current score.&lt;br /&gt;
* &#039;&#039;&#039;time_since_death&#039;&#039;&#039;: The time in seconds since the player last died.&lt;br /&gt;
* &#039;&#039;&#039;time_since_rest&#039;&#039;&#039;: The time in seconds since the player last rested.&lt;br /&gt;
* &#039;&#039;&#039;username&#039;&#039;&#039;: The player&#039;s username.&lt;br /&gt;
* &#039;&#039;&#039;uuid&#039;&#039;&#039;: The player&#039;s unique identifier.&lt;br /&gt;
&lt;br /&gt;
For a statistic such as &#039;&#039;&#039;join_date&#039;&#039;&#039; and &#039;&#039;&#039;last_seen&#039;&#039;&#039; you can use a tool such as [https://www.epochconverter.com/ Unix Time Converter] to get a date and time out of it.&lt;br /&gt;
&lt;br /&gt;
== Get World Stats ==&lt;br /&gt;
&lt;br /&gt;
==== Endpoint ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET /stats/world&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Headers ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;x-api-key&amp;lt;/code&amp;gt; (required): Your API key.&lt;br /&gt;
&lt;br /&gt;
==== Example Request ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET https://crafters.one/api/v1/stats/world&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Response ====&lt;br /&gt;
&lt;br /&gt;
A successful request returns a JSON object containing the player&#039;s statistics. Example response:&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;day_count_end&amp;quot;: 84978,&lt;br /&gt;
    &amp;quot;day_count_nether&amp;quot;: 84977,&lt;br /&gt;
    &amp;quot;day_count_overworld&amp;quot;: 16,&lt;br /&gt;
    &amp;quot;online_players&amp;quot;: [&lt;br /&gt;
        &amp;quot;Plexiate&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;time_of_day&amp;quot;: &amp;quot;day&amp;quot;,&lt;br /&gt;
    &amp;quot;total_players&amp;quot;: 865,&lt;br /&gt;
    &amp;quot;weather_overworld&amp;quot;: &amp;quot;clear&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Additional Information ====&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;day_count_end&#039;&#039;&#039;: The number of days that have passed in the End dimension.&lt;br /&gt;
* &#039;&#039;&#039;day_count_nether&#039;&#039;&#039;: The number of days that have passed in the Nether dimension.&lt;br /&gt;
* &#039;&#039;&#039;day_count_overworld&#039;&#039;&#039;: The number of days that have passed in the Overworld dimension.&lt;br /&gt;
* &#039;&#039;&#039;online_players&#039;&#039;&#039;: A list of players currently online.&lt;br /&gt;
* &#039;&#039;&#039;time_of_day&#039;&#039;&#039;: The current time of day in the game (e.g., &amp;quot;night&amp;quot;).&lt;br /&gt;
* &#039;&#039;&#039;total_players&#039;&#039;&#039;: The total number of players who have joined the server.&lt;br /&gt;
* &#039;&#039;&#039;weather_overworld&#039;&#039;&#039;: The current weather in the Overworld (e.g., &amp;quot;clear&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== Get Top Players ==&lt;br /&gt;
&lt;br /&gt;
==== Endpoint ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET /stats/top_players&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Headers ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;x-api-key&amp;lt;/code&amp;gt; (required): Your API key.&lt;br /&gt;
&lt;br /&gt;
==== Parameters ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;stat&amp;lt;/code&amp;gt; (required): The [https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Statistic.html#enum-constant-summary bukkit statistic] you want to retrieve.&lt;br /&gt;
* &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; (optional): The Block, Item, or Entity when using DROP, PICKUP, MINE_BLOCK, USE_ITEM, BREAK_ITEM, CRAFT_ITEM, KILL_ENTITY, ENTITY_KILLED_BY, or TARGET_HIT.&lt;br /&gt;
* &amp;lt;code&amp;gt;limit&amp;lt;/code&amp;gt; (optional): The number of top players requested to return in the list. This can be left off to only retrieve the number one player.&lt;br /&gt;
&lt;br /&gt;
==== Example Request ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;GET https://crafters.one/api/v1/stats/top_players?stat=STAT_HERE&amp;amp;type=TYPE_HERE&amp;amp;limit=10&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Response ====&lt;br /&gt;
&lt;br /&gt;
A successful request returns a JSON object containing the player&#039;s statistics. Example response:&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;statistic&amp;quot;: &amp;quot;CAKE_SLICES_EATEN&amp;quot;,&lt;br /&gt;
    &amp;quot;top_players&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;username&amp;quot;: &amp;quot;ShimmyMySherbet&amp;quot;,&lt;br /&gt;
            &amp;quot;uuid&amp;quot;: &amp;quot;892725c0-8f95-4561-bdf2-2d0ba15a4539&amp;quot;,&lt;br /&gt;
            &amp;quot;value&amp;quot;: 373&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;username&amp;quot;: &amp;quot;legowarrior779&amp;quot;,&lt;br /&gt;
            &amp;quot;uuid&amp;quot;: &amp;quot;3da89c7a-fe24-49e6-aacc-728e38fbcdaa&amp;quot;,&lt;br /&gt;
            &amp;quot;value&amp;quot;: 266&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;username&amp;quot;: &amp;quot;MommyTayy&amp;quot;,&lt;br /&gt;
            &amp;quot;uuid&amp;quot;: &amp;quot;fac7a21c-caed-4434-8733-e8ea1fe4d729&amp;quot;,&lt;br /&gt;
            &amp;quot;value&amp;quot;: 234&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;username&amp;quot;: &amp;quot;MerelyMiserable&amp;quot;,&lt;br /&gt;
            &amp;quot;uuid&amp;quot;: &amp;quot;3411710b-9cfc-4360-aa9a-db9137ea9a37&amp;quot;,&lt;br /&gt;
            &amp;quot;value&amp;quot;: 228&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;username&amp;quot;: &amp;quot;Cameron_TNT&amp;quot;,&lt;br /&gt;
            &amp;quot;uuid&amp;quot;: &amp;quot;9c2427cf-9cb1-405c-9a85-8f468e687ff5&amp;quot;,&lt;br /&gt;
            &amp;quot;value&amp;quot;: 168&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
&lt;br /&gt;
== Using Postman with CraftersAPI ==&lt;br /&gt;
&lt;br /&gt;
=== Step-by-Step Guide ===&lt;br /&gt;
&lt;br /&gt;
1. &#039;&#039;&#039;Install Postman&#039;&#039;&#039;: If you haven’t already, download and install Postman from [https://www.postman.com/downloads/ Postman’s official website].&lt;br /&gt;
&lt;br /&gt;
2. &#039;&#039;&#039;Open Postman&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
3. &#039;&#039;&#039;Create a New Request&#039;&#039;&#039;:&lt;br /&gt;
   - Click on the “New” button in the top left corner of the Postman interface.&lt;br /&gt;
   - Select “HTTP” from the menu.&lt;br /&gt;
&lt;br /&gt;
4. &#039;&#039;&#039;Set Up the Request&#039;&#039;&#039;:&lt;br /&gt;
   - In the new request window, select “GET” from the dropdown menu next to the URL field.&lt;br /&gt;
   - Enter the URL for the API endpoint you want to test. For example, to get player stats, enter:&lt;br /&gt;
     https://crafters.one/api/v1/stats/players&lt;br /&gt;
&lt;br /&gt;
5. &#039;&#039;&#039;Headers&#039;&#039;&#039;:&lt;br /&gt;
   - Click on the “Headers” tab below the URL field.&lt;br /&gt;
   - Add the required query parameters:&lt;br /&gt;
     - &#039;&#039;&#039;x-api-key&#039;&#039;&#039;: Your API key.&lt;br /&gt;
&lt;br /&gt;
6. &#039;&#039;&#039;Query Parameters&#039;&#039;&#039;:&lt;br /&gt;
   - Click on the “Params” tab below the URL field.&lt;br /&gt;
   - Add the required query parameters:&lt;br /&gt;
     - &#039;&#039;&#039;player&#039;&#039;&#039;: The UUID of the player whose stats you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
7. &#039;&#039;&#039;Send the Request&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
8. &#039;&#039;&#039;View the Response&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This documentation should help you get started with using the CraftersAPI. If you have any questions or encounter any issues please contact support@crafters.one or open a ticket for assistance.&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>GlowChad</name></author>
	</entry>
</feed>