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

Latest commit

 

History

History
248 lines (170 loc) · 6.55 KB

File metadata and controls

248 lines (170 loc) · 6.55 KB

APIKeysApi

All URIs are relative to http://localhost/

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(include, name)

Create a(n) API Key

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

Example

// Import classes:
//import io.evident.EspSdk.ApiException;
//import io.evident.api.APIKeysApi;


APIKeysApi apiInstance = new APIKeysApi();
String include = "include_example"; // String | Related objects that can be included in the response:  user See Including Objects for more information.
String name = "name_example"; // String | The name of the API Key
try {
    ApiKey result = apiInstance.create(include, name);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling APIKeysApi#create");
    e.printStackTrace();
}

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

No authorization required

HTTP request headers

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

delete

Meta delete(id)

Delete a(n) API Key

Example

// Import classes:
//import io.evident.EspSdk.ApiException;
//import io.evident.api.APIKeysApi;


APIKeysApi apiInstance = new APIKeysApi();
Integer id = 56; // Integer | API Key ID
try {
    Meta result = apiInstance.delete(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling APIKeysApi#delete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer API Key ID

Return type

Meta

Authorization

No authorization required

HTTP request headers

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

list

PaginatedCollection list(include, page)

Get a list of API Keys

Example

// Import classes:
//import io.evident.EspSdk.ApiException;
//import io.evident.api.APIKeysApi;


APIKeysApi apiInstance = new APIKeysApi();
String include = "include_example"; // String | Related objects that can be included in the response:  user See Including Objects for more information.
String 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.
try {
    PaginatedCollection result = apiInstance.list(include, page);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling APIKeysApi#list");
    e.printStackTrace();
}

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

No authorization required

HTTP request headers

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

show

ApiKey show(id, include)

Show a single API Key

Example

// Import classes:
//import io.evident.EspSdk.ApiException;
//import io.evident.api.APIKeysApi;


APIKeysApi apiInstance = new APIKeysApi();
Integer id = 56; // Integer | API Key ID
String include = "include_example"; // String | Related objects that can be included in the response:  user See Including Objects for more information.
try {
    ApiKey result = apiInstance.show(id, include);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling APIKeysApi#show");
    e.printStackTrace();
}

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

No authorization required

HTTP request headers

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

update

ApiKey update(id, include, name)

Update a(n) API Key

Example

// Import classes:
//import io.evident.EspSdk.ApiException;
//import io.evident.api.APIKeysApi;


APIKeysApi apiInstance = new APIKeysApi();
Integer id = 56; // Integer | API Key ID
String include = "include_example"; // String | Related objects that can be included in the response:  user See Including Objects for more information.
String name = "name_example"; // String | The name of the API Key
try {
    ApiKey result = apiInstance.update(id, include, name);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling APIKeysApi#update");
    e.printStackTrace();
}

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

No authorization required

HTTP request headers

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