GuidesChangelogData Inspector Library API Reference
Guides

ratelimit

ratelimit rule

The OLP CLI supports the following ratelimit rule commands:

list

Lists rate limit rules for the provided identity.

olp ratelimit rule list <identity> [command options]

Required parameters:

  • <identity> - <me | default | app HRN | user HRN> Identity for which rate limit rules should be listed. Where:
  • me - Represents the calling identity.
  • default - Represents any generic identity from the realm whose rules are not overridden by custom rules or a custom tier.
  • app HRN | user HRN - A specific app or user HRN to get rate limit rules for.

Optional parameters:

  • --project <project HRN> Filters rules to include only those that apply to the specified project HRN.
  • --endpoint-id <endpoint Id> Filters rules to include only those that apply to the specified endpoint ID.
  • --limit <max number of records> Specifies the maximum number of records returned in the result (100 by default).
  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the HERE platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --json Displays the command result in JSON format.
  • --quiet Displays rules HRNs, each on a new line.

For more information on using credentials and profiles, see Credentials setup.

Example: Get enforced rate limit rules

olp ratelimit rule list me

Output:

HRN                                                      endpoint ID                           rate                          description
hrn:here:iam::org:ratelimit/weather-api-rule             weather.svc                    1000 API Calls per 1 day             freemium developers rate limit for destination weather
hrn:here:iam::org:ratelimit/map-making-rule              map-making.svc                 1000 API Calls per 1 sec             map making service rule

show

Shows rule information for given rule HRN.

olp ratelimit rule show <identity> <rule HRN> [command parameters]

Required parameters:

  • <identity> - <me | default | appHRN | userHRN> Identity for which rate limit rules should be listed.

Where:

  • me - Represents the calling identity.

  • default - Represents any generic identity from the realm whose rules are not overridden by custom rules or a custom tier.

  • app HRN | user HRN - A specific app or user HRN to get rate limit rules for.

  • <rule HRN> The HRN of the rule.

Optional parameters:

  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the HERE platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --json Displays the command result in JSON format.
  • --quiet Displays rule description.

For more information on using credentials and profiles, see Credentials setup.

Example:

The command below shows rule info for given rule HRN.

olp ratelimit rule show me hrn:here:iam::org:ratelimit/weather-api-rule
hrn                      hrn:here:iam::org:ratelimit/weather-api-rule
description              freemium developers rate limit for destination weather
requestMatchingCriteria
  tier                   10
  endpoint Id            weather-svc
groupingMask             appHrn
metric                   apiCalls
rate
  period                 day
  periodValue            1
  value                  1000
alwaysMatch              false
overwriteControl         byMatchingCriteria