Getting Information About Your API Access Rules

You can get information about your API access rules, like their ID, IP range, CA, and description.

Getting Information About Your API Access Rules Using Cockpit v2

  1. In the top right corner, click your initials.
    A drop-down menu appears.

  2. Click IconAAR API Access Rules.
    The list of your API access rules appears.

Getting Information About Your API Access Rules Using OSC CLI

The ReadApiAccessRules command lists one or more API access rules.

Request sample: Example with access key/secret key authentication
$ osc-cli api ReadApiAccessRules --profile "default" \
    --Filters '{
        "ApiAccessRuleIds": ["aar-1234567890abcdef1234567890abcdef"],
      }'
Request sample: Example with login/password authentication
$ osc-cli api ReadApiAccessRules --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
    --Filters '{
        "ApiAccessRuleIds": ["aar-1234567890abcdef1234567890abcdef"],
      }'

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • Filters: (optional) One or more filters.

The ReadApiAccessRules command returns the following elements:

  • ApiAccessRules: A list of API access rules.

  • ResponseContext: Information about the context of the response.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ApiAccessRules": [
    {
      "IpRanges": [
        "0.0.0.0/0"
      ],
      "ApiAccessRuleId": "aar-1234567890abcdef1234567890abcdef",
      "CaIds": [],
      "Cns": [],
      "Description": "Allows all IPv4 domain"
    },
    {
      "IpRanges": [
        "46.231.144.178/32"
      ],
      "ApiAccessRuleId": "aar-abcdef1234567890abcdef1234567890",
      "CaIds": [],
      "Cns": [],
      "Description": "Allows Outscale Cockpit of this region"
    }
  ]
}

Related Pages

Corresponding API Method