미디어위키 API 도움말
이 페이지는 자동으로 생성된 미디어위키 API 도움말 문서입니다.
설명 문서 및 예시: https://www.mediawiki.org/wiki/API
메인 모듈
- 출처: MediaWiki
- 라이선스: GPL-2.0-or-later
상태: 이 페이지에 보이는 모든 기능은 정상적으로 작동하지만, API는 여전히 활발하게 개발되고 있으며, 언제든지 변경될 수 있습니다. 업데이트 공지를 받아보려면 mediawiki-api-announce 메일링 리스트를 구독하십시오.
잘못된 요청: API에 잘못된 요청이 전송되면 "MediaWiki-API-Error" 키가 포함된 HTTP 헤더가 전송되며 반환되는 헤더와 오류 코드의 값은 모두 동일한 값으로 설정됩니다. 자세한 정보에 대해서는 API:오류와 경고를 참조하십시오.
테스트하기: API 요청 테스트를 용이하게 하려면, Special:ApiSandbox를 보십시오.
- action
수행할 동작
- block
- 사용자를 차단합니다.
- bs-adminuser-store
- Lists all users from the database with additional sensitive data. Allows sorting, filtering and pagination. Implements ExtJS Store parameters.
- bs-avatars-tasks
- Uploading, generating and setting user avatars
- bs-category-store
- Lists all categories. Allows sorting, filtering and pagination. Implements ExtJS Store parameters.
- bs-category-treestore
- 특정 분류의 하위 분류를 나열합니다
- bs-checklist-available-options-store
- 체크리스트 틀의 사용 가능한 모든 옵션을 나열합니다. 정렬, 필터링, 쪽 번호 매기기를 허용합니다. ExtJS Store 변수를 구현합니다.
- bs-checklist-tasks
- Provides operations for Checklist extension
- bs-checklist-template-store
- 유효한 체크리스트 원본인 모든 틀을 나열합니다. 정렬, 필터링, 쪽 번호 매기기를 허용합니다. ExtJS Store 변수를 구현합니다.
- bs-configmanager-store
- 스토어 관리
- bs-configmanager-tasks
- 태스크 관리
- bs-contextmenu-tasks
- Provides the context menu items in context
- bs-dashboards-store
- Lists all available portlets
- bs-dashboards-tasks
- 대시보드 설정을 저장합니다
- bs-dashboards-widgets-tasks
- Returns content for some dashboard widgets
- bs-filebackend-store
- 파일 백엔드로부터 모든 파일을 나열합니다. 정렬, 필터링, 쪽 번호 매기기를 허용합니다. ExtJS Store 변수를 구현합니다.
- bs-group-store
- Lists all groups except $wgImplicitGroups. Allows sorting, filtering and pagination. Implements ExtJS Store parameters.
- bs-groupmanager
- Provides the tasks for the extension GroupManager.
- bs-insertfile-license-store
- InsertFile 확장 기능의 라이선스를 나열합니다.
- bs-insertmagic-data-store
- InsertMagic 대화상자의 모든 항목을 나열합니다
- bs-interwiki-store
- 모든 인터위키 링크를 나열합니다. 정렬, 필터링, 쪽 번호 매기기를 허용합니다. ExtJS Store 변수를 구현합니다.
- bs-interwikilinks-tasks
- Provides the tasks for the extension InterWikiLinks.
- bs-mypageassignment-store
- 현재 사용자에 할당된 문서를 반환합니다
- bs-namespace-store
- Lists all namespaces and arbitrary configuration. Allows sorting, filtering and pagination. Implements ExtJS Store parameters.
- bs-namespace-tasks
- 이름공간 구성의 수정을 허용합니다.
- bs-namespacecss-store
- Lists namespaces and their possible CSS source page. Implements ExtJS Store parameters.
- bs-pageaccess-store
- Control access on page level
- bs-pageassignable-store
- 할당된 사용자의 목록을 반환합니다
- bs-pageassignment-store
- Returns assignments of the specific page
- bs-pageassignment-tasks
- Get or edit the list of assignments for specific page
- bs-pagetemplates-store
- Lists all page templates. Allows sorting, filtering and pagination. Implements ExtJS Store parameters.
- bs-pagetemplates-tasks
- Allows manipulation of page templates
- bs-permissionmanager-tasks
- Provides tasks for the PermissionManager
- bs-ping-tasks
- Ping task that provides continuous exchange of data
- bs-readers-data-store
- 특정 페이지의 독자 정보를 가져옵니다.
- bs-readers-page-readers-store
- 모든 문서의 모든 독자를 가져옵니다
- bs-readers-users-store
- 특정 페이지의 모든 독자 정보를 가져옵니다.
- bs-recentchanges-store
- 최근의 모든 변경사항을 나열합니다. 정렬, 필터링, 쪽 번호 매기기를 허용합니다. 스토어 변수를 구현합니다.
- bs-role-permission-store
- Provide role description for the PermissionManager
- bs-rss-standards-pages-store
- Return List of available Pages for RSSFeeder
- bs-rssfeeder-tasks
- Provides common tasks for the RSSFeeder
- bs-smartlist-tasks
- API functions to serve portlet data for page and user statistics.
- bs-statistics-available-diagrams-store
- Provides a store with available diagrams
- bs-statistics-search-options-store
- Provides a store with available search options
- bs-statistics-tasks
- Provides common tasks for statistics
- bs-titlequery-store
- Lists page titles and (optionally) namespace prefixes based on a query term. Implements ExtJS Store parameters.
- bs-upload-license-store
- 파일 올리기를 위해 사용할 수 있는 모든 라이선스를 나열합니다
- bs-usagetracker-store
- Holds statistical data about extension use
- bs-user-store
- 데이터베이스로부터 모든 사용자를 나열합니다. 정렬, 필터링, 쪽 번호 매기기를 허용합니다. ExtJS Store 변수를 구현합니다.
- bs-usermanager-group-store
- BlueSpice를 위한 사용자 관리자 작업 API를 제공합니다.
- bs-usermanager-tasks
- Provides operations for Checklist extension
- bs-watchlist-store
- 모든 주시문서 목록 항목을 나열합니다. 정렬, 필터링, 쪽 번호 매기기를 허용합니다. 스토어 변수를 구현합니다.
- bs-wikipage-store
- 모든 위키 문서를 나열합니다. 정렬, 필터링, 쪽 번호 매기기를 허용합니다. ExtJS Store 변수를 구현합니다.
- bs-wikipage-tasks
- Provides common operations for WikiPages
- bs-wikisubpage-treestore
- 특정 위키 페이지의 하위 페이지를 나열합니다
- categorytree
- CategoryTree 확장 기능을 위한 내부 모듈입니다.
- changeauthenticationdata
- 현재 사용자의 인증 데이터를 변경합니다.
- checktoken
- action=query&meta=tokens의 토큰의 유효성을 확인합니다.
- clearhasmsg
- 현재 사용자의
hasmsg플래그를 비웁니다. - clientlogin
- 상호작용 플로우를 이용하여 위키에 로그인합니다.
- compare
- 두 문서 간의 차이를 가져옵니다.
- createaccount
- 새 사용자 계정을 만듭니다.
- cspreport
- 브라우저가 콘텐츠 보안 정책의 위반을 보고하기 위해 사용합니다. 이 모듈은 SCP를 준수하는 웹 브라우저에 의해 자동으로 사용될 때를 제외하고는 사용해서는 안 됩니다.
- delete
- 문서를 삭제합니다.
- echomarkread
- 현재 사용자의 알림을 읽은 것으로 표시합니다.
- echomarkseen
- 현재 사용자가 알림을 본 것으로 표시합니다.
- edit
- 문서를 만들고 편집합니다.
- emailuser
- 사용자에게 이메일을 보냅니다.
- embedvideo
- ⧼apihelp-embedvideo-summary⧽
- expandtemplates
- 위키텍스트 안에 모든 틀을 확장합니다.
- feedcontributions
- 사용자 기여 피드를 반환합니다.
- feedrecentchanges
- 최근 바뀜 피드를 반환합니다.
- feedwatchlist
- 주시문서 목록 피드를 반환합니다.
- filerevert
- 파일을 이전 판으로 되돌립니다.
- flickrblacklist
- Validate a Flickr URL by using the user ID (NSID) for blacklisting.
- help
- 지정된 모듈의 도움말을 표시합니다.
- imagerotate
- 하나 이상의 그림을 회전합니다.
- import
- 다른 위키나 XML 파일로부터 문서를 가져옵니다.
- linkaccount
- 서드파티 제공자의 계정을 현재 사용자와 연결합니다.
- login
- 로그인한 다음 인증 쿠키를 가져옵니다.
- logout
- 로그아웃하고 세션 데이터를 지웁니다.
- managetags
- 변경 태그에 관한 관리 작업을 수행합니다.
- mergehistory
- 문서 역사를 합칩니다.
- move
- 문서 이동하기.
- opensearch
- OpenSearch 프로토콜을 이용하여 위키를 검색합니다.
- options
- 현재 사용자의 환경 설정을 변경합니다.
- paraminfo
- API 모듈의 정보를 가져옵니다.
- parse
- 내용의 구문을 분석하고 파서 출력을 반환합니다.
- patrol
- 문서나 판을 점검하기.
- protect
- 문서의 보호 수준을 변경합니다.
- purge
- 주어진 제목을 위한 캐시를 새로 고침.
- query
- 미디어위키의 데이터 및 정보를 가져옵니다.
- removeauthenticationdata
- 현재 사용자의 인증 데이터를 제거합니다.
- resetpassword
- 비밀번호 재설정 이메일을 사용자에게 보냅니다.
- revisiondelete
- 판을 삭제하거나 되살립니다.
- rollback
- 문서의 마지막 편집을 취소합니다.
- rsd
- RSD (Really Simple Discovery) 스키마를 내보냅니다.
- setnotificationtimestamp
- 주시 중인 문서의 알림 타임스탬프를 업데이트합니다.
- setpagelanguage
- 문서의 언어를 변경합니다.
- stashedit
- 공유된 캐시에서 편집을 준비합니다.
- tag
- 개별 판이나 기록 항목에서 변경 태그를 추가하거나 제거합니다.
- unblock
- 사용자를 차단 해제합니다.
- undelete
- 삭제된 문서의 판을 복구합니다.
- unlinkaccount
- 현재 사용자에 연결된 타사 계정을 제거합니다.
- upload
- 파일을 업로드하거나 대기 중인 업로드의 상태를 가져옵니다.
- userrights
- 사용자의 그룹 권한을 변경합니다.
- validatepassword
- 위키의 비밀번호 정책에 근간하여 비밀번호를 확인합니다.
- watch
- 현재 사용자의 주시목록에서 문서를 추가하거나 제거합니다.
- tokens
- 구식입니다. 데이터 수정 작업을 위해 토큰을 가져옵니다.
- 다음 값 중 하나: block, bs-adminuser-store, bs-avatars-tasks, bs-category-store, bs-category-treestore, bs-checklist-available-options-store, bs-checklist-tasks, bs-checklist-template-store, bs-configmanager-store, bs-configmanager-tasks, bs-contextmenu-tasks, bs-dashboards-store, bs-dashboards-tasks, bs-dashboards-widgets-tasks, bs-filebackend-store, bs-group-store, bs-groupmanager, bs-insertfile-license-store, bs-insertmagic-data-store, bs-interwiki-store, bs-interwikilinks-tasks, bs-mypageassignment-store, bs-namespace-store, bs-namespace-tasks, bs-namespacecss-store, bs-pageaccess-store, bs-pageassignable-store, bs-pageassignment-store, bs-pageassignment-tasks, bs-pagetemplates-store, bs-pagetemplates-tasks, bs-permissionmanager-tasks, bs-ping-tasks, bs-readers-data-store, bs-readers-page-readers-store, bs-readers-users-store, bs-recentchanges-store, bs-role-permission-store, bs-rss-standards-pages-store, bs-rssfeeder-tasks, bs-smartlist-tasks, bs-statistics-available-diagrams-store, bs-statistics-search-options-store, bs-statistics-tasks, bs-titlequery-store, bs-upload-license-store, bs-usagetracker-store, bs-user-store, bs-usermanager-group-store, bs-usermanager-tasks, bs-watchlist-store, bs-wikipage-store, bs-wikipage-tasks, bs-wikisubpage-treestore, categorytree, changeauthenticationdata, checktoken, clearhasmsg, clientlogin, compare, createaccount, cspreport, delete, echomarkread, echomarkseen, edit, emailuser, embedvideo, expandtemplates, feedcontributions, feedrecentchanges, feedwatchlist, filerevert, flickrblacklist, help, imagerotate, import, linkaccount, login, logout, managetags, mergehistory, move, opensearch, options, paraminfo, parse, patrol, protect, purge, query, removeauthenticationdata, resetpassword, revisiondelete, rollback, rsd, setnotificationtimestamp, setpagelanguage, stashedit, tag, unblock, undelete, unlinkaccount, upload, userrights, validatepassword, watch, tokens 또는 alternative: block, bs-adminuser-store, bs-avatars-tasks, bs-category-store, bs-category-treestore, bs-checklist-available-options-store, bs-checklist-tasks, bs-checklist-template-store, bs-configmanager-store, bs-configmanager-tasks, bs-contextmenu-tasks, bs-dashboards-store, bs-dashboards-tasks, bs-dashboards-widgets-tasks, bs-filebackend-store, bs-group-store, bs-groupmanager, bs-insertfile-license-store, bs-insertmagic-data-store, bs-interwiki-store, bs-interwikilinks-tasks, bs-mypageassignment-store, bs-namespace-store, bs-namespace-tasks, bs-namespacecss-store, bs-pageaccess-store, bs-pageassignable-store, bs-pageassignment-store, bs-pageassignment-tasks, bs-pagetemplates-store, bs-pagetemplates-tasks, bs-permissionmanager-tasks, bs-ping-tasks, bs-readers-data-store, bs-readers-page-readers-store, bs-readers-users-store, bs-recentchanges-store, bs-role-permission-store, bs-rss-standards-pages-store, bs-rssfeeder-tasks, bs-smartlist-tasks, bs-statistics-available-diagrams-store, bs-statistics-search-options-store, bs-statistics-tasks, bs-titlequery-store, bs-upload-license-store, bs-usagetracker-store, bs-user-store, bs-usermanager-group-store, bs-usermanager-tasks, bs-watchlist-store, bs-wikipage-store, bs-wikipage-tasks, bs-wikisubpage-treestore, categorytree, changeauthenticationdata, checktoken, clearhasmsg, clientlogin, compare, createaccount, cspreport, delete, echomarkread, echomarkseen, edit, emailuser, embedvideo, expandtemplates, feedcontributions, feedrecentchanges, feedwatchlist, filerevert, flickrblacklist, help, imagerotate, import, linkaccount, login, logout, managetags, mergehistory, move, opensearch, options, paraminfo, parse, patrol, protect, purge, query, removeauthenticationdata, resetpassword, revisiondelete, rollback, rsd, setnotificationtimestamp, setpagelanguage, stashedit, tag, unblock, undelete, unlinkaccount, upload, userrights, validatepassword, watch, tokens
- 기본값: help
- format
출력값의 형식.
- 다음 값 중 하나: json, jsonfm, none, php, phpfm, rawfm, xml, xmlfm 또는 alternative: json, jsonfm, none, php, phpfm, rawfm, xml, xmlfm
- 기본값: jsonfm
- maxlag
최대 랙은 미디어위키가 데이터베이스 복제된 클러스터에 설치되었을 때 사용될 수 있습니다. 특정한 행동이 사이트 복제 랙을 유발할 때, 이 변수는 클라이언트가 복제 랙이 설정된 숫자 아래로 내려갈 때까지 기다리도록 지시합니다. 과도한 랙의 경우, maxlag 오류 코드와 $host 대기 중: $lag초 지연되었습니다 메시지가 제공됩니다.
매뉴얼: Maxlag 변수에서 더 많은 정보를 얻을 수 있습니다.- 유형: 정수
- smaxage
s-maxageHTTP 캐시 컨트롤 헤더를 설정합니다. 오류는 캐시되지 않습니다.- 유형: 정수
- 기본값: 0
- maxage
max-ageHTTP 캐시 컨트롤 헤더를 설정합니다. 오류는 캐시되지 않습니다.- 유형: 정수
- 기본값: 0
- assert
user 플래그가 설정되어 있다면 로그인 여부를 체크하며, bot 플래그가 설정되어 있다면 봇 사용자 권한이 설정되어 있는지 확인합니다.
- 다음 값 중 하나: user, bot 또는 alternative: user, bot
- assertuser
현재 사용자가 지명된 사용자인지 확인합니다.
- 유형: 사용자 이름
- requestid
주어진 요청 값은 응답에 포함됩니다. 요청을 구분하기 위해 사용될 수 있습니다.
- servedby
결과에 요청을 처리한 호스트네임을 포함합니다.
- 유형: 불리언 (자세한 정보)
- curtimestamp
결과의 타임스탬프를 포함합니다.
- 유형: 불리언 (자세한 정보)
- responselanginfo
uselang 및 errorlang에 사용되는 언어를 결과에 포함합니다.
- 유형: 불리언 (자세한 정보)
- origin
크로스 도메인 AJAX 요청 (CORS)을 사용하여 API에 접근할 때, 이것을 발신 도메인으로 설정하십시오. 모든 pre-flight 요청에 포함되어야 하며, 이에 따라 (POST 본문이 아닌) 요청 URI의 일부여야 합니다.
인증된 요청의 경우,
Origin헤더의 발신지들 중 하나와 정확히 일치해야 하므로 https://en.wikipedia.org 또는 https://meta.wikimedia.org와 같이 설정되어야 합니다. 이 변수가Origin헤더와 일치하지 않으면 403 응답이 반환됩니다. 이 변수가Origin헤더와 일치하고 발신지가 화이트리스트에 있을 경우Access-Control-Allow-Origin과Access-Control-Allow-Credentials헤더가 설정됩니다.인증되지 않은 요청의 경우, * 값을 지정하십시오. 이를 통해
Access-Control-Allow-Origin헤더가 설정되지만Access-Control-Allow-Credentials는false로 설정되어 모든 사용자 지정 데이터가 제한을 받게 됩니다.- uselang
메시지 번역을 위한 언어입니다. action=query&meta=siteinfo에 siprop=languages를 함께 사용하면 언어 코드의 목록을 반환하고, user를 지정하면 현재 사용자의 언어 환경 설정을 사용하며, content를 지정하면 이 위키의 콘텐츠 언어를 사용합니다.
- 기본값: user
- errorformat
경고 및 오류 텍스트 출력을 위해 사용할 형식입니다.
- plaintext
- HTML 태그가 제거되고 엔티티가 치환된 위키텍스트입니다.
- wikitext
- 구문 분석되지 않은 위키텍스트입니다.
- html
- HTML입니다.
- raw
- 메시지 키와 변수입니다.
- none
- 텍스트 없이 오류 코드만 출력합니다.
- bc
- 미디어위키 1.29 이전에 사용된 형식입니다. errorlang 및 errorsuselocal은 무시됩니다.
- 다음 값 중 하나: plaintext, wikitext, html, raw, none, bc 또는 alternative: plaintext, wikitext, html, raw, none, bc
- 기본값: bc
- errorlang
경고와 오류를 위해 사용할 언어입니다. siprop=languages가 포함된 action=query&meta=siteinfo는 언어 코드의 목록을 반환하고, content를 지정하면 이 위키의 내용 상의 언어를 사용하며, uselang을 지정하면 uselang 변수와 동일한 값을 사용합니다.
- 기본값: uselang
- errorsuselocal
지정하면 오류 텍스트가 미디어위키 이름공간에서 지역적으로 정의된 메시지를 사용합니다.
- 유형: 불리언 (자세한 정보)
- 메인 모듈의 도움말입니다.
- api.php?action=help [연습장에서 열기]
- 모든 도움말을 한 페이지로 모읍니다.
- api.php?action=help&recursivesubmodules=1 [연습장에서 열기]
데이터 유형
API 요청 내 몇몇 매개변수형에 대해 더 자세히 설명해보겠습니다:
- boolean
- Boolean 매개변수들은 HTML 체크박스처럼 동작합니다: 만약 매개변수가 지정되었다면, 값에 상관없이 참의 값으로 여겨집니다. 거짓값은 매개변수 전체를 생략하세요.
- timestamp
- 타임스탬프들은 여러 형식으로 표현될 수 있으나 ISO 8601 날짜와 시간이 추천됩니다. 모든 시간은 UTC이어야 하며, 포함된 시간대는 모두 무시됩니다.
- ISO 8601 날짜와 시간, 2001-01-15T14:56:00Z (구두점과 Z는 선택입니다.)
- ISO 8601 날짜와 시간과 (무시되는) 소수 초, 2001-01-15T14:56:00.00001Z (대시, 콜론과 Z는 선택입니다.)
- 미디어위키 형식, 20010115145600
- 일반적인 수 형식 2001-01-15 14:56:00 (GMT, +##, 또는 -##와 같은 선택적 시간대는 무시됩니다)
- RFC 2822 형식 (시간대는 생략될 수 있음), Mon, 15 Jan 2001 14:56:00
- RFC 850 형식 (시간대는 생략될 수 있음), Monday, 15-Jan-2001 14:56:00
- C ctime 형식, Mon Jan 15 14:56:00 2001
- 1부터 13자리까지의 숫자로 표현된 1970-01-01T00:00:00Z부터 흐른 시간(초) (0을 제외)
- 문자열 now
크레딧
API 개발자:
- Yuri Astrakhan (만든이, 선임 개발자 2006년 9월~2007년 9월)
- Roan Kattouw (선임 개발자, 2007년 9월–2009년)
- Victor Vasiliev
- Bryan Tong Minh
- Sam Reed
- Brad Jorsch (선임 개발자 2013년–현재)
당신의 의견이나 제안, 질문은 mediawiki-api@lists.wikimedia.org 로 보내주시고, 버그 보고는 https://phabricator.wikimedia.org/ 에 해주시기 바랍니다.