{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ovh/json-schema/ovh-auth-api-credential-request-params-schema.json",
  "title": "auth.ApiCredentialRequestParams",
  "description": "Credential request to get access to the API",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ovh-v1-auth-openapi.yml#/components/schemas/auth.ApiCredentialRequestParams",
  "type": "object",
  "properties": {
    "accessRules": {
      "type": "array",
      "description": "Wanted API routes",
      "items": {
        "$ref": "#/$defs/auth.AccessRuleRequest"
      }
    },
    "allowedIPs": {
      "type": [
        "array",
        "null"
      ],
      "description": "If defined, list of IP blocks that can use the credential",
      "items": {
        "$ref": "#/$defs/ipBlock"
      }
    },
    "redirection": {
      "type": [
        "string",
        "null"
      ],
      "description": "Address where the customer will be redirected after authentication"
    }
  },
  "required": [
    "accessRules"
  ],
  "$defs": {
    "auth.AccessRuleRequest": {
      "type": "object",
      "description": "Access rule requested for the application",
      "properties": {
        "method": {
          "allOf": [
            {
              "$ref": "#/$defs/auth.HTTPMethodEnum"
            }
          ],
          "description": "Allowed Method"
        },
        "path": {
          "type": "string",
          "description": "Allowed path"
        }
      }
    },
    "auth.HTTPMethodEnum": {
      "type": "string",
      "description": "All HTTP methods available",
      "enum": [
        "DELETE",
        "GET",
        "PATCH",
        "POST",
        "PUT"
      ]
    },
    "ipBlock": {
      "type": "string",
      "description": "IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)",
      "format": "ip-block"
    }
  }
}