mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-09 20:37:47 +00:00
starting point for go docs
This commit is contained in:
92
docs/tools/sdk/go/Reference/V3/Methods/AccountUsagesAPI.md
Normal file
92
docs/tools/sdk/go/Reference/V3/Methods/AccountUsagesAPI.md
Normal file
@@ -0,0 +1,92 @@
|
||||
---
|
||||
id: account-usages
|
||||
title: AccountUsages
|
||||
pagination_label: AccountUsages
|
||||
sidebar_label: AccountUsages
|
||||
sidebar_class_name: gosdk
|
||||
keywords: ['go', 'Golang', 'sdk', 'AccountUsages', 'AccountUsages']
|
||||
slug: /tools/sdk/go/v3/methods/account-usages
|
||||
tags: ['SDK', 'Software Development Kit', 'AccountUsages', 'AccountUsages']
|
||||
---
|
||||
|
||||
# \AccountUsagesAPI
|
||||
Use this API to implement account usage insight functionality.
|
||||
With this functionality in place, administrators can gather information and insights about how their tenants' source accounts are being used.
|
||||
This allows organizations to get the information they need to start optimizing and securing source account usage.
|
||||
|
||||
All URIs are relative to *https://sailpoint.api.identitynow.com/v3*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**get-usages-by-account-id**](#get-usages-by-account-id) | **Get** `/account-usages/{accountId}/summaries` | Returns account usage insights
|
||||
|
||||
|
||||
## get-usages-by-account-id
|
||||
Returns account usage insights
|
||||
This API returns a summary of account usage insights for past 12 months.
|
||||
|
||||
[API Spec](https://developer.sailpoint.com/docs/api/v3/get-usages-by-account-id)
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**accountId** | **string** | ID of IDN account |
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiGetUsagesByAccountIdRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
**limit** | **int32** | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. | [default to 250]
|
||||
**offset** | **int32** | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. | [default to 0]
|
||||
**count** | **bool** | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. | [default to false]
|
||||
**sorters** | **string** | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **date** |
|
||||
|
||||
### Return type
|
||||
|
||||
[**[]AccountUsage**](../models/account-usage)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
accountId := ef38f94347e94562b5bb8424a56397d8 # string | ID of IDN account # string | ID of IDN account
|
||||
limit := 250 # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
||||
offset := 0 # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
||||
count := true # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
||||
sorters := -date # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **date** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **date** (optional)
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.AccountUsagesAPI.GetUsagesByAccountId(context.Background(), accountId).Limit(limit).Offset(offset).Count(count).Sorters(sorters).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `AccountUsagesAPI.GetUsagesByAccountId``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `GetUsagesByAccountId`: []AccountUsage
|
||||
fmt.Fprintf(os.Stdout, "Response from `AccountUsagesAPI.GetUsagesByAccountId`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
[[Back to top]](#)
|
||||
|
||||
Reference in New Issue
Block a user