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

Latest commit

 

History

History
264 lines (168 loc) · 6.1 KB

File metadata and controls

264 lines (168 loc) · 6.1 KB

ESP::APIKeysApi

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

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

create

ApiKey create(opts)

Create a(n) API Key

The secret key will only be returned once when the key is first created

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::APIKeysApi.new

opts = { 
  include: "include_example", # String | Related objects that can be included in the response:  user See Including Objects for more information.
  name: "name_example" # String | The name of the API Key
}

begin
  #Create a(n) API Key
  result = api_instance.create(opts)
  p result
rescue ESP::ApiError => e
  puts "Exception when calling APIKeysApi->create: #{e}"
end

Parameters

Name Type Description Notes
include String Related objects that can be included in the response: user See Including Objects for more information. [optional]
name String The name of the API Key [optional]

Return type

ApiKey

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) API Key

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::APIKeysApi.new

id = 56 # Integer | API Key ID


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

Parameters

Name Type Description Notes
id Integer API Key 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 API Keys

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::APIKeysApi.new

opts = { 
  include: "include_example", # String | Related objects that can be included in the response:  user See Including Objects 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 API Keys
  result = api_instance.list(opts)
  p result
rescue ESP::ApiError => e
  puts "Exception when calling APIKeysApi->list: #{e}"
end

Parameters

Name Type Description Notes
include String Related objects that can be included in the response: user See Including Objects 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

ApiKey show(id, opts)

Show a single API Key

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::APIKeysApi.new

id = 56 # Integer | API Key ID

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

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

Parameters

Name Type Description Notes
id Integer API Key ID
include String Related objects that can be included in the response: user See Including Objects for more information. [optional]

Return type

ApiKey

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

ApiKey update(id, opts)

Update a(n) API Key

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::APIKeysApi.new

id = 56 # Integer | API Key ID

opts = { 
  include: "include_example", # String | Related objects that can be included in the response:  user See Including Objects for more information.
  name: "name_example" # String | The name of the API Key
}

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

Parameters

Name Type Description Notes
id Integer API Key ID
include String Related objects that can be included in the response: user See Including Objects for more information. [optional]
name String The name of the API Key [optional]

Return type

ApiKey

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