미디어위키 API 도움말
이 페이지는 자동으로 생성된 미디어위키 API 도움말 문서입니다.
설명 문서 및 예시: https://www.mediawiki.org/wiki/API
action=protect
- 이 모듈은 read 권한을 요구합니다.
- 이 모듈은 write 권한을 요구합니다.
- 이 모듈은 POST 요청만을 허용합니다.
- 출처: MediaWiki
- 라이선스: GPL-2.0-or-later
문서의 보호 수준을 변경합니다.
- title
Title of the page to (un)protect. Cannot be used together with pageid.
- pageid
ID of the page to (un)protect. Cannot be used together with title.
- Type: integer
- protections
List of protection levels, formatted action=level (e.g. edit=sysop). A level of all means everyone is allowed to take the action, i.e. no restriction.
Note: Any actions not listed will have restrictions removed.
- 이 변수는 필수입니다.
- | 또는 대안으로 값을 구분합니다.
- Maximum number of values is 50 (500 for clients allowed higher limits).
- expiry
Expiry timestamps. If only one timestamp is set, it'll be used for all protections. Use infinite, indefinite, infinity, or never, for a never-expiring protection.
- | 또는 대안으로 값을 구분합니다.
- Maximum number of values is 50 (500 for clients allowed higher limits).
- 기본값: infinite
- reason
보호 또는 보호 해제의 이유.
- 기본값: (비어 있음)
- tags
Change tags to apply to the entry in the protection log.
- 값 (|로 구분): mp, mp3 또는 다른 문자열: mp, mp3
- cascade
Enable cascading protection (i.e. protect transcluded templates and images used in this page). Ignored if none of the given protection levels support cascading.
- Type: boolean (details)
- watch
- 구식입니다.
If set, add the page being (un)protected to the current user's watchlist.
- Type: boolean (details)
- watchlist
현재 사용자의 주시목록에서 문서를 무조건적으로 추가하거나 제거하거나, 환경 설정을 사용하거나 주시를 변경하지 않습니다.
- 다음 값 중 하나: nochange, preferences, unwatch, watch 또는 다른 문자열: nochange, preferences, unwatch, watch
- 기본값: preferences
- token
"csrf" 토큰은 action=query&meta=tokens에서 가져옵니다
- 이 변수는 필수입니다.
- 문서 보호
- api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=sysop|move=sysop&cascade=&expiry=20070901163000|never [연습장에서 열기]
- Unprotect a page by setting restrictions to all (i.e. everyone is allowed to take the action).
- api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=all|move=all&reason=Lifting%20restrictions [연습장에서 열기]
- Unprotect a page by setting no restrictions.
- api.php?action=protect&title=Main%20Page&token=123ABC&protections=&reason=Lifting%20restrictions [연습장에서 열기]