Skip to content

Instantly share code, notes, and snippets.

@tushar30
Created October 1, 2017 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tushar30/da548ddad6ffede4726676f9ec9b90f1 to your computer and use it in GitHub Desktop.
Save tushar30/da548ddad6ffede4726676f9ec9b90f1 to your computer and use it in GitHub Desktop.
HttpRequest req = new HttpRequest();
req.setMethod('GET');
req.setEndpoint('https://api.einstein.ai/v2/vision/train/<MODEL ID>');
req.setHeader('Authorization', 'Bearer <TOKEN>');
req.setTimeout(60*1000);
Http h = new Http();
String resp;
HttpResponse res = h.send(req);
resp = res.getBody();
system.debug(resp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment