API Callout limit
回答済みHow can I check API callout limit my service account currently used for this month?
-
正式なコメント
If you can access the admin console reporting section, you should be able to follow these instructions!
Alex
コメントアクション -
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
-
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?
サインインしてコメントを残してください。
コメント
11件のコメント