code: func procJoinEndpoint(c libnetwork.NetworkController, vars map[string]string, body []byte) (interface{}, *responseStatus) {
  	var ej endpointJoin
  	var setFctList []libnetwork.EndpointOption
  	err := json.Unmarshal(body, &ej)
  	if err != nil {
  		return nil, &responseStatus{Status: "Invalid body: " + err.Error(), StatusCode: http.StatusBadRequest}
  	}
  
  	nwT, nwBy := detectNetworkTarget(vars)
  	epT, epBy := detectEndpointTarget(vars)
  
  	ep, errRsp := findEndpoint(c, nwT, epT, nwBy, epBy)
  	if !errRsp.isOK() {
  		return nil, errRsp
  	}
  
  	sb, errRsp := findSandbox(c, ej.SandboxID, byID)
  	if !errRsp.isOK() {
  		return nil, errRsp
  	}
  
  	for _, str := range ej.Aliases {
  		name, alias, err := netutils.ParseAlias(str)
  		if err != nil {
  			return "", convertNetworkError(err)
  		}
  		setFctList = append(setFctList, libnetwork.CreateOptionAlias(name, alias))
  	}
  
  	err = ep.Join(sb, setFctList...)
  	if err != nil {
  		return nil, convertNetworkError(err)
  	}
  	return sb.Key(), &successResponse
  }
docs: /******************
   Endpoint interface
  *******************/