이 버전의 GitHub Enterprise는 다음 날짜에 중단되었습니다. 2023-01-18. 중요한 보안 문제에 대해서도 패치 릴리스가 이루어지지 않습니다. 성능 향상, 향상된 보안, 새로운 기능을 위해 최신 버전의 GitHub Enterprise로 업그레이드합니다. 업그레이드에 대한 도움말은 GitHub Enterprise 지원에 문의하세요.
We've recently moved some of the REST API documentation. If you can't find what you're looking for, you might try the Actions REST API page.
알림
REST API를 사용하여 엔터프라이즈에서 전역 알림 배너를 관리합니다.
알림 정보
REST API를 사용하여 엔터프라이즈에서 전역 알림 배너를 관리할 수 있습니다. 자세한 내용은 “엔터프라이즈에 대한 사용자 메시지 사용자 지정”을 참조하세요.
Get the global announcement banner
Gets the current message and expiration date of the global announcement banner in your enterprise.
HTTP 응답 상태 코드
상태 코드 | Description |
---|---|
200 | OK |
코드 샘플
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/enterprise/announcement
Announcement banner
Status: 200
{
"announcement": "Very **important** announcement about _something_.",
"expires_at": "2021-01-01T00:00:00.000+00:00",
"user_dismissible": false
}
Set the global announcement banner
Sets the message and expiration time for the global announcement banner in your enterprise.
매개 변수
헤더 |
---|
속성, 형식, Description |
accept stringSetting to |
본문 매개 변수 |
속성, 형식, Description |
announcement string or null필수The announcement text in GitHub Flavored Markdown. For more information about GitHub Flavored Markdown, see "Basic writing and formatting syntax." |
expires_at string or nullThe time at which the announcement expires. This is a timestamp in ISO 8601 format: |
HTTP 응답 상태 코드
상태 코드 | Description |
---|---|
200 | OK |
코드 샘플
curl \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/enterprise/announcement \
-d '{"announcement":"Very **important** announcement about _something_.","expires_at":"2021-01-01T00:00:00.000+00:00"}'
Announcement banner
Status: 200
{
"announcement": "Very **important** announcement about _something_.",
"expires_at": "2021-01-01T00:00:00.000+00:00",
"user_dismissible": false
}
Remove the global announcement banner
Removes the global announcement banner in your enterprise.
HTTP 응답 상태 코드
상태 코드 | Description |
---|---|
204 | No Content |
코드 샘플
curl \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/enterprise/announcement
Response
Status: 204