---
title: UtilitiesApi
---
## PureCloud::UtilitiesApi
All URIs are relative to *https://api.mypurecloud.com*
Method | HTTP request | Description
------------- | ------------- | -------------
|[**get_date**](UtilitiesApi.html#get_date) | **GET** /api/v2/date | Get the current system date/time|
|[**get_timezones**](UtilitiesApi.html#get_timezones) | **GET** /api/v2/timezones | Get time zones list|
|[**post_details**](UtilitiesApi.html#post_details) | **POST** /api/v2/certificate/details | Returns the information about an X509 PEM encoded certificate or certificate chain.|
{: class="table table-striped"}
## -[**ServerDate**](ServerDate.html) get_date
Get the current system date/time
### Example
~~~ruby
# load the gem
require 'purecloud'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::UtilitiesApi.new
begin
#Get the current system date/time
result = api_instance.get_date
p result
rescue PureCloud::ApiError => e
puts "Exception when calling UtilitiesApi->get_date: #{e}"
end
~~~
### Parameters
This endpoint does not need any parameter.
{: class="table table-striped"}
### Return type
[**ServerDate**](ServerDate.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**TimeZoneEntityListing**](TimeZoneEntityListing.html) get_timezones(opts)
Get time zones list
### Example
~~~ruby
# load the gem
require 'purecloud'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::UtilitiesApi.new
opts = {
page_size: 25, # Integer | Page size
page_number: 1 # Integer | Page number
}
begin
#Get time zones list
result = api_instance.get_timezones(opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling UtilitiesApi->get_timezones: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page_size** | **Integer**| Page size | [optional] [default to 25]
**page_number** | **Integer**| Page number | [optional] [default to 1]
{: class="table table-striped"}
### Return type
[**TimeZoneEntityListing**](TimeZoneEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**ParsedCertificate**](ParsedCertificate.html) post_details(opts)
Returns the information about an X509 PEM encoded certificate or certificate chain.
### Example
~~~ruby
# load the gem
require 'purecloud'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::UtilitiesApi.new
opts = {
body: PureCloud::Certificate.new # Certificate |
}
begin
#Returns the information about an X509 PEM encoded certificate or certificate chain.
result = api_instance.post_details(opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling UtilitiesApi->post_details: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Certificate**](Certificate.html)| | [optional]
{: class="table table-striped"}
### Return type
[**ParsedCertificate**](ParsedCertificate.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json