List hostnames for an account

GET https://{{host}}/papi/v1/hostnames

This operation lists active property hostnames for all properties available in an account. Use the optional query parameters to paginate, sort, and filter the results. You can nest and combine filters to obtain desired results. To view paginated results, use the response's nextLink and previousLink.

Request Params

KeyDatatypeRequiredDescription
offsetstring(Optional) For paginated responses, specifies the page of results you want to navigate to, starting from 0.
limitstring(Optional) For paginated responses, specifies the number of hostnames objects to include on each page.
sortstring(Optional) Enum Sort the results based on the cnameFrom value, either hostname:a for ascending or hostname:d for descending order. The default is hostname:a.
hostnamestring(Optional) Filter the results by cnameFrom. Supports wildcard matches with *.
cnameTostring(Optional) Filter the results by edge hostname. Supports wildcard matches with *.
networkstring(Optional) Enum Network of activated hostnames, either STAGING or PRODUCTION.
contractIdstring(Optional) Unique identifier for the contract. See ID prefixes for details on omitting the value's ctr_ prefix.
groupIdstring(Optional) Unique identifier for the group. See ID prefixes for details on omitting the value's grp_ prefix.
accountSwitchKeystring(Optional) For customers who manage more than one account, this runs the operation from another account. The Identity and Access Management API provides a list of available account switch keys.

HEADERS

KeyDatatypeRequiredDescription
PAPI-Use-Prefixesstring(Required) Enum Sets whether to represent ID prefixes in response data. Set to false when exchanging PAPI data with other APIs.
Acceptstring

RESPONSES

status: OK

{"accountId":"act_A-CCT5678","availableSort":["hostname:a","hostname:d"],"currentSort":"hostname:a","defaultSort":"hostname:a","hostnames":{"currentItemCount":3,"items":[{"cnameFrom":"www.example.com","contractId":"ctr_K-0N7RAK7","groupId":"grp_12345","propertyId":"prp_123345","propertyName":"example.com","propertyType":"TRADITIONAL","stagingCertType":"CPS_MANAGED","stagingCnameTo":"www.example.com.edgekey.net","stagingCnameType":"EDGE_HOSTNAME","stagingEdgeHostnameId":"ehn_895822"},{"cnameFrom":"www.example2.com","contractId":"ctr_C-0N7RAC71","groupId":"grp_54321","productionCertType":"DEFAULT","productionCnameTo":"www.example2.com.edgekey.net","productionCnameType":"EDGE_HOSTNAME","productionEdgeHostnameId":"ehn_895825","propertyId":"prp_123424","propertyName":"example2.com","propertyType":"TRADITIONAL"},{"cnameFrom":"www.example3.com","contractId":"ctr_K-0N7RAK7","groupId":"grp_54321","productionCertType":"DEFAULT","productionCnameTo":"www.example3.com.edgekey.net","productionCnameType":"EDGE_HOSTNAME","productionEdgeHostnameId":"ehn_895833","propertyId":"prp_123424","propertyName":"example3.com","propertyType":"HOSTNAME_BUCKET"}],"nextLink":"/papi/v1/hostnames?offset=3\u0026limit=3","previousLink":"/papi/v1/hostnames?offset=0\u0026limit=3","totalItems":17}}