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

Latest commit

 

History

History
274 lines (175 loc) · 8.1 KB

File metadata and controls

274 lines (175 loc) · 8.1 KB

ESP::TeamsApi

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

Method HTTP request Description
create POST /api/v2/teams.json_api Create a(n) Team
delete DELETE /api/v2/teams/{id}.json_api Delete a(n) Team
list PUT /api/v2/teams.json_api Get a list of Teams
show GET /api/v2/teams/{id}.json_api Show a single Team
update PATCH /api/v2/teams/{id}.json_api Update a(n) Team

create

Team create(name, sub_organization_id, opts)

Create a(n) Team

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::TeamsApi.new

name = "name_example" # String | Name of the team

sub_organization_id = 56 # Integer | The ID of the sub organization to attach this team to

opts = { 
  include: "include_example", # String | Related objects that can be included in the response:  custom_signatures, external_accounts, organization, sub_organization See Including Objects for more information.
  report_interval: 56 # Integer | The interval period in hours for Evident.io to run reports
}

begin
  #Create a(n) Team
  result = api_instance.create(name, sub_organization_id, opts)
  p result
rescue ESP::ApiError => e
  puts "Exception when calling TeamsApi->create: #{e}"
end

Parameters

Name Type Description Notes
name String Name of the team
sub_organization_id Integer The ID of the sub organization to attach this team to
include String Related objects that can be included in the response: custom_signatures, external_accounts, organization, sub_organization See Including Objects for more information. [optional]
report_interval Integer The interval period in hours for Evident.io to run reports [optional]

Return type

Team

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

delete

Meta delete(id)

Delete a(n) Team

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::TeamsApi.new

id = 56 # Integer | Team ID


begin
  #Delete a(n) Team
  result = api_instance.delete(id)
  p result
rescue ESP::ApiError => e
  puts "Exception when calling TeamsApi->delete: #{e}"
end

Parameters

Name Type Description Notes
id Integer Team ID

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

list

PaginatedCollection list(opts)

Get a list of Teams

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::TeamsApi.new

opts = { 
  include: "include_example", # String | Related objects that can be included in the response:  custom_signatures, external_accounts, organization, sub_organization See Including Objects for more information.
  filter: {'key' => "filter_example"}, # Hash<String, String> | Filter Params for Searching.  Equality Searchable Attributes: [id, name] Matching Searchable Attribute: [name]  Sortable Attributes: [name, updated_at, created_at, id] Searchable Associations: [organization, sub_organization, custom_signatures, integrations] See Searching Lists for more information. See the filter parameter of the association's list action to see what attributes are searchable on each association. See Conditions on Relationships in Searching Lists for more information.
  page: "{:number=>1,+:size=>20}" # String | Page Number and Page Size.  Number is the page number of the collection to return, size is the number of items to return per page.
}

begin
  #Get a list of Teams
  result = api_instance.list(opts)
  p result
rescue ESP::ApiError => e
  puts "Exception when calling TeamsApi->list: #{e}"
end

Parameters

Name Type Description Notes
include String Related objects that can be included in the response: custom_signatures, external_accounts, organization, sub_organization See Including Objects for more information. [optional]
filter Hash<String, String> Filter Params for Searching. Equality Searchable Attributes: [id, name] Matching Searchable Attribute: [name] Sortable Attributes: [name, updated_at, created_at, id] Searchable Associations: [organization, sub_organization, custom_signatures, integrations] See Searching Lists for more information. See the filter parameter of the association's list action to see what attributes are searchable on each association. See Conditions on Relationships in Searching Lists for more information. [optional]
page String Page Number and Page Size. Number is the page number of the collection to return, size is the number of items to return per page. [optional] [default to {:number=>1,+:size=>20}]

Return type

PaginatedCollection

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

Team show(id, opts)

Show a single Team

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::TeamsApi.new

id = 56 # Integer | Team ID

opts = { 
  include: "include_example" # String | Related objects that can be included in the response:  custom_signatures, external_accounts, organization, sub_organization See Including Objects for more information.
}

begin
  #Show a single Team
  result = api_instance.show(id, opts)
  p result
rescue ESP::ApiError => e
  puts "Exception when calling TeamsApi->show: #{e}"
end

Parameters

Name Type Description Notes
id Integer Team ID
include String Related objects that can be included in the response: custom_signatures, external_accounts, organization, sub_organization See Including Objects for more information. [optional]

Return type

Team

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

Team update(id, opts)

Update a(n) Team

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::TeamsApi.new

id = 56 # Integer | Team ID

opts = { 
  include: "include_example", # String | Related objects that can be included in the response:  custom_signatures, external_accounts, organization, sub_organization See Including Objects for more information.
  name: "name_example", # String | Name of the team
  report_interval: 56 # Integer | The interval period in hours for Evident.io to run reports
}

begin
  #Update a(n) Team
  result = api_instance.update(id, opts)
  p result
rescue ESP::ApiError => e
  puts "Exception when calling TeamsApi->update: #{e}"
end

Parameters

Name Type Description Notes
id Integer Team ID
include String Related objects that can be included in the response: custom_signatures, external_accounts, organization, sub_organization See Including Objects for more information. [optional]
name String Name of the team [optional]
report_interval Integer The interval period in hours for Evident.io to run reports [optional]

Return type

Team

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