Jump to content

API Documentation

From EverQuest Legends Wiki
Revision as of 10:05, 22 November 2026 by Maergoth (talk | contribs) (Document manual loot-rate priority and NPC-only percentage sample floor)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The EQLWiki API is available at https://eqlwiki.com/api.php. Tools may read, create and edit pages, preview wikicode and upload reviewed screenshots using normal MediaWiki accounts and permissions. No Eye of Zomm secret, special User-Agent identity, shared bot account or privileged proxy is required. Use an informative User-Agent and respect rate limits.

Page writes and observation uploads are separate. The standard action=edit creates or edits wiki pages with contributor attribution. action=eozobservations stores private attributed gameplay observations; it does not create pages, change drop lists or publish probabilities.

Discover the current API

  • API help and module parameters. An unavailable optional module returns an API error; do not assume source deployment activated its storage.
  • Read action=query&meta=siteinfo&siprop=general|extensions for the actual installed version/modules.
  • All examples use format=json&formatversion=2. Check JSON error/errors even when HTTP status is 200.
  • Follow Help:Contents and its current item, monster, zone and spell blueprints. Fetch revisions rather than embedding a stale blueprint forever. Resolve potential matches/redirects before creating another spelling. Monster spawn locations use the wiki/log order Y, X, Z; do not copy internal viewer world X,Y,Z values into that field.

Authentication

Interactive tools should use a dedicated cookie session and the normal login page. Credentials, cookies and CSRF tokens belong in the client’s private account/session store. Keep account, wiki origin and reviewed operation bound together. Log out/clear pending account authorization when the account changes.

For an interactive API login, first query meta=authmanagerinfo&amirequestsfor=login and meta=tokens&type=login, then use action=clientlogin and handle PASS, UI, REDIRECT and FAIL responses. Challenges and two-factor requirements must be presented to the human; do not bypass them. The live site exposes clientlogin and the username/password authentication request. Normal anti-abuse, confirmed-email, blocked-account and page-protection policies still apply.

For a user-operated command-line tool, Bot passwords provides MediaWiki’s scoped credentials when enabled for the account. Create one explicitly with only the rights needed; use action=login with that generated bot-password username/password, not a hard-coded owner password. The route and login API are present; this documentation does not claim a particular account has granted a bot password. Official login/clientlogin documentation. OAuth is not a required dependency and is not promised by this contract.

After login query action=query&meta=userinfo&uiprop=rights|blockinfo. Use the returned canonical account name in every write’s assert=user&assertuser=Name. Acquire a CSRF token using action=query&meta=tokens&type=csrf in the same session. Tokens are not substitutes for permissions. Handle badtoken by refreshing the token and rechecking the account/review; handle assertions/challenges by stopping the pending operation.

Query and preview

curl --get 'https://eqlwiki.com/api.php' \
  --data-urlencode 'action=query' --data-urlencode 'prop=info|revisions' \
  --data-urlencode 'titles=Thornstinger' --data-urlencode 'rvprop=ids|timestamp|content' \
  --data-urlencode 'rvslots=main' --data-urlencode 'curtimestamp=1' \
  --data-urlencode 'format=json' --data-urlencode 'formatversion=2'

# Preview only: does not save a page.
curl 'https://eqlwiki.com/api.php' \
  --data-urlencode 'action=parse' --data-urlencode 'title=Example item' \
  --data-urlencode 'text@reviewed-page.wiki' --data-urlencode 'contentmodel=wikitext' \
  --data-urlencode 'prop=text|modules' --data-urlencode 'format=json' \
  --data-urlencode 'formatversion=2'

Missing pages have missing: true; invalid titles are different from missing titles. Follow redirects deliberately. Search with list=prefixsearch / list=search, namespace 0 for game articles. A fuzzy match is a suggestion, not permission to merge two entities. Read the whole current source before constructing a focused patch and preview every affected page.

Create and update pages

action=edit is the supported, attributed write API for EQLWiki and other clients. POST the exact reviewed text. Never send both createonly and nocreate.

  • Create: createonly=1 after verifying the intended canonical title is missing. If it appears meanwhile, stop and review it.
  • Update: nocreate=1&baserevid=REVIEWED_REVISION, plus the query’s starttimestamp. Preserve unrelated prose and choose the correct normal/raid template. Do not treat an edit conflict as permission to overwrite the latest page.
  • Include assert=user, assertuser, token and a useful summary. Respect errors such as editconflict, articleexists, missingtitle, protectedpage, permissiondenied, assertuserfailed, badtoken, ratelimited and captcha/challenge responses. Do not request a bot flag to avoid ordinary review.
  • A successful response has edit.result=Success; nochange can be legitimate. Record returned revisions. A network timeout after POST has an unknown result. Read the page and reconcile the exact reviewed change before retrying.
  • Multi-page changes are not atomic. Persist per-page status and the reviewed before/after source. Retry only unfinished pages with their original guards; reconcile successful/unknown pages first. An item source, monster loot list, zone references and missing spell page may require distinct reviewed edits.

This curl update assumes a cookie file from a completed login, an account name, a newly acquired CSRF token and the revision/timestamp from the query above. Protect the cookie file and environment; do not log them.

curl --cookie private-cookies.txt 'https://eqlwiki.com/api.php' \
  --data-urlencode 'action=edit' --data-urlencode 'title=Reviewed page title' \
  --data-urlencode 'text@reviewed-page.wiki' --data-urlencode 'nocreate=1' \
  --data-urlencode "baserevid=$REVIEWED_REVISION" \
  --data-urlencode "starttimestamp=$REVIEW_STARTED_AT" \
  --data-urlencode 'assert=user' --data-urlencode "assertuser=$WIKI_USER" \
  --data-urlencode "token=$CSRF_TOKEN" --data-urlencode 'summary=Add reviewed source evidence' \
  --data-urlencode 'format=json' --data-urlencode 'formatversion=2'
# For creation, replace nocreate/baserevid with createonly=1.

Python example (requires requests): credentials are prompted, cookie session stays in memory. Both create/update methods deliberately use reviewed local files; running either performs a real edit under your account.

import getpass
from pathlib import Path
import requests

API = "https://eqlwiki.com/api.php"
s = requests.Session()
s.headers["User-Agent"] = "MyEQLWikiTool/1.0 (operator contact)"

def api(post=False, **params):
    params.update(format="json", formatversion=2)
    response = (s.post(API, data=params, timeout=30) if post
                else s.get(API, params=params, timeout=30))
    response.raise_for_status()
    value = response.json()
    if "error" in value or "errors" in value:
        raise RuntimeError(value.get("error", value.get("errors")))
    return value

login_token = api(action="query", meta="tokens", type="login")["query"]["tokens"]["logintoken"]
result = api(True, action="login", lgname=input("Bot-password username: "),
             lgpassword=getpass.getpass("Scoped bot password: "), lgtoken=login_token)
if result.get("login", {}).get("result") != "Success":
    raise RuntimeError("Login not completed; use the normal interactive login/challenge flow")
user = api(action="query", meta="userinfo", uiprop="rights|blockinfo")["query"]["userinfo"]
if user.get("anon") or user.get("temp") or user.get("blockid"):
    raise RuntimeError("A named, unblocked account is required")

def reviewed_write(title, source_file, expected_revision):
    state = api(action="query", prop="info|revisions", titles=title,
                rvprop="ids|timestamp|content", rvslots="main", curtimestamp=1)
    page = state["query"]["pages"][0]
    if page.get("invalid") or page.get("redirect"):
        raise RuntimeError("Resolve this title before review")
    revision = page.get("revisions", [{}])[0].get("revid", 0)
    if revision != expected_revision:
        raise RuntimeError("Page changed since review")
    token = api(action="query", meta="tokens", type="csrf",
                assertuser=user["name"], **{"assert": "user"})["query"]["tokens"]["csrftoken"]
    guards = {"createonly": 1} if expected_revision == 0 else {"nocreate": 1, "baserevid": revision}
    return api(True, action="edit", title=page["title"],
               text=Path(source_file).read_text(encoding="utf-8"),
               token=token, assertuser=user["name"], starttimestamp=state["curtimestamp"],
               summary="Reviewed contribution from MyEQLWikiTool", **{"assert": "user"}, **guards)

# Explicit calls after human review; uncomment only the intended operation:
# reviewed_write("New canonical title", "new-page.wiki", 0)
# reviewed_write("Existing canonical title", "updated-page.wiki", 123456)

Screenshots and icons

Use action=upload with multipart file, CSRF token and the same account assertions. Choose a new unique filename; do not ignore overwrite/duplicate/license warnings automatically. Review the image, attribution, caption and applicable license before upload. Describe game screenshots accurately; do not claim ownership of game artwork. On an unknown response, query prop=imageinfo&iiprop=sha1|user and reconcile the expected file before retrying. Only after confirmation should a page edit add the reviewed File: link. A failed later page edit must not cause another upload.

Existing wiki icon filenames/IDs are canonical. Use the existing blueprint/icon finder and known item_ID.png files; icon matching suggestions still require review. Do not upload a screenshot crop over an existing icon. Do not upload continuous screen recordings, logs, account information or unrelated desktop pixels.

EQL metadata and blueprints

action=eqlmetadata is a read-only POST with titles=Title One|Title Two, capped at the configured limit (normally 500). It returns eraRevision, revision-aware pages and this documentation link. It does not create/edit pages or establish an item’s base statistics.

Read Help:Contents through revisions, parse and normal article source APIs. Item hover consumers must preserve Itempage/Itembox, onlyinclude and canonical title contracts. A tiered item screenshot is not verified tier 0 data. Character sheet exports use Template:Character sheet and Template:Character sheet item plus the supported skin module; preview and check those capabilities before sharing. New Character shares belong on the authenticated user’s own User page, preserving other content and characters.

Private kill/loot observations: schema 1

Production status and storage (2026-11-21)

As of 2026-11-21, production eqlwiki.com has EQLClientData 1.5.0 observation storage and cumulative drop totals installed and enabled. The three authoritative observation tables are:

  • eql_eoz_observations: accepted kill/loot events, attributed to the authenticated wiki actor, with normalized source provenance and separate observed/received times.
  • eql_eoz_batches: attributed batch receipts and retry/deduplication records.
  • eql_eoz_state: storage counters used to enforce bounded collection.

Eye of Zomm keeps a persistent local outbox. Eye of Zomm 1.0.13 and later start a paced background drain after startup or wiki login when collection is enabled, newest observed timestamps first; interruptions preserve pending records and immutable batches. Login inside EoZ is required; browser login is a different session. The server persists accepted batches immediately in a transaction; it does not wait for a server job. This stores observations, not a raw log archive or an edited article drop list.

Version 1.4 defaults to 120 new batches per account/hour with no lifetime entry or receipt quota. The 100-event request size is a batch boundary, not a backlog cap: send further batches until the queue is empty, resuming after backoff. Positive operator-configured emergency capacity bounds still return explicit errors and never evict data. Call the authenticated status operation below for current enabled, available and limits.

Availability and authentication

The module remains disabled by default in other environments until its own schema and configuration are installed; a source deployment alone does not activate storage. It uses named, unblocked, confirmed-email accounts with eoz-submit-observations. A scoped bot password can request the separate eozobservations grant; this does not grant page editing or elevated permissions. Call authenticated CSRF-protected POST action=eozobservations&operation=status first. Its inner response contains schemaVersion:1, enabled, available, account:{id,name} and limits. Unavailable storage is a reason to retain the local outbox, not discard it.

Submit form fields action=eozobservations, operation=submit, batch=JSON, token, assert=user, assertuser. Batch JSON is:

{"schemaVersion":1,"batchId":"batch_20261024_001","clientVersion":"MyTool/1.0","events":[
 {"id":"event_20261024_001","kind":"loot","observedAt":"2026-10-24T10:00:00.000Z",
  "server":"Example server","zone":"Example zone","npc":"","item":"Example item",
  "quantity":1,"tier":0,"instance":"unknown","sourceKind":"unknown"}
]}

Limits: 100 events / 262144 UTF-8 batch bytes / 4096 normalized event bytes; default 120 new batches per account/hour. IDs are 8–120 ASCII letters, digits, underscore or hyphen. Each event permits only id, kind, observedAt, server, zone, zoneTitle, npc, npcTitle, item, itemTitle, quantity, tier, instance, sourceKind, sourceToken, sessionToken, sequence, catalogVersion and optional characterName. Optional canonical titles are main-namespace titles, without markup. Names/titles are at most 230 characters, server 80, catalogVersion 120; optional opaque source/session tokens are 1–120 ASCII ID characters. No raw chat/log lines, file paths, screenshots or coordinates are accepted.

Send optional characterName only with explicit consent to publish the configured character name, and only when authenticated status advertises limits.optionalEventFields:["characterName"]. It is 1–120 Unicode characters, without controls, paths or URLs. A parsed log name or wiki account must not silently become attribution. Omit the field when unavailable; adding a default null changes historical hashes. Old observations remain unnamed and immutable.

Kind is kill or loot. A kill requires npc, no item, quantity 1 and sourceKind kill-line. Loot requires item, quantity 1–1000, tier unknown/null or 0–10. SourceKind is explicit-corpse, explicit-source, recent-kill, encounter-target or unknown; attributed sources require npc. Instance is normal, raid or unknown. Sequence is an optional nonnegative safe integer. UTC observedAt accepts seconds or exactly three fractional digits, may be old for offline delivery, and cannot be more than five minutes in the server’s future. Observed and received times are stored separately.

The response is wrapped in eozobservations:

