ApiKeys
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- createOrganizationApiKey() : ApiKeyWithValue
- Create an API key for an organization
- createValidation() : ApiKeyValidationResponse
- Validate API key
- deleteApiKey() : void
- Delete an API key
- listOrganizationApiKeys() : PaginatedResponse<string|int, ApiKey>
- List API keys for an organization
Properties
$client read-only
private
HttpClient
$client
Methods
__construct()
public
__construct(HttpClient $client) : mixed
Parameters
- $client : HttpClient
createOrganizationApiKey()
Create an API key for an organization
public
createOrganizationApiKey(string $organizationId, string $name[, array<string|int, string>|null $permissions = null ][, RequestOptions|null $options = null ]) : ApiKeyWithValue
Create a new API key for an organization.
Parameters
- $organizationId : string
-
Unique identifier of the Organization.
- $name : string
-
The name for the API key.
- $permissions : array<string|int, string>|null = null
-
The permission slugs to assign to the API key.
- $options : RequestOptions|null = null
Tags
Return values
ApiKeyWithValuecreateValidation()
Validate API key
public
createValidation(string $value[, RequestOptions|null $options = null ]) : ApiKeyValidationResponse
Validate an API key value and return the API key object if valid.
Parameters
- $value : string
-
The value for an API key.
- $options : RequestOptions|null = null
Tags
Return values
ApiKeyValidationResponsedeleteApiKey()
Delete an API key
public
deleteApiKey(string $id[, RequestOptions|null $options = null ]) : void
Permanently deletes an API key. This action cannot be undone. Once deleted, any requests using this API key will fail authentication.
Parameters
- $id : string
-
The unique ID of the API key.
- $options : RequestOptions|null = null
Tags
listOrganizationApiKeys()
List API keys for an organization
public
listOrganizationApiKeys(string $organizationId[, string|null $before = null ][, string|null $after = null ][, int|null $limit = null ][, EventsOrder $order = EventsOrder::Desc ][, RequestOptions|null $options = null ]) : PaginatedResponse<string|int, ApiKey>
Get a list of all API keys for an organization.
Parameters
- $organizationId : string
-
Unique identifier of the Organization.
- $before : string|null = null
-
An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
- $after : string|null = null
-
An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
- $limit : int|null = null
-
Upper limit on the number of objects to return, between
1and100. Defaults to 10. - $order : EventsOrder = EventsOrder::Desc
-
Order the results by the creation time. Defaults to "desc".
- $options : RequestOptions|null = null