{"id":146093,"date":"2026-06-08T20:58:39","date_gmt":"2026-06-08T17:58:39","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/spark-web-api\/"},"modified":"2026-06-08T20:58:39","modified_gmt":"2026-06-08T17:58:39","slug":"spark-web-api","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/spark-web-api\/","title":{"rendered":"Spark Web API"},"content":{"rendered":"<p># Spark Web API<\/p>\n<p>A small plugin that will host a Web API for Spark.<\/p>\n<p>This plugin is made for Paper. You are free to fork<br \/>\nthis on GitHub and port this to other mod loaders.<\/p>\n<p>This README is a simplified version of the Project&#8217;s GitHub README.<\/p>\n<p>## Installation<br \/>\nFirst, Install Spark to your Paper server.<br \/>\nEven though Paper servers for Minecraft 1.21 and up<br \/>\nhas Spark built-in, a standalone plugin version is<br \/>\nrequired for this plugin.<\/p>\n<p>Then, Install Spark Web API. You generally would download<br \/>\nthe JAR with -all at the end of the file name.<\/p>\n<p>When starting your server, Please remember to set the<br \/>\n`paper.preferSparkPlugin` system property to `true`<\/p>\n<p>Here&#8217;s an example on how to do so:<br \/>\n&#8220;`<br \/>\njava -Dpaper.preferSparkPlugin=true -jar paper-1.21-129.jar<br \/>\n&#8220;`<\/p>\n<p>## Configuration<br \/>\nWhen starting the server for the first time with the<br \/>\nplugin, The plugin will generate a config file.<br \/>\nThe config file allows you to change the port of the<br \/>\nserver, which routes are enabled, and add additional<br \/>\nheaders to responses.<\/p>\n<p>&#8220;`yaml<br \/>\nport: 3000<br \/>\nroutes:<br \/>\n  tps: true<br \/>\n  mspt: true<br \/>\n  sys_cpu: false<br \/>\n  proc_cpu: false<br \/>\n  gc: false<br \/>\nheaders:<br \/>\n  enabled: false<br \/>\n&#8220;`<\/p>\n<p>## API paths<br \/>\n### \/api\/tps<br \/>\nReturn the TPS of the past 10 seconds, 1 minute,<br \/>\n5 minutes, and 15 minutes.<\/p>\n<p>Example Response:<br \/>\n&#8220;`json<br \/>\n{<br \/>\n  &#8220;tenSeconds&#8221;: 19.999926688268733,<br \/>\n  &#8220;oneMinute&#8221;: 20.000035730063832,<br \/>\n  &#8220;fiveMinutes&#8221;: 20.00000458740105,<br \/>\n  &#8220;fifteenMinutes&#8221;: 19.94021043987079<br \/>\n}<br \/>\n&#8220;`<\/p>\n<p>This route will return 500 Internal Server Error if Spark<br \/>\ncannot get the TPS of the server.<\/p>\n<p>### \/api\/mspt<br \/>\nReturns the MSPT value for the past 10 seconds and<br \/>\n1 minute.<\/p>\n<p>Example Response:<br \/>\n&#8220;`json<br \/>\n{<br \/>\n  &#8220;tenSeconds&#8221;: {<br \/>\n    &#8220;min&#8221;: 6.523605,<br \/>\n    &#8220;max&#8221;: 2692.747083,<br \/>\n    &#8220;mean&#8221;: 66.92731750515465,<br \/>\n    &#8220;median&#8221;: 23.108289<br \/>\n  },<br \/>\n  &#8220;oneMinute&#8221;: {<br \/>\n    &#8220;min&#8221;: 6.523605,<br \/>\n    &#8220;max&#8221;: 2692.747083,<br \/>\n    &#8220;mean&#8221;: 66.92731750515465,<br \/>\n    &#8220;median&#8221;: 23.108289<br \/>\n  }<br \/>\n}<br \/>\n&#8220;`<\/p>\n<p>This route will return 500 Internal Server Error if Spark<br \/>\ncannot get the MSPT of the server.<\/p>\n<p>### \/api\/gc<\/p>\n<p>Returns the information about the Garbage Collector.<\/p>\n<p>Example Response:<br \/>\n&#8220;`json<br \/>\n{<br \/>\n  &#8220;G1 Young Generation&#8221;: {<br \/>\n    &#8220;name&#8221;: &#8220;G1 Young Generation&#8221;,<br \/>\n    &#8220;frequency&#8221;: 22328,<br \/>\n    &#8220;avgTime&#8221;: 81,<br \/>\n    &#8220;totalCollections&#8221;: 3,<br \/>\n    &#8220;totalTime&#8221;: 243<br \/>\n  },<br \/>\n  &#8220;G1 Old Generation&#8221;: {<br \/>\n    &#8220;name&#8221;: &#8220;G1 Old Generation&#8221;,<br \/>\n    &#8220;frequency&#8221;: 0,<br \/>\n    &#8220;avgTime&#8221;: 0,<br \/>\n    &#8220;totalCollections&#8221;: 0,<br \/>\n    &#8220;totalTime&#8221;: 0<br \/>\n  }<br \/>\n}<br \/>\n&#8220;`<\/p>\n<p>### \/api\/cpu\/sys<\/p>\n<p>Returns the system CPU usage in percentage.<\/p>\n<p>Example Response:<br \/>\n&#8220;`json<br \/>\n{<br \/>\n  &#8220;tenSeconds&#8221;: 0.20461582280862525,<br \/>\n  &#8220;oneMinute&#8221;: 0.31800215079510524,<br \/>\n  &#8220;fifteenMinutes&#8221;: 0.39118254849183964<br \/>\n}<br \/>\n&#8220;`<\/p>\n<p>### \/api\/cpu\/proc<\/p>\n<p>Returns the Minecraft process CPU usage in percentage.<\/p>\n<p>Example Response:<br \/>\n&#8220;`json<br \/>\n{<br \/>\n  &#8220;tenSeconds&#8221;: 0.025064927938294894,<br \/>\n  &#8220;oneMinute&#8221;: 0.030417615615548597,<br \/>\n  &#8220;fifteenMinutes&#8221;: 0.06684861042724896<br \/>\n}<br \/>\n&#8220;`<\/p>\n<p>## License<br \/>\nThis plugin is licensed under the MIT License.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A Web API for Spark<\/p>\n","protected":false},"featured_media":0,"template":"","meta":{"_minecraft_slug":"spark-web-api","_minecraft_project_id":"nQIOXgCN","_minecraft_author":"lines-of-codes","_minecraft_license":"MIT","_minecraft_downloads":1181,"_minecraft_follows":1,"_minecraft_client_side":"unsupported","_minecraft_server_side":"required","_minecraft_storage_type":"zip","_minecraft_archive_name":"spark-web-api.zip","_minecraft_size_bytes":23538546,"_minecraft_version_count":6,"_minecraft_updated_at":"2026-05-16T08:05:09.023401Z","_minecraft_date_created":"2024-04-08T07:18:03.636430Z","_minecraft_date_modified":"2026-03-07T06:14:05.968788Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/spark-web-api","_minecraft_icon_attachment_id":0,"_minecraft_imported_at":"2026-06-08T17:58:40+00:00","_minecraft_import_hash":"2022987707bc6c20086581ac6aa7dd03","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[873,127,92],"mod_loader":[132],"minecraft_version":[94,62,37,41],"class_list":["post-146093","mod","type-mod","status-publish","hentry","mod_category-library","mod_category-paper","mod_category-utility","mod_loader-paper","minecraft_version-1-20-4","minecraft_version-1-21","minecraft_version-1-21-1","minecraft_version-1-21-11"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spark Web API - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/spark-web-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spark Web API - Minecraft\" \/>\n<meta property=\"og:description\" content=\"A Web API for Spark\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/spark-web-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/spark-web-api\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/spark-web-api\\\/\",\"name\":\"Spark Web API - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"datePublished\":\"2026-06-08T17:58:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/spark-web-api\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/spark-web-api\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/spark-web-api\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Spark Web API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spark Web API - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/spark-web-api\/","og_locale":"en_US","og_type":"article","og_title":"Spark Web API - Minecraft","og_description":"A Web API for Spark","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/spark-web-api\/","og_site_name":"Minecraft","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/spark-web-api\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/spark-web-api\/","name":"Spark Web API - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"datePublished":"2026-06-08T17:58:39+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/spark-web-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/spark-web-api\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/spark-web-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"Spark Web API"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/146093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=146093"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=146093"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=146093"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=146093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}