gtableSetVisibility(objectID, inputParams = emptyNamedList, jsonifyData = TRUE, alwaysRetry = TRUE)
RJSONIO::toJSON to be
  used as the input to the API call.  If providing the JSON
  string directly, you must set jsonifyData to
  FALSE.RJSONIO::toJSON
  on inputParams to create the JSON string or pass
  through the value of inputParams directly.
  (Default is TRUE.)If the API call is successful, the parsed JSON of the API
  server response is returned (using
  RJSONIO::fromJSON).
This function makes an API call to the
  /gtable-xxxx/setVisibility API method; it is a
  simple wrapper around the dxHTTPRequest
  function which makes POST HTTP requests to the API
  server.
API spec documentation: http://wiki.dnanexus.com/API-Specification-v1.0.0/Visibility#API-method%3A-%2Fclass-xxxx%2FsetVisibility
dxHTTPRequest