code: func procCreateEndpoint(c libnetwork.NetworkController, vars map[string]string, body []byte) (interface{}, *responseStatus) {
  	var ec endpointCreate
  
  	err := json.Unmarshal(body, &ec)
  	if err != nil {
  		return "", &responseStatus{Status: "Invalid body: " + err.Error(), StatusCode: http.StatusBadRequest}
  	}
  
  	nwT, nwBy := detectNetworkTarget(vars)
  	n, errRsp := findNetwork(c, nwT, nwBy)
  	if !errRsp.isOK() {
  		return "", errRsp
  	}
  
  	var setFctList []libnetwork.EndpointOption
  	for _, str := range ec.MyAliases {
  		setFctList = append(setFctList, libnetwork.CreateOptionMyAlias(str))
  	}
  
  	ep, err := n.CreateEndpoint(ec.Name, setFctList...)
  	if err != nil {
  		return "", convertNetworkError(err)
  	}
  
  	return ep.ID(), &createdResponse
  }
docs: /******************
   Network interface
  *******************/