Collection of all Datadog Public endpoints.
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.0
- Package version: 0.1.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://www.datadoghq.com/support/
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import sw "./datadog"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value sw.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices
and sw.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
All URIs are relative to https://api.datadoghq.com
Class | Method | HTTP request | Description |
---|---|---|---|
DashboardListsApi | CreateDashboardListItems | Post /api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards | Add Items to a Dashboard List |
DashboardListsApi | DeleteDashboardListItems | Delete /api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards | Delete items from a dashboard list |
DashboardListsApi | GetDashboardListItems | Get /api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards | Get items of a Dashboard List |
DashboardListsApi | UpdateDashboardListItems | Put /api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards | Update items of a dashboard list |
IncidentServicesApi | CreateIncidentService | Post /api/v2/services | Create a new incident service |
IncidentServicesApi | DeleteIncidentService | Delete /api/v2/services/{service_id} | Delete an existing incident service |
IncidentServicesApi | GetIncidentService | Get /api/v2/services/{service_id} | Get details of an incident service |
IncidentServicesApi | ListIncidentServices | Get /api/v2/services | Get a list of all incident services |
IncidentServicesApi | UpdateIncidentService | Patch /api/v2/services/{service_id} | Update an existing incident service |
IncidentTeamsApi | CreateIncidentTeam | Post /api/v2/teams | Create a new incident team |
IncidentTeamsApi | DeleteIncidentTeam | Delete /api/v2/teams/{team_id} | Delete an existing incident team |
IncidentTeamsApi | GetIncidentTeam | Get /api/v2/teams/{team_id} | Get details of an incident team |
IncidentTeamsApi | ListIncidentTeams | Get /api/v2/teams | Get a list of all incident teams |
IncidentTeamsApi | UpdateIncidentTeam | Patch /api/v2/teams/{team_id} | Update an existing incident team |
IncidentsApi | CreateIncident | Post /api/v2/incidents | Create an incident |
IncidentsApi | DeleteIncident | Delete /api/v2/incidents/{incident_id} | Delete an existing incident |
IncidentsApi | GetIncident | Get /api/v2/incidents/{incident_id} | Get the details of an incident |
IncidentsApi | ListIncidents | Get /api/v2/incidents | Get a list of incidents |
IncidentsApi | UpdateIncident | Patch /api/v2/incidents/{incident_id} | Update an existing incident |
KeyManagementApi | CreateAPIKey | Post /api/v2/api_keys | Create an API key |
KeyManagementApi | CreateCurrentUserApplicationKey | Post /api/v2/current_user/application_keys | Create an application key for current user |
KeyManagementApi | DeleteAPIKey | Delete /api/v2/api_keys/{api_key_id} | Delete an API key |
KeyManagementApi | DeleteApplicationKey | Delete /api/v2/application_keys/{app_key_id} | Delete an application key |
KeyManagementApi | DeleteCurrentUserApplicationKey | Delete /api/v2/current_user/application_keys/{app_key_id} | Delete an application key owned by current user |
KeyManagementApi | GetAPIKey | Get /api/v2/api_keys/{api_key_id} | Get API key |
KeyManagementApi | GetApplicationKey | Get /api/v2/application_keys/{app_key_id} | Get an application key |
KeyManagementApi | GetCurrentUserApplicationKey | Get /api/v2/current_user/application_keys/{app_key_id} | Get one application key owned by current user |
KeyManagementApi | ListAPIKeys | Get /api/v2/api_keys | Get all API keys |
KeyManagementApi | ListApplicationKeys | Get /api/v2/application_keys | Get all application keys |
KeyManagementApi | ListCurrentUserApplicationKeys | Get /api/v2/current_user/application_keys | Get all application keys owned by current user |
KeyManagementApi | UpdateAPIKey | Patch /api/v2/api_keys/{api_key_id} | Edit an API key |
KeyManagementApi | UpdateApplicationKey | Patch /api/v2/application_keys/{app_key_id} | Edit an application key |
KeyManagementApi | UpdateCurrentUserApplicationKey | Patch /api/v2/current_user/application_keys/{app_key_id} | Edit an application key owned by current user |
LogsApi | AggregateLogs | Post /api/v2/logs/analytics/aggregate | Aggregate events |
LogsApi | ListLogs | Post /api/v2/logs/events/search | Search logs |
LogsApi | ListLogsGet | Get /api/v2/logs/events | Get a list of logs |
LogsApi | SubmitLog | Post /api/v2/logs | Send logs |
LogsArchivesApi | AddReadRoleToArchive | Post /api/v2/logs/config/archives/{archive_id}/readers | Grant role to an archive |
LogsArchivesApi | CreateLogsArchive | Post /api/v2/logs/config/archives | Create an archive |
LogsArchivesApi | DeleteLogsArchive | Delete /api/v2/logs/config/archives/{archive_id} | Delete an archive |
LogsArchivesApi | GetLogsArchive | Get /api/v2/logs/config/archives/{archive_id} | Get an archive |
LogsArchivesApi | GetLogsArchiveOrder | Get /api/v2/logs/config/archive-order | Get archive order |
LogsArchivesApi | ListArchiveReadRoles | Get /api/v2/logs/config/archives/{archive_id}/readers | List read roles for an archive |
LogsArchivesApi | ListLogsArchives | Get /api/v2/logs/config/archives | Get all archives |
LogsArchivesApi | RemoveRoleFromArchive | Delete /api/v2/logs/config/archives/{archive_id}/readers | Revoke role from an archive |
LogsArchivesApi | UpdateLogsArchive | Put /api/v2/logs/config/archives/{archive_id} | Update an archive |
LogsArchivesApi | UpdateLogsArchiveOrder | Put /api/v2/logs/config/archive-order | Update archive order |
LogsMetricsApi | CreateLogsMetric | Post /api/v2/logs/config/metrics | Create a log-based metric |
LogsMetricsApi | DeleteLogsMetric | Delete /api/v2/logs/config/metrics/{metric_id} | Delete a log-based metric |
LogsMetricsApi | GetLogsMetric | Get /api/v2/logs/config/metrics/{metric_id} | Get a log-based metric |
LogsMetricsApi | ListLogsMetrics | Get /api/v2/logs/config/metrics | Get all log-based metrics |
LogsMetricsApi | UpdateLogsMetric | Patch /api/v2/logs/config/metrics/{metric_id} | Update a log-based metric |
MetricsApi | CreateTagConfiguration | Post /api/v2/metrics/{metric_name}/tags | Create a tag configuration |
MetricsApi | DeleteTagConfiguration | Delete /api/v2/metrics/{metric_name}/tags | Delete a tag configuration |
MetricsApi | ListTagConfigurationByName | Get /api/v2/metrics/{metric_name}/tags | List tag configuration by name |
MetricsApi | ListTagConfigurations | Get /api/v2/metrics | List tag configurations |
MetricsApi | ListTagsByMetricName | Get /api/v2/metrics/{metric_name}/all-tags | List tags by metric name |
MetricsApi | ListVolumesByMetricName | Get /api/v2/metrics/{metric_name}/volumes | List distinct metric volumes by metric name |
MetricsApi | UpdateTagConfiguration | Patch /api/v2/metrics/{metric_name}/tags | Update a tag configuration |
ProcessesApi | ListProcesses | Get /api/v2/processes | Get all processes |
RolesApi | AddPermissionToRole | Post /api/v2/roles/{role_id}/permissions | Grant permission to a role |
RolesApi | AddUserToRole | Post /api/v2/roles/{role_id}/users | Add a user to a role |
RolesApi | CreateRole | Post /api/v2/roles | Create role |
RolesApi | DeleteRole | Delete /api/v2/roles/{role_id} | Delete role |
RolesApi | GetRole | Get /api/v2/roles/{role_id} | Get a role |
RolesApi | ListPermissions | Get /api/v2/permissions | List permissions |
RolesApi | ListRolePermissions | Get /api/v2/roles/{role_id}/permissions | List permissions for a role |
RolesApi | ListRoleUsers | Get /api/v2/roles/{role_id}/users | Get all users of a role |
RolesApi | ListRoles | Get /api/v2/roles | List roles |
RolesApi | RemovePermissionFromRole | Delete /api/v2/roles/{role_id}/permissions | Revoke permission |
RolesApi | RemoveUserFromRole | Delete /api/v2/roles/{role_id}/users | Remove a user from a role |
RolesApi | UpdateRole | Patch /api/v2/roles/{role_id} | Update a role |
SecurityMonitoringApi | CreateSecurityFilter | Post /api/v2/security_monitoring/configuration/security_filters | Create a security filter |
SecurityMonitoringApi | CreateSecurityMonitoringRule | Post /api/v2/security_monitoring/rules | Create a detection rule |
SecurityMonitoringApi | DeleteSecurityFilter | Delete /api/v2/security_monitoring/configuration/security_filters/{security_filter_id} | Delete a security filter |
SecurityMonitoringApi | DeleteSecurityMonitoringRule | Delete /api/v2/security_monitoring/rules/{rule_id} | Delete an existing rule |
SecurityMonitoringApi | GetSecurityFilter | Get /api/v2/security_monitoring/configuration/security_filters/{security_filter_id} | Get a security filter |
SecurityMonitoringApi | GetSecurityMonitoringRule | Get /api/v2/security_monitoring/rules/{rule_id} | Get a rule's details |
SecurityMonitoringApi | ListSecurityFilters | Get /api/v2/security_monitoring/configuration/security_filters | Get all security filters |
SecurityMonitoringApi | ListSecurityMonitoringRules | Get /api/v2/security_monitoring/rules | List rules |
SecurityMonitoringApi | ListSecurityMonitoringSignals | Get /api/v2/security_monitoring/signals | Get a quick list of security signals |
SecurityMonitoringApi | SearchSecurityMonitoringSignals | Post /api/v2/security_monitoring/signals/search | Get a list of security signals |
SecurityMonitoringApi | UpdateSecurityFilter | Patch /api/v2/security_monitoring/configuration/security_filters/{security_filter_id} | Update a security filter |
SecurityMonitoringApi | UpdateSecurityMonitoringRule | Put /api/v2/security_monitoring/rules/{rule_id} | Update an existing rule |
ServiceAccountsApi | CreateServiceAccountApplicationKey | Post /api/v2/service_accounts/{service_account_id}/application_keys | Create an application key for this service account |
ServiceAccountsApi | DeleteServiceAccountApplicationKey | Delete /api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id} | Delete an application key for this service account |
ServiceAccountsApi | GetServiceAccountApplicationKey | Get /api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id} | Get one application key for this service account |
ServiceAccountsApi | ListServiceAccountApplicationKeys | Get /api/v2/service_accounts/{service_account_id}/application_keys | List application keys for this service account |
ServiceAccountsApi | UpdateServiceAccountApplicationKey | Patch /api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id} | Edit an application key for this service account |
UsersApi | CreateServiceAccount | Post /api/v2/service_accounts | Create a service account |
UsersApi | CreateUser | Post /api/v2/users | Create a user |
UsersApi | DisableUser | Delete /api/v2/users/{user_id} | Disable a user |
UsersApi | GetInvitation | Get /api/v2/user_invitations/{user_invitation_uuid} | Get a user invitation |
UsersApi | GetUser | Get /api/v2/users/{user_id} | Get user details |
UsersApi | ListUserOrganizations | Get /api/v2/users/{user_id}/orgs | Get a user organization |
UsersApi | ListUserPermissions | Get /api/v2/users/{user_id}/permissions | Get a user permissions |
UsersApi | ListUsers | Get /api/v2/users | List all users |
UsersApi | SendInvitations | Post /api/v2/user_invitations | Send invitation emails |
UsersApi | UpdateUser | Patch /api/v2/users/{user_id} | Update a user |
- APIErrorResponse
- APIKeyCreateAttributes
- APIKeyCreateData
- APIKeyCreateRequest
- APIKeyRelationships
- APIKeyResponse
- APIKeyResponseIncludedItem
- APIKeyUpdateAttributes
- APIKeyUpdateData
- APIKeyUpdateRequest
- APIKeysResponse
- APIKeysSort
- APIKeysType
- ApplicationKeyCreateAttributes
- ApplicationKeyCreateData
- ApplicationKeyCreateRequest
- ApplicationKeyRelationships
- ApplicationKeyResponse
- ApplicationKeyResponseIncludedItem
- ApplicationKeyUpdateAttributes
- ApplicationKeyUpdateData
- ApplicationKeyUpdateRequest
- ApplicationKeysSort
- ApplicationKeysType
- ContentEncoding
- Creator
- DashboardListAddItemsRequest
- DashboardListAddItemsResponse
- DashboardListDeleteItemsRequest
- DashboardListDeleteItemsResponse
- DashboardListItem
- DashboardListItemRequest
- DashboardListItemResponse
- DashboardListItems
- DashboardListUpdateItemsRequest
- DashboardListUpdateItemsResponse
- DashboardType
- FullAPIKey
- FullAPIKeyAttributes
- FullApplicationKey
- FullApplicationKeyAttributes
- HTTPLogError
- HTTPLogErrors
- HTTPLogItem
- IncidentCreateAttributes
- IncidentCreateData
- IncidentCreateRelationships
- IncidentCreateRequest
- IncidentFieldAttributes
- IncidentFieldAttributesMultipleValue
- IncidentFieldAttributesSingleValue
- IncidentFieldAttributesSingleValueType
- IncidentFieldAttributesValueType
- IncidentIntegrationMetadataType
- IncidentNotificationHandle
- IncidentPostmortemType
- IncidentRelatedObject
- IncidentResponse
- IncidentResponseAttributes
- IncidentResponseData
- IncidentResponseIncludedItem
- IncidentResponseRelationships
- IncidentServiceCreateAttributes
- IncidentServiceCreateData
- IncidentServiceCreateRequest
- IncidentServiceIncludedItems
- IncidentServiceRelationships
- IncidentServiceResponse
- IncidentServiceResponseAttributes
- IncidentServiceResponseData
- IncidentServiceType
- IncidentServiceUpdateAttributes
- IncidentServiceUpdateData
- IncidentServiceUpdateRequest
- IncidentServicesResponse
- IncidentServicesResponseMeta
- IncidentServicesResponseMetaPagination
- IncidentTeamCreateAttributes
- IncidentTeamCreateData
- IncidentTeamCreateRequest
- IncidentTeamIncludedItems
- IncidentTeamRelationships
- IncidentTeamResponse
- IncidentTeamResponseAttributes
- IncidentTeamResponseData
- IncidentTeamType
- IncidentTeamUpdateAttributes
- IncidentTeamUpdateData
- IncidentTeamUpdateRequest
- IncidentTeamsResponse
- IncidentTimelineCellCreateAttributes
- IncidentTimelineCellMarkdownContentType
- IncidentTimelineCellMarkdownCreateAttributes
- IncidentTimelineCellMarkdownCreateAttributesContent
- IncidentType
- IncidentUpdateAttributes
- IncidentUpdateData
- IncidentUpdateRelationships
- IncidentUpdateRequest
- IncidentsResponse
- ListApplicationKeysResponse
- Log
- LogAttributes
- LogType
- LogsAggregateBucket
- LogsAggregateBucketValue
- LogsAggregateBucketValueTimeseries
- LogsAggregateBucketValueTimeseriesPoint
- LogsAggregateRequest
- LogsAggregateRequestPage
- LogsAggregateResponse
- LogsAggregateResponseData
- LogsAggregateResponseStatus
- LogsAggregateSort
- LogsAggregateSortType
- LogsAggregationFunction
- LogsArchive
- LogsArchiveAttributes
- LogsArchiveCreateRequest
- LogsArchiveCreateRequestAttributes
- LogsArchiveCreateRequestDefinition
- LogsArchiveCreateRequestDestination
- LogsArchiveDefinition
- LogsArchiveDestination
- LogsArchiveDestinationAzure
- LogsArchiveDestinationAzureType
- LogsArchiveDestinationGCS
- LogsArchiveDestinationGCSType
- LogsArchiveDestinationS3
- LogsArchiveDestinationS3Type
- LogsArchiveIntegrationAzure
- LogsArchiveIntegrationGCS
- LogsArchiveIntegrationS3
- LogsArchiveOrder
- LogsArchiveOrderAttributes
- LogsArchiveOrderDefinition
- LogsArchiveOrderDefinitionType
- LogsArchiveState
- LogsArchives
- LogsCompute
- LogsComputeType
- LogsGroupBy
- LogsGroupByHistogram
- LogsGroupByMissing
- LogsGroupByTotal
- LogsListRequest
- LogsListRequestPage
- LogsListResponse
- LogsListResponseLinks
- LogsMetricCompute
- LogsMetricComputeAggregationType
- LogsMetricCreateAttributes
- LogsMetricCreateData
- LogsMetricCreateRequest
- LogsMetricFilter
- LogsMetricGroupBy
- LogsMetricResponse
- LogsMetricResponseAttributes
- LogsMetricResponseCompute
- LogsMetricResponseComputeAggregationType
- LogsMetricResponseData
- LogsMetricResponseFilter
- LogsMetricResponseGroupBy
- LogsMetricType
- LogsMetricUpdateAttributes
- LogsMetricUpdateData
- LogsMetricUpdateRequest
- LogsMetricsResponse
- LogsQueryFilter
- LogsQueryOptions
- LogsResponseMetadata
- LogsResponseMetadataPage
- LogsSort
- LogsSortOrder
- LogsWarning
- Metric
- MetricAllTags
- MetricAllTagsAttributes
- MetricAllTagsResponse
- MetricCustomAggregation
- MetricCustomSpaceAggregation
- MetricCustomTimeAggregation
- MetricDistinctVolume
- MetricDistinctVolumeAttributes
- MetricDistinctVolumeType
- MetricIngestedIndexedVolume
- MetricIngestedIndexedVolumeAttributes
- MetricIngestedIndexedVolumeType
- MetricTagConfiguration
- MetricTagConfigurationAttributes
- MetricTagConfigurationCreateAttributes
- MetricTagConfigurationCreateData
- MetricTagConfigurationCreateRequest
- MetricTagConfigurationMetricTypes
- MetricTagConfigurationResponse
- MetricTagConfigurationType
- MetricTagConfigurationUpdateAttributes
- MetricTagConfigurationUpdateData
- MetricTagConfigurationUpdateRequest
- MetricType
- MetricVolumes
- MetricVolumesResponse
- MetricsAndMetricTagConfigurations
- MetricsAndMetricTagConfigurationsResponse
- Organization
- OrganizationAttributes
- OrganizationsType
- Pagination
- PartialAPIKey
- PartialAPIKeyAttributes
- PartialApplicationKey
- PartialApplicationKeyAttributes
- PartialApplicationKeyResponse
- Permission
- PermissionAttributes
- PermissionsResponse
- PermissionsType
- ProcessSummariesMeta
- ProcessSummariesMetaPage
- ProcessSummariesResponse
- ProcessSummary
- ProcessSummaryAttributes
- ProcessSummaryType
- QuerySortOrder
- RelationshipToIncidentIntegrationMetadataData
- RelationshipToIncidentIntegrationMetadatas
- RelationshipToIncidentPostmortem
- RelationshipToIncidentPostmortemData
- RelationshipToOrganization
- RelationshipToOrganizationData
- RelationshipToOrganizations
- RelationshipToPermission
- RelationshipToPermissionData
- RelationshipToPermissions
- RelationshipToRole
- RelationshipToRoleData
- RelationshipToRoles
- RelationshipToUser
- RelationshipToUserData
- RelationshipToUsers
- ResponseMetaAttributes
- Role
- RoleAttributes
- RoleCreateAttributes
- RoleCreateData
- RoleCreateRequest
- RoleCreateResponse
- RoleCreateResponseData
- RoleRelationships
- RoleResponse
- RoleResponseRelationships
- RoleUpdateAttributes
- RoleUpdateData
- RoleUpdateRequest
- RoleUpdateResponse
- RoleUpdateResponseData
- RolesResponse
- RolesSort
- RolesType
- SecurityFilter
- SecurityFilterAttributes
- SecurityFilterCreateAttributes
- SecurityFilterCreateData
- SecurityFilterCreateRequest
- SecurityFilterExclusionFilter
- SecurityFilterExclusionFilterResponse
- SecurityFilterFilteredDataType
- SecurityFilterMeta
- SecurityFilterResponse
- SecurityFilterType
- SecurityFilterUpdateAttributes
- SecurityFilterUpdateData
- SecurityFilterUpdateRequest
- SecurityFiltersResponse
- SecurityMonitoringFilter
- SecurityMonitoringFilterAction
- SecurityMonitoringListRulesResponse
- SecurityMonitoringRuleCase
- SecurityMonitoringRuleCaseCreate
- SecurityMonitoringRuleCreatePayload
- SecurityMonitoringRuleDetectionMethod
- SecurityMonitoringRuleEvaluationWindow
- SecurityMonitoringRuleKeepAlive
- SecurityMonitoringRuleMaxSignalDuration
- SecurityMonitoringRuleNewValueOptions
- SecurityMonitoringRuleNewValueOptionsForgetAfter
- SecurityMonitoringRuleNewValueOptionsLearningDuration
- SecurityMonitoringRuleOptions
- SecurityMonitoringRuleQuery
- SecurityMonitoringRuleQueryAggregation
- SecurityMonitoringRuleQueryCreate
- SecurityMonitoringRuleResponse
- SecurityMonitoringRuleSeverity
- SecurityMonitoringRuleTypeCreate
- SecurityMonitoringRuleTypeRead
- SecurityMonitoringRuleUpdatePayload
- SecurityMonitoringRuntimeAgentRule
- SecurityMonitoringSignal
- SecurityMonitoringSignalAttributes
- SecurityMonitoringSignalListRequest
- SecurityMonitoringSignalListRequestFilter
- SecurityMonitoringSignalListRequestPage
- SecurityMonitoringSignalType
- SecurityMonitoringSignalsListResponse
- SecurityMonitoringSignalsListResponseLinks
- SecurityMonitoringSignalsListResponseMeta
- SecurityMonitoringSignalsListResponseMetaPage
- SecurityMonitoringSignalsSort
- ServiceAccountCreateAttributes
- ServiceAccountCreateData
- ServiceAccountCreateRequest
- User
- UserAttributes
- UserCreateAttributes
- UserCreateData
- UserCreateRequest
- UserInvitationData
- UserInvitationDataAttributes
- UserInvitationRelationships
- UserInvitationResponse
- UserInvitationResponseData
- UserInvitationsRequest
- UserInvitationsResponse
- UserInvitationsType
- UserRelationships
- UserResponse
- UserResponseIncludedItem
- UserResponseRelationships
- UserUpdateAttributes
- UserUpdateData
- UserUpdateRequest
- UsersResponse
- UsersType
- Type: OAuth
- Flow: accessCode
- Authorization URL: /oauth2/v1/authorize
- Scopes:
- dashboards_public_share: The ability to share dashboards externally.
- dashboards_read: The ability to view dashboards.
- dashboards_write: The ability to create and change dashboards.
- events_read: The ability to read events data.
- incident_read: The ability to view incidents in Datadog.
- incident_settings_write: The ability to configure incident settings.
- incident_write: The ability to create, view, and manage incidents in Datadog.
- metrics_read: The ability to view custom metrics.
- security_monitoring_filters_read: The ability to read Security Filters.
- security_monitoring_filters_write: The ability to create, edit and delete Security Filters.
- security_monitoring_rules_read: The ability to read Detection rules.
- security_monitoring_rules_write: The ability to create and edit Detection rules.
- security_monitoring_signals_read: The ability to view Security signals.
- user_access_invite: Allows users to invite other users to your organization.
- user_access_manage: Grants the permission to disable users, manage user roles and SAML-to-role mappings.
Example
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
import "golang.org/x/oauth2"
/* Perform OAuth2 round trip request and obtain a token */
tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)
- Type: API key
- API key parameter name: DD-API-KEY
- Location: HTTP header
Note, each API key must be added to a map of map[string]APIKey
where the key is: DD-API-KEY and passed in as the auth context for each request.
- Type: API key
- API key parameter name: DD-APPLICATION-KEY
- Location: HTTP header
Note, each API key must be added to a map of map[string]APIKey
where the key is: DD-APPLICATION-KEY and passed in as the auth context for each request.
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime