Enables scripted content fragments to use API keys
Properties
Name | Access | Type | Description |
---|---|---|---|
Current | Read | ApiKey | Current |
Methods
Create
Creates a new API Key
Velocity
#set($apiKeyResponse = $core_v2_apiKey.Create($name, "%{ Enabled = $enabledArg, SecretKey = $secretKeyArg }"))
JavaScript
var apiKeyResponse = core_v2_apiKey.Create(name, { Enabled: enabledArg, SecretKey: secretKeyArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | String | Name of the API Key | Required | ||
Enabled | Boolean | If the key is enabled or not | Optional | ||
SecretKey | String | Secret value to set the API key to | Optional |
Returns
Delete
Deletes an API Key
Velocity
#set($additionalInfoResponse = $core_v2_apiKey.Delete($id))
JavaScript
var additionalInfoResponse = core_v2_apiKey.Delete(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Id of the API Key to delete | Required |
Returns
List
List Overload 1
Lists API Keys
Velocity
#set($pagedListResponse = $core_v2_apiKey.List())
JavaScript
var pagedListResponse = core_v2_apiKey.List();
List Overload 2
Lists API Keys
Velocity
#set($pagedListResponse = $core_v2_apiKey.List("%{ PageIndex = $pageIndexArg, PageSize = $pageSizeArg }"))
JavaScript
var pagedListResponse = core_v2_apiKey.List({ PageIndex: pageIndexArg, PageSize: pageSizeArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
PageIndex | Int32 | Zero-based Page Index | Optional | ||
PageSize | Int32 | Results per page | Optional |
Returns
Update
Updates an API Key
Velocity
#set($apiKeyResponse = $core_v2_apiKey.Update($id, "%{ Enabled = $enabledArg, Name = $nameArg, Regenerate = $regenerateArg, SecretKey = $secretKeyArg }"))
JavaScript
var apiKeyResponse = core_v2_apiKey.Update(id, { Enabled: enabledArg, Name: nameArg, Regenerate: regenerateArg, SecretKey: secretKeyArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Id | Required | ||
Enabled | Boolean | If the key is enabled or not | Optional | ||
Name | String | Name of the key | Optional | ||
Regenerate | Boolean | When true, the SecretKey will be regenerated | Optional | ||
SecretKey | String | Secret value to set the API key to | Optional |