@startuml
!include skin.inc
participant "API consumer" as cons
participant "NFV-MANO\nfunctional entity" as prod
autonumber

	note over cons, prod
		Precondition: Logging job is available
	end note
	
	cons -> prod: POST .../log_jobs/{logJobId}/compile_log
	alt If the NFV-MANO functional entity can compile the log file immediately
		prod -->> prod: Compiles log data\n into file and creates\n log report
		prod -> cons: 201 Created (LogReport)
	else If the NFV-MANO functional entity cannot compile the log file immediately or will take a long time
		prod -> cons: 202 Accepted ()
		prod -->> prod: Starts compilation of\n log data into file
		opt API consumer polls the "Individual log report"
			cons -> prod: GET .../log_jobs/{logJobId}/log_reports/{logReportId}
			prod -> cons: 202 Accepted ()
		end
		prod -->> prod: Completes the compilation\n of the log data\n into file and creates\n log report
	end
	prod -->> cons: <i>Send LogReportAvailableNotification</i> 
	note over cons
		API consumer can get the 
		"Individual log report"
	end note

	note over cons, prod
		Postcondition: The log report is available to the API consumer.
	end note
@enduml

