Skip to content
This repository was archived by the owner on Jan 12, 2021. It is now read-only.

Latest commit

 

History

History
206 lines (128 loc) · 6.11 KB

File metadata and controls

206 lines (128 loc) · 6.11 KB

ESP::UserAttributionsApi

All URIs are relative to https://api.evident.io

Method HTTP request Description
add_channel POST /api/v2/external_accounts/{external_account_id}/user_attribution/channel.json_api Create a User Attribution Channel for an external account
remove_channel DELETE /api/v2/external_accounts/{external_account_id}/user_attribution/channel.json_api Remove the User Attribution Channel for an external account
show_channel GET /api/v2/external_accounts/{external_account_id}/user_attribution/channel.json_api Show the User Attribution Channel of an external account
update PATCH /api/v2/external_accounts/{external_account_id}/user_attribution.json_api Update the user attributions on an external account

add_channel

ExternalAccountUserAttributionChannel add_channel(external_account_id)

Create a User Attribution Channel for an external account

URL will only be returned in this response and will not be accessible again.

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::UserAttributionsApi.new

external_account_id = 56 # Integer | The ID of the external account to create a User Attribution Channel for


begin
  #Create a User Attribution Channel for an external account
  result = api_instance.add_channel(external_account_id)
  p result
rescue ESP::ApiError => e
  puts "Exception when calling UserAttributionsApi->add_channel: #{e}"
end

Parameters

Name Type Description Notes
external_account_id Integer The ID of the external account to create a User Attribution Channel for

Return type

ExternalAccountUserAttributionChannel

Authorization

See https://github.com/EvidentSecurity/esp-sdk-ruby#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

remove_channel

Meta remove_channel(external_account_id)

Remove the User Attribution Channel for an external account

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::UserAttributionsApi.new

external_account_id = 56 # Integer | The ID of the external account to remove the User Attribution Channel from


begin
  #Remove the User Attribution Channel for an external account
  result = api_instance.remove_channel(external_account_id)
  p result
rescue ESP::ApiError => e
  puts "Exception when calling UserAttributionsApi->remove_channel: #{e}"
end

Parameters

Name Type Description Notes
external_account_id Integer The ID of the external account to remove the User Attribution Channel from

Return type

Meta

Authorization

See https://github.com/EvidentSecurity/esp-sdk-ruby#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

show_channel

ExternalAccountUserAttributionChannel show_channel(external_account_id)

Show the User Attribution Channel of an external account

The channel url will not be returned.

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::UserAttributionsApi.new

external_account_id = 56 # Integer | The ID of the external account to show the user attribution channel for


begin
  #Show the User Attribution Channel of an external account
  result = api_instance.show_channel(external_account_id)
  p result
rescue ESP::ApiError => e
  puts "Exception when calling UserAttributionsApi->show_channel: #{e}"
end

Parameters

Name Type Description Notes
external_account_id Integer The ID of the external account to show the user attribution channel for

Return type

ExternalAccountUserAttributionChannel

Authorization

See https://github.com/EvidentSecurity/esp-sdk-ruby#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

update

ExternalAccount update(external_account_id, opts)

Update the user attributions on an external account

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::UserAttributionsApi.new

external_account_id = 56 # Integer | The ID of the external account to update the user attributions of

opts = { 
  include: "include_example", # String | Related objects that can be included in the response:  organization, sub_organization, team, scan_intervals, disabled_signatures, suppressions, azure_group See Including Objects for more information.
  cloudtrail_name: "cloudtrail_name_example" # String | The name of the cloudetrail associated with the user attribution.
}

begin
  #Update the user attributions on an external account
  result = api_instance.update(external_account_id, opts)
  p result
rescue ESP::ApiError => e
  puts "Exception when calling UserAttributionsApi->update: #{e}"
end

Parameters

Name Type Description Notes
external_account_id Integer The ID of the external account to update the user attributions of
include String Related objects that can be included in the response: organization, sub_organization, team, scan_intervals, disabled_signatures, suppressions, azure_group See Including Objects for more information. [optional]
cloudtrail_name String The name of the cloudetrail associated with the user attribution. [optional]

Return type

ExternalAccount

Authorization

See https://github.com/EvidentSecurity/esp-sdk-ruby#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json