Retrieving Time Services
Prerequisites
Authenticate - Submit your user credentials, Client ID, and Client Secret for OAuth2 authentication. Refer to API Authentication for instructions on how to call the OAuth API to validate and authenticate your credentials.
Search Time Services
To list your time services that match your search criteria, send a POST
request to the /fabric/v4/timeServices/search
endpoint. Specify the criteria in the filter
object in the body of the request. Use the pagination
and sort
objects to control the format of the response.
Sample cURL Request:
curl -X POST 'https://api.equinix.com/fabric/v4/timeServices/search'
-H 'authorization: Bearer <token>'
-d '{
"filter": {
"and": [
{
"property": "/state",
"operator": "=",
"values": [
"PROVISIONED"
]
},
{
"property": "/project/projectId",
"operator": "=",
"values": [
"995072000433550"
]
}
]
},
"pagination": {
"offset": 0,
"limit": 20
},
"sort": [
{
"direction": "DESC",
"property": "/changeLog/createdDateTime"
}
]
}'
For a full list of search criteria, pagination, and sort options, see the API Reference.
Get a Time Service
To get the details of a time service, send a GET
request to the /fabric/v4/timeServices/{serviceID}
endpoint. Specify the ID of the time service in the path of the request.
Sample cURL Request:
curl -X
GET 'https://api.equinix.com/fabric/v4/timeServices/3a58dd05-f46d-4b1d-a154-2e85c396ea62'
-H 'authorization: Bearer <token>'
Sample Response:
{
"href": "https://api.equinix.com/fabric/v4/timeServices/a8ba52de-faae-43b5-b0b1-6904d37ee011",
"uuid": "a8ba52de-faae-43b5-b0b1-6904d37ee011",
"name": "EPT-Single-Service",
"type": "NTP",
"state": "PROVISIONING",
"connections": [
{
"href": "https://api.equinix.com/fabric/v4/connections/a8ba52de-faae-43b5-b0b1-6904d37ee011",
"uuid": "06dbb0e3-e55d-4090-8aff-fc5654abaad0"
}
],
"package": {
"href": "https://api.equinix.com/fabric/v4/timeServicePackages/NTP_STANDARD",
"code": "NTP_STANDARD"
},
"ipv4": {
"primary": "192.168.0.2",
"secondary": "192.168.0.3",
"networkMask": "255.255.255.240",
"defaultGateway": "192.168.0.1"
},
"account": {
"accountNumber": 123456
}
}