Which are the three main elements of an API?
For this coding task, represent them as the request method, endpoint, and payload. Implement api_elements(request) to return these values in that order. The input is a dictionary with method, endpoint, and payload keys, and the output is a three-element list.
method, endpoint, and payloadmethod and endpoint are stringspayload may be any JSON-compatible value, including nulldef api_elements(request):