3

Is there a meta API for StackExchange? I don't mean an API for accessing meta sites, but rather an API to get information about the API itself. What I'm looking for is something that I can call that will return the JSON describing the various object types, along these lines:

{
  "items" : [
    {
      "name" : "user",
      "fields" : {
        "user_id" : "integer",
        "user_type" : [
          "unregistered",
          "registered",
          "moderator",
          "does_not_exist"
        ],
        "creation_date" : "date",
        "display_name" : "string",
        ...
      },
    },
    ...
  ]
}

I seem to recall there being something like this for the 1.x API, but I could be mis-remembering things.

My framework currently has a lot of code mapping api keys ("creation_date", "display_name", etc) to their language-normalized form ("creationDate", "displayName", etc), and I'm looking for more ways to cut out a lot of the related boilerplate code. My hope is that an API like this could mean that my data model could just adapt itself to pretty much anything mostly automatically.

1 Answer 1

3

i have a doc scraper that produces json schema and smd. eventually it will be published as a service on SOAPI2.com, much the same way that soapi.info provides meta for v1.

but until then you can find the meta files here: https://github.com/bitpusher/SOAPI2/tree/master/src/SOAPI2.DocScraper/js

this meta is what i generate routes and model for soapi2 from, so i am pretty confident in it's accuracy.

the syntax of the json schema is augmented with SE specific keywords but it should be fairly easy to finger out. SMD was an abandoned spec by the author of json-schema (in favor of a more formal rest spec, json-link) that i have resurrected as it is more suitable to 'rpc' like wcf based 'rest-like' services such as SE and others. i have been planning for over a year to resubmit a spec to the standards committee but you know how i am....

until then, if you have any questions, email me.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .