Get list of properties

更新時間: 2023-04-04 20:43:05

The API returns a summary of properties including the ID, latest version number, comments, staging version number, production version number, and last update time of each one. Use query parameters to filter the list of returned properties.

  • 単一ユーザーの使用頻度: 300/5min
  • 使用できるプロダクト: CDN Pro

リクエストパラメータ

Params パラメータ

パラメータ名説明
searchString
The value of the search parameter is matched on the id, name, description, and hostnames fields of each property. A value like 'domain.com' would match on hostnames domain.com and abc.123domain.com. Use a value beginning with the '^' character to narrow the matches to properties with name, description, or hostnames fields beginning with the text following the '^'. For example, '^domain' would match on hostnames domain.com and domain123.com but not abc.123domain.com. Since a limited number of characters are permitted in URIs, you must encode '^' as '%5E' when specifying a search parameter containing it in the URI, for example, curl -i --url 'https://ngapi.cdnetworks.com/cdn/properties?search=%5Edomain' ... . Note that a property will be returned if the search matches on any version of the property which has not been deleted. Also, when searching for a property by its ID, you must specify the entire ID as partial matches are not supported.
legacyTypeString
Service type, one of wsapro, webpro, vodpro , downloadpro , 1523.
hasConfigString
The value of hasConfig is used to filter the results. It can be any field name of a property version, optionally followed by a colon and a value. For example: hasConfig=hasBeian:true When a colon and value are specified, only properties whose configurations have that value for the field will be returned. The value can be preceded by an exclamation mark, '!', to invert the search. For example: hasConfig=edgeLogic!sorted. In this case, we check that the edgeLogic field does not include the value 'sorted'. Searches for values of numeric or boolean fields require an exact match. However, partial matches are supported for string fields. For example, hasConfig=hostnames:domain returns all properties with a hostname containing the string 'domain' such as 'mydomain.com' and 'thedomains.com'. If a colon and value are omitted, all properties with a non-empty value for the field will be returned. Specify multiple hasConfig parameters to filter on multiple conditions. Example: hasConfig=hasBeian:true&hasConfig=realTimeLog Only properties matching all the parameters will be returned. If a property has multiple versions, the property will be included in the API response if any of its versions matches the hasConfig parameter. Subfields of a property version can be specified by using the period symbol as a separator. Refer to additional examples below. If matching against values with spaces or special characters, remember to encode them in the URL. Additional examples:
ValueDescription
hasConfig=disableHttp2:trueReturn properties that don't support HTTP2
hasConfig=extraServicePorts.http:85Return properties supporting port 85 for HTTP requests.
hasConfig=origins.servers:myorigin.comReturn properties using myorigin.com as an origin server.
targetString
Enum: all,staging,production Default: all The value can be 'all', 'staging', or 'production' to filter the results based on where the property has been deployed.
offsetInteger
Default: 0 Indicates the first item to return. The default is '0'.
limitInteger
Default: 100 Range: <= 200 Maximum number of properties to return. The default is to return a summary of all properties.
sortOrderString
Enum: asc,desc Default: desc Order of properties to return. The default is to return the last one updated first.
sortByString
Enum: creationTime,lastUpdateTime Default: lastUpdateTime Returns results in sorted order.

レスポンスパラメータ

Body パラメータ

パラメータ名説明
propertiesList
List of properties.
idString
ID of the property.
descriptionString
A description of the property.
nameString
creationTimeString
RFC3339 format date indicating when the property was created.
lastUpdateTimeString
RFC3339 date indicating when the property was last updated.
latestVersionInteger
Latest version of the property.
legacyTypeString
Enum: wsapro,webpro,vodpro,downloadpro Service type, one of wsapro, webpro, vodpro , downloadpro , 1523.
stagingVersionGetListOfPropertiesResponsePropertiesStagingVersion
Describes the version of the property deployed to staging.
versionInteger
Property version deployed to staging.
hostnamesList
Hostnames of the property deployed to staging.
productionVersionGetListOfPropertiesResponsePropertiesProductionVersion
Describes the version of the property deployed to production.
versionInteger
Property version deployed to production.
hostnamesList
Hostnames of the property deployed to production.
countInteger
Range: >= 0 Number of properties.

エラーコード

エラーコード(code)説明(message)HTTPステータスコード意味
InvalidListOffsetThe offset must be a valid non-negative integer.400The offset must be a valid non-negative integer.
InvalidTargetInvalid target query parameter. Only "all", "staging", or "production" are allowed.400Invalid target query parameter. Only "all", "staging", or "production" are allowed.
TooManyEntriesThis query could not be completed due to the exceptionally large amount of data to be processed. Please try to use some filters to reduce the scope of the query.400This query could not be completed due to the exceptionally large amount of data to be processed. Please try to use some filters to reduce the scope of the query.

入力例

200
400
200
リクエスト例
コピー コピー完了
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.cdnetworks.com/cdn/properties" \
-X "GET" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json"
レスポンス例
コピー コピー完了
{
    "count": 2,
    "properties": [
        {
            "id": "8fdc9c949e986564cc24b149",
            "name": "TestProperty1572488767058",
            "legacyType": "webpro",
            "description": "validPropertyNoCertificate_PropertySteps",
            "latestVersion": 1,
            "lastUpdateTime": "2019-10-31T02:26:07Z",
            "creationTime": "2019-10-31T02:26:07Z"
        },
        {
            "id": "59ebc3af71985328ded56857",
            "name": "TestProperty1572488525164",
            "legacyType": "webpro",
            "description": "1572488525164unique description property",
            "latestVersion": 1,
            "productionVersion": {
                "version": 1,
                "hostnames": [
                    "testdomain-t1572488525164.mwtrial.info"
                ]
            },
            "lastUpdateTime": "2019-10-31T02:22:05Z",
            "creationTime": "2019-10-31T02:22:05Z"
        }
    ]
}