12.5. 베어 메탈 이벤트 REST API 참조에 애플리케이션 구독
베어 메탈 이벤트 REST API를 사용하여 애플리케이션을 상위 노드에서 생성된 베어 메탈 이벤트에 등록합니다.
				리소스 주소 /cluster/node/<node_name>/redfish/event 를 사용하여 애플리케이션을 Redfish 이벤트에 구독합니다. 여기서 < node_name >은 애플리케이션을 실행하는 클러스터 노드입니다.
			
				별도의 애플리케이션 Pod에 cloud-event-consumer 애플리케이션 컨테이너 및 cloud-event-proxy 사이드카 컨테이너를 배포합니다. cloud-event-consumer 애플리케이션은 애플리케이션 Pod의 cloud-event-proxy 컨테이너를 서브스크립션합니다.
			
				다음 API 끝점을 사용하여 애플리케이션 Pod의 http://localhost:8089/api/ocloudNotifications/v1/ 에서 cloud-event-consumer 컨테이너에서 게시한 Redfish 이벤트에 cloud-event- consumer 애플리케이션을 서브스크립션합니다.
			
- /api/ocloudNotifications/v1/subscriptions- 
								POST: 새 서브스크립션을 생성합니다.
- 
								GET: 서브스크립션 목록 검색합니다.
 
- 
								
- /api/ocloudNotifications/v1/subscriptions/<subscription_id>- 
								PUT: 지정된 서브스크립션 ID에 대한 새 상태 ping 요청을 생성합니다.
 
- 
								
- /api/ocloudNotifications/v1/health- 
								GET:ocloudNotificationsAPI의 상태를 반환합니다.
 
- 
								
					9089 는 애플리케이션 Pod에 배포된 cloud-event-consumer 컨테이너의 기본 포트입니다. 필요에 따라 애플리케이션에 대해 다른 포트를 구성할 수 있습니다.
				
api/ocloudNotifications/v1/subscriptions
HTTP 방법
				GET api/ocloudNotifications/v1/subscriptions
			
설명
				서브스크립션 목록을 반환합니다. 서브스크립션이 존재하는 경우 200 OK 상태 코드가 서브스크립션 목록과 함께 반환됩니다.
			
API 응답 예
HTTP 방법
				POST api/ocloudNotifications/v1/subscriptions
			
설명
				새 서브스크립션을 생성합니다. 서브스크립션이 성공적으로 생성되었거나 이미 존재하는 경우 201 Created 상태 코드가 반환됩니다.
			
| 매개변수 | 유형 | 
|---|---|
| subscription | data | 
페이로드 예
{
  "uriLocation": "http://localhost:8089/api/ocloudNotifications/v1/subscriptions",
  "resource": "/cluster/node/openshift-worker-0.openshift.example.com/redfish/event"
}
{
  "uriLocation": "http://localhost:8089/api/ocloudNotifications/v1/subscriptions",
  "resource": "/cluster/node/openshift-worker-0.openshift.example.com/redfish/event"
}api/ocloudNotifications/v1/subscriptions/<subscription_id>
HTTP 방법
				GET api/ocloudNotifications/v1/subscriptions/<subscription_id>
			
설명
				ID <subscription _id>가 있는 서브스크립션 세부 정보를 반환합니다.
			
| 매개변수 | 유형 | 
|---|---|
| 
								 | string | 
API 응답 예
api/ocloudNotifications/v1/health/
HTTP 방법
				GET api/ocloudNotifications/v1/health/
			
설명
				ocloudNotifications REST API의 상태를 반환합니다.
			
API 응답 예
OK
OK