action=edit is at the heart of what we're asking of the Internet, yet the API documentation is minimalist. Starting with one concrete improvement, let's explain the possible result values and their structure. Study the source to determine the range of outputs.
Potential result values
- redirects: list of redirects created (TODO: how can more than one be created? With batched params??). Each list item has from and to element:
- from: source page title
- to: target page title
- edit: module result container
- result: one of,
- "Failure"
- "Success"
- new: Boolean true if this edit created a new page (absent otherwise).
- pageid: Edited page's numeric ID.
- title: Page title
- contentmodel: Content model name, e.g. "wikitext".
- nochange: Boolean true if no new revision was created (absent otherwise).
- oldrevid: Previous revision's numeric ID. Absent if there was no change created.
- newrevid: Newly created revision's numeric ID. Absent if there was no change created.
- newtimestamp: New page last modified time, as ISO 8601 timestamp. Absent if there was no change created.
- result: one of,
Extensions can add to the result and its structure! Those should be documented in a similar way, that can be included in the builtin help.
Response data for other APIs
In general, this is an under-documented aspect of our API. Return data should be documented for all API methods, even if it's just to explicitly say "returns no data". In future work, we could standardize result documentation to encourage adoption, like we do with overridden getAllowedParams. The work should be done on-wiki at first, and then integrated with the source code and samples.