Enables scripted content fragments to use API keys
Methods
Create
Creates a new API Key
Usage
#set($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 | bool | If the key is enabled or not | Optional | ||
SecretKey | string | Secret value to set the API key to | Optional |
Return Type
ApiKey
Delete
Deletes an API Key
Usage
#set($additionalInfoResponse = $core_v2_apiKey.Delete($id))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | int | Id of the API Key to delete | Required |
Return Type
List
Lists API Keys
Usage
#set($pagedListResponse = $core_v2_apiKey.List())
Return Type
PagedList<ApiKey>
List
Lists API Keys
Usage
#set($pagedListResponse = $core_v2_apiKey.List("%{PageIndex = $pageIndexArg, PageSize = $pageSizeArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
PageIndex | int | Zero-based Page Index | Optional | ||
PageSize | int | Results per page | Optional |
Return Type
PagedList<ApiKey>
Update
Updates an API Key
Usage
#set($apiKeyResponse = $core_v2_apiKey.Update($id, "%{Enabled = $enabledArg, Name = $nameArg, Regenerate = $regenerateArg, SecretKey = $secretKeyArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | int | Id | Required | ||
Enabled | bool | If the key is enabled or not | Optional | ||
Name | string | Name of the key | Optional | ||
Regenerate | bool | When true, the SecretKey will be regenerated | Optional | ||
SecretKey | string | Secret value to set the API key to | Optional |
Return Type
ApiKey