
{
  "service": "rd.pepega.pw",
  "version": 1,
  "language": "en",
  "translation": "/api/v1",
  "description": "Rust dumps: classes, fields and offsets. Read only, no sign-in.",
  "names": {
    "original_name": "The very first name, before any renaming. In an obfuscated build it is a %-string, and dumps line up by it",
    "readable_name": "The name today: from the clean build, the forum or a maintainer. This is what people see"
  },
  "endpoints": [
    {
      "method": "GET",
      "path": "/api/v1",
      "description": "This description",
      "parameters": [
      ]
    },
    {
      "method": "GET",
      "path": "/api/v1/en",
      "description": "The same in Russian at /api/v1",
      "parameters": [
      ]
    },
    {
      "method": "GET",
      "path": "/api/v1/dumps",
      "description": "Which dumps exist and how they differ",
      "parameters": [
      ]
    },
    {
      "method": "GET",
      "path": "/api/v1/search",
      "description": "Search for classes, fields and offsets. Classes match by name, fields by name and type, offsets by value",
      "parameters": [
        {
          "name": "dump",
          "values": "\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e | required",
          "description": "dump key from /dumps"
        },
        {
          "name": "q",
          "values": "\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e | required",
          "description": "what to look for: BasePlayer, eyes, 0x708"
        },
        {
          "name": "in",
          "values": "classes | fields | offsets | all",
          "description": "where to look, all by default"
        },
        {
          "name": "limit",
          "values": "1..500",
          "description": "how many hits, 50 by default"
        }
      ]
    },
    {
      "method": "GET",
      "path": "/api/v1/class",
      "description": "Everything about a class. Sections come on request: a class may have thousands of methods, no need to haul them every time",
      "parameters": [
        {
          "name": "dump",
          "values": "\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e | required",
          "description": "dump key from /dumps"
        },
        {
          "name": "name",
          "values": "\u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430 | class name",
          "description": "full or short, for example BasePlayer"
        },
        {
          "name": "type_def_index",
          "values": "\u043d\u043e\u043c\u0435\u0440 \u0442\u0438\u043f\u0430 | type number",
          "description": "instead of name, when it is known"
        },
        {
          "name": "include",
          "values": "fields,methods,properties,events,interfaces,nested | all",
          "description": "what to return, fields by default"
        },
        {
          "name": "filter",
          "values": "\u0447\u0430\u0441\u0442\u044c \u0438\u043c\u0435\u043d\u0438 | part of a name",
          "description": "keep only members whose name contains it"
        }
      ]
    }
  ],
  "examples": [
    "/api/v1/dumps",
    "/api/v1/search?dump=main-remap&q=BasePlayer",
    "/api/v1/search?dump=main-remap&q=0x708&in=offsets",
    "/api/v1/class?dump=main-remap&name=BasePlayer",
    "/api/v1/class?dump=main-remap&name=BasePlayer&include=fields,methods&filter=health"
  ],
  "notes": [
    "The first request to a dump builds the index \u2014 a few seconds for half a gigabyte, after that answers are instant",
    "Offsets come back as strings, just like in the dump: 0x708",
    "An offset matches in any spelling: 0x708, 708, 0X0708",
    "count is how many were returned, total is how many were found",
    "A class may have thousands of methods: ask for them with filter"
  ]
}