{"schemaVersion":1,"batchId":"batch_20261024_001","account":{"id":123,"name":"Example"},
 "accepted":["event_20261024_001"],"duplicates":[],"conflicts":[],"rejected":[],
 "receivedAt":"2026-10-24T10:01:00Z",
 "limits":{"events":100,"bytes":262144,"eventBytes":4096,"hourlyBatches":120,"optionalEventFields":["characterName"]}}

Each valid input ID must appear exactly once across accepted, duplicates, conflicts or rejected; rejected entries are objects {id,code}. Verify the batch and account before acknowledging anything. Delete local pending events only for accepted/duplicates. Reusing an actor/event ID with the same normalized payload yields duplicate; changed payload yields conflict and never overwrites the stored event. Exact batch retries are safe; do not generate new IDs after an uncertain response. Same ID from another account remains a separate attributed report, not an additional proven world kill.

Errors include eoz-login, eoz-email, eoz-blocked, permissiondenied, eoz-disabled, eoz-schema-unavailable, eoz-invalid-batch, eoz-rate-limit, eoz-capacity and eoz-batch-conflict. Invalid envelope, duplicate IDs within a batch or oversize batch reject the batch; valid peers may survive an individual event rejection. Configured emergency capacity bounds never silently evict stored observations. Keep failed/conflicting data locally for review and back off after rate/capacity errors.

Coverage and denominators are unknown: logging can begin/end mid-session, sources can be inferred or unknown, kills/loot can be missed, groups/accounts can overlap, and instances differ. These are observations with provenance, not official drop rates. This endpoint does not publish a page, aggregate a probability or assert complete kill coverage.

Drop database and submission history

Special:DropDatabase browses eligible explicit-corpse observations by zone, NPC and item from their first report, with normal/raid/unknown instances kept separate. Server and tier are combined. Capability sentences such as “an area where Bind Affinity is allowed” are not zones and are excluded without rewriting private history.

Read-only GET action=eqldrops&format=json&formatversion=2 returns read schema 2. Optional filters are zone, npc, item, instance, q, offset and limit (1–500). Each entry appears with its first eligible accepted event (minimumReports:1). reportShare is the share of all eligible reported loot in the same zone/NPC/instance, including single reports in its denominator; it is not a per-kill drop chance.

The database and API show percentages from the first report. On NPC loot lists, item names also appear from their first report. An authored loot rate always stays as written and overrides the automatic percentage, regardless of observed sample count; ambiguous multi-percent legacy annotations are not reinterpreted. Where no authored rate exists, an observed percentage appears only after ten reports of that item in the same zone/NPC/instance. All eligible reports remain in the denominator, including items below this display floor. Ten reports do not establish statistical confidence, distinct kills or independent contributors. This NPC-only display rule does not change API fields, stored observations or submission history.

When cumulative projection tables have been separately installed and backfilled, historyMode=cumulative, cumulativeStatus=ready, windowed=false and windowLimit=null identify all-history totals without a lifetime entry cutoff. New accepted observations update these derived totals in their original ingestion transaction. Before installation or during incomplete backfill, historyMode=recent-window and cumulativeStatus=not-installed|backfilling identify the existing recent received-report view; its maximum 100000 loot-candidate boundary is disclosed by windowed and the browser warning. Source deployment alone does not install schema or run backfill. No private observations or receipt hashes are rewritten.

Expand an entry in the browser, or GET action=eqldrops&detail=ENTRY_ID&snapshot=TOKEN&offset=0&limit=25 for up to 50 individual submissions. Use the entryId and snapshot from the same current summary. Public groups can be expanded from their first eligible report; entries outside the summary's public membership and stale snapshots are refused. Details allow only observedAt, server receivedAt, quantity, source category and optional consented characterName. Names are self-reported; older entries show Not provided. Wiki account names, actor/event/session identifiers and raw logs are never public.

Cumulative reads use indexed aggregate and bounded LIMIT/OFFSET queries, not a per-request raw-history scan. All retained eligible reports contribute to the totals; bounded page sizes and native-integer offset limits remain. Deep offsets traverse the matching index; out-of-range offsets return an empty page before the SQL page query. Public filters allow 256 codepoints for exact normalized titles; ingestion still accepts 230 input codepoints. Five-minute snapshots cache only the displayed entries' count/revision boundaries and require persistent shared WAN cache across requests. New observations cannot alter an open snapshot's submission membership. If snapshot caching fails, detailsAvailable=false leaves totals usable while the browser disables expansion. An expired/evicted token returns eqldrops-detail-stale; reload the summary. Schema 2 and existing browser/native history routes are unchanged.

Further references