Auto-updated API Dump / Reflection Metadata module

By default, Roblox doesn’t provide API Dump / Reflection Metadata information to us within Roblox. This can be problematic for plugins that need it, as they either have to be manually updated every time one of these changes, or download the information through HttpService, which requires developers to toggle it on in every place they want to use the plugin in.

I decided to write a bot to automatically upload ReflectionMetadata, the API Dump, and class icons to Roblox whenever it updates, as there are a number of cool existing and potential plugins that need this information E.g.:

You can now access this information by requiring a public module from the site (InsertService was not an option as it disallows inserting scripts). As per woot3’s suggestion, the API dump and ReflectionMetadata are provided in the exact same format as the official API dump and ReflectionMetadata xml file. You can write your own wrapper to change the format of the data so it’s easier to use, and I may provide a separate module in the future that does this for you out of the box.

Example Code:

local info = require(2247441113)

local classIcon20AssetId = info.ClassIcons[20]
print(classIcon20AssetId)
=> 2254548328

local instanceApiInfo = info.ApiDump.Classes[1]
print(instanceApiInfo.Superclass)
=> <<<ROOT>>>

local reflectionInfo = info.ReflectionMetadata
for _,classInfo in pairs(reflectionInfo.Classes) do
    print(classInfo.Name)
end
=> BindableFunction, etc
33 Likes

What can you even use reflection metadata for?

Some use cases are given in the bullet list, in case you missed it.

Does your bot auto upload new instance icons? The current system I use for my plugin uses @Anaminus’ sprite sheet from his API websites GitHub, paired with his GitHub repository’s json list of updated instance info. If yours uploads new icons when new instances come out I might switch over

Yes, it uploads new icons whenever Roblox adds them, as well if any existing icons are updated (e.g. shirts/pants)

3 Likes

Oh that’s cool!! I might port over when I get the chancr

Can it have icons as a sprite sheet including coordinates too?

What do you recommend is the best way to pass this data to the client?

I think you can require public module ids on the client. If not then you can insert it with InsertService on game start up or you should be able to pass the data from the server without any modifications.

Even if it is possible, inserting models through the client is bad practice – you should insert on the server and then only pass the data you care about to the client.

What’s wrong with inserting this module on server start up and requiring it on the client? It’s not anything with sensitive data. It’s just an API dump. Doing extra work to get the data to the client via Remotes sounds like a waste of time when the data is already in an easy-to-consume format.

I think inserting models should generally be avoided anyway, and usually what you’re suggesting is the best way to do it, but I don’t think that should apply as an absolute rule to all situations.

1 Like

How can you insert on the server in a group game? I added the model into my inventory and I still got errors for “Asset is not trusted for this place” even though I am the group owner

I’m not sure if there’s a way to do that. :man_shrugging: If you really need the whole API dump on the client then you might have to use remotes. The API dump is in a fairly straightforward format though so you should be able to just pass the module data from require into a remote and receive it on the client, assuming the data isn’t too much to send.

1 Like

Here’s a small example place: ApiDumpOnClient.rbxl (25.4 KB)

As long as you require ApiDump on the server (ideally near startup) then you can call ApiDump on the client at any time and it’ll get a copy of the API Dump.

1 Like

Why do you have the double check?
if game:GetService('RunService'):IsClient() and not game:GetService('RunService'):IsServer() then

I’m still running with Accurate Play Solo off, and with Accurate Play Solo off both IsClient and IsServer return true.

1 Like

How can you tell the difference between a property v.s. a function and etc… As I’m trying to get the properties of a part

1 Like

Out of curiosity, is this still being kept up to date? I was thinking of using it for some stuff.

Nope, Roblox killed bots which broke the automatic part of this.

2 Likes

Will you attempt to make a fix for this or is this module now “dead”?