Welcome to the new Box Support website. Check out all the details here on what’s changed.

Comments

11 comments

  • Official comment
    Alex Novotny

    If you can access the admin console reporting section, you should be able to follow these instructions!

    Alex

    Comment actions Permalink
  • LinThaw

    Thanks Great!

    0
    Comment actions Permalink
  • LinThaw

    Hi Alex, 

    I exported and check the result.

    Does it count for API Callout via Toolkit (Box for Salesforce)?

    0
    Comment actions Permalink
  • Alex Novotny

    It should show any platform activity. What are you seeing? 

    0
    Comment actions Permalink
  • LinThaw

    Hi Alex, 

    here is result

    I also tried method 1 and method 2 in June, but csv result show only api call count for method 2 result.
    method 2 is using Named Credential and Salesforce Auth Provider with Box App (App Name: Files Connect).
    method 1 is using toolkit to send request so it doesn't count?

    Method 1

        public static String GetFileInfoByToolkit(String fileId) {
    // Instantiate the Toolkit object
    box.Toolkit toolkit = new box.Toolkit();

    // Specify the Box API endpoint to call
    String endpoint = 'https://api.box.com/2.0/files/'+ fileId +'/';

    // Create a new HttpRequest object and set appropriate values
    HttpRequest request = new HttpRequest();
    request.setMethod('GET');
    request.setEndpoint(endpoint);
    request.setHeader('content-type', 'application/json');

    // Send the HttpRequest through the generic Toolkit method, which will handle the authentication details
    HttpResponse response = toolkit.sendRequest(request);

    System.debug('response body '+ response.getBody());

    return null;
    }

    Method 2

        public static String GetFileInfoByNamedCredential(String fileId){        
    // Specify the Box API endpoint to call (using named credential)
    String endpoint = 'callout:custBox/2.0/files/'+ fileId +'/';

    // Create a new HttpRequest object and set appropriate values
    HttpRequest request = new HttpRequest();
    request.setMethod('GET');
    request.setEndpoint(endpoint);
    request.setHeader('content-type', 'application/json');

    Http http = new Http();
    HttpResponse response = http.send(request);
    SYstem.debug('response body '+ response.getBody());
    return null;
    }

    Thanks

    0
    Comment actions Permalink
  • Alex Novotny

    I believe the value in the "App Name" column is whatever you named the application that the account under service account is tied to. 

    0
    Comment actions Permalink
  • LinThaw

    Hi Alex,

    How can I find which App is connected to Box for Salesforce?

    0
    Comment actions Permalink
  • Alex Novotny

    In Salesforce, go to the Box app and look at the settings tab. What account is listed under the Box Service Account - like my screenshot above? 

    0
    Comment actions Permalink
  • LinThaw

    Sorry I mean how can I check which App in my Box Service Account is connected to Box for Salesforce?

    I created a lot for test.

    0
    Comment actions Permalink
  • Alex Novotny

    Sorry to send you on a little chase! When you use a custom application (like your method 2 above), the platform report will show the activity. When you use the developer toolkit, it does not show up on that report it turns out. I forgot that the SFDC process doesn't require you to set up an application. 

    Taking a step back, when are you curious about the number of API calls? Are you seeing an issue that is making you ask about this? 

    0
    Comment actions Permalink
  • LinThaw

    Thanks Alex,
    As I think toolkit API call not show in report!
    Yes, we have to migrate existing files to Box from Salesforce. There are over 2 millions files so we have to move in daily apex scheduled batch in which Toolkit method used. That is why I want to know daily api call outs.

    0
    Comment actions Permalink

Please sign in to leave a comment.