Skip to main content
설명서에 자주 업데이트를 게시하며 이 페이지의 번역이 계속 진행 중일 수 있습니다. 최신 정보는 영어 설명서를 참조하세요.
이제 REST API의 버전이 지정됩니다. 자세한 내용은 "API 버전 관리 정보"를 참조하세요.

조직 공지 배너

조직 공지 배너 API를 사용하면 조직의 알림 배너를 가져와서 설정하고 제거할 수 있습니다.

Get announcement banner for organization

에서 작동 GitHub Apps

Gets the announcement banner currently set for the organization. Only returns the announcement banner set at the organization level. Organization members may also see an enterprise-level announcement banner. To get an announcement banner displayed at the enterprise level, use the enterprise-level endpoint.

"Get announcement banner for organization"에 대한 매개 변수

헤더
이름, 형식, Description
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
이름, 형식, Description
org string 필수

The organization name. The name is not case sensitive.

"Get announcement banner for organization"에 대한 HTTP 응답 상태 코드

상태 코드Description
200

OK

"Get announcement banner for organization"에 대한 코드 샘플

get/orgs/{org}/announcement
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>"\ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/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 announcement banner for organization

에서 작동 GitHub Apps

Sets the announcement banner to display for the organization.

"Set announcement banner for organization"에 대한 매개 변수

헤더
이름, 형식, Description
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
이름, 형식, Description
org string 필수

The organization name. The name is not case sensitive.

본문 매개 변수
이름, 형식, 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 null

The time at which the announcement expires. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. To set an announcement that never expires, omit this parameter, set it to null, or set it to an empty string.

"Set announcement banner for organization"에 대한 HTTP 응답 상태 코드

상태 코드Description
200

OK

"Set announcement banner for organization"에 대한 코드 샘플

patch/orgs/{org}/announcement
curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>"\ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/announcement \ -d '{"announcement":"Very **important** announcement about _something_.","expires_at":"2021-01-01T00:00:00.000+00:00","user_dismissible":false}'

Announcement banner

Status: 200
{ "announcement": "Very **important** announcement about _something_.", "expires_at": "2021-01-01T00:00:00.000+00:00", "user_dismissible": false }

Remove announcement banner from organization

에서 작동 GitHub Apps

Removes the announcement banner currently set for the organization.

"Remove announcement banner from organization"에 대한 매개 변수

헤더
이름, 형식, Description
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
이름, 형식, Description
org string 필수

The organization name. The name is not case sensitive.

"Remove announcement banner from organization"에 대한 HTTP 응답 상태 코드

상태 코드Description
204

No Content

"Remove announcement banner from organization"에 대한 코드 샘플

delete/orgs/{org}/announcement
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>"\ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/announcement

Response

Status: 204