> For AI agents: [llms.txt](https://docs.trustedauth.com/llms.txt) provides a Markdown index of this documentation.

# Get a smart credential definition by name

`POST /api/web/v1/scdefns/name`

Get the smart credential definition for the specified name. Caller requires the SCDEFNS:VIEW permission.

## Request Body

Required.

### application/json

Schema

```json
{
  "required": [
    "name"
  ],
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the smart credential definition to be retrieved."
    }
  },
  "description": "Parameters to get Smart Credential Definitions by Name.",
  "title": "SCDefnGetParms"
}
```

## Responses

### 200

Successful

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "cardDigitalIdConfigRequired": {
      "type": "boolean",
      "description": "A flag indicating if smart credentials using this SC definition must have a card digital id config defined."
    },
    "cardHolderDigitalIdConfigRequired": {
      "type": "boolean",
      "description": "A flag indicating if smart credentials using this SC definition must have a card holder digital id config defined."
    },
    "cardPinDigits": {
      "type": "string",
      "description": "Requirements for digits in card PINs for smart credentials for this SC Defn.",
      "enum": [
        "ALLOWED",
        "REQUIRED",
        "NOT_ALLOWED",
        "NOT_SET"
      ]
    },
    "cardPinLength": {
      "type": "integer",
      "description": "The length of card PINs generated for smart credentials for this SC Defn.",
      "format": "int32"
    },
    "cardPinLower": {
      "type": "string",
      "description": "Requirements for lowercase letters in card PINs for smart credentials for this SC Defn.",
      "enum": [
        "ALLOWED",
        "REQUIRED",
        "NOT_ALLOWED",
        "NOT_SET"
      ]
    },
    "cardPinMaxAttempts": {
      "type": "integer",
      "description": "The maximum number of times a wrong PIN can be entered incorrectly before it locks out the smart credential.",
      "format": "int32"
    },
    "cardPinMaxLength": {
      "type": "integer",
      "description": "The maximum PIN length of card PINs for smart credentials for this SC Defn.",
      "format": "int32"
    },
    "cardPinMaxUsesAfterAdminReset": {
      "type": "integer",
      "description": "The maximum number of times a PIN can be used before it must be changed after it is set by an administrator.",
      "format": "int32"
    },
    "cardPinMinLength": {
      "type": "integer",
      "description": "The minimum PIN length of card PINs for smart credentials for this SC Defn.",
      "format": "int32"
    },
    "cardPinSpecial": {
      "type": "string",
      "description": "Requirements for special characters in card PINs for smart credentials for this SC Defn.",
      "enum": [
        "ALLOWED",
        "REQUIRED",
        "NOT_ALLOWED",
        "NOT_SET"
      ]
    },
    "cardPinUpper": {
      "type": "string",
      "description": "Requirements for uppercase letters in card PINs for smart credentials for this SC Defn.",
      "enum": [
        "ALLOWED",
        "REQUIRED",
        "NOT_ALLOWED",
        "NOT_SET"
      ]
    },
    "defaultCardDigitalIdConfigId": {
      "type": "string",
      "description": "The UUID of the default card digital id config.  If not set, there is no default."
    },
    "defaultCardHolderDigitalIdConfigId": {
      "type": "string",
      "description": "The UUID of the default card holder digital id config.  If not set, there is no default."
    },
    "defaultSCDefn": {
      "type": "boolean",
      "description": "A flag indicating if this is the default SC Defn."
    },
    "id": {
      "type": "string",
      "description": "The UUID of this SC Defn."
    },
    "lifetime": {
      "type": "integer",
      "description": "The lifetime (in months) of smart credentials created for this SC Defn.",
      "format": "int32"
    },
    "name": {
      "type": "string",
      "description": "The name of this SC Defn."
    },
    "pivAppletConfigId": {
      "type": "string",
      "description": "The UUID of the PIV applet configuration associated with this smart credential definition."
    },
    "pivContentSignerCAId": {
      "type": "string",
      "description": "The UUID of the CA that defines the PIV Content Signer for this SC definition. If not set, the PIV Content Signer is derived from the digital id configs."
    },
    "variables": {
      "type": "array",
      "description": "Smart Credential Definition Variables defined for this SC Defn.",
      "items": {
        "type": "object",
        "properties": {
          "defaultValue": {
            "type": "string",
            "description": "The default value of this variable."
          },
          "displayable": {
            "type": "boolean",
            "description": "A flag indicating if values for this variable should be displayed."
          },
          "generate": {
            "type": "boolean",
            "description": "A flag indicating if the initial value for this variable should be generated."
          },
          "generateLength": {
            "type": "integer",
            "description": "A length value used when generating values for this variable.",
            "format": "int32"
          },
          "id": {
            "type": "string",
            "description": "The UUID of this SC Defn Variable."
          },
          "modifiable": {
            "type": "boolean",
            "description": "A flag indicating if values for this variable can be modified."
          },
          "name": {
            "type": "string",
            "description": "The name of this SC Defn Variable."
          },
          "order": {
            "type": "integer",
            "description": "A value that specifies the order of this variable with respect to the other variables in the SC Defn.",
            "format": "int32"
          },
          "prompt": {
            "type": "string",
            "description": "Optional prompt to be used when prompting for a value for this variable."
          },
          "required": {
            "type": "boolean",
            "description": "A flag indicating if a value is required for this variable."
          },
          "restrictionDigits": {
            "type": "string",
            "description": "A value specifying restrictions on digits appearing in values of this variable.",
            "enum": [
              "ALLOWED",
              "REQUIRED",
              "NOT_ALLOWED",
              "NOT_SET"
            ]
          },
          "restrictionLower": {
            "type": "string",
            "description": "A value specifying restrictions on lowercase characters appearing in values of this variable.",
            "enum": [
              "ALLOWED",
              "REQUIRED",
              "NOT_ALLOWED",
              "NOT_SET"
            ]
          },
          "restrictionMax": {
            "type": "integer",
            "description": "A value indicating a maximum for values of this variable. How this is enforced depends on the variable type.",
            "format": "int32"
          },
          "restrictionMin": {
            "type": "integer",
            "description": "A value indicating a minimum for values of this variable. How this is enforced depends on the variable type.",
            "format": "int32"
          },
          "restrictionRegex": {
            "type": "string",
            "description": "A value specifying a regex that values of this variable must match."
          },
          "restrictionSpecial": {
            "type": "string",
            "description": "A value specifying restrictions on special characters appearing in values of this variable.",
            "enum": [
              "ALLOWED",
              "REQUIRED",
              "NOT_ALLOWED",
              "NOT_SET"
            ]
          },
          "restrictionUpper": {
            "type": "string",
            "description": "A value specifying restrictions on uppercase characters appearing in values of this variable.",
            "enum": [
              "ALLOWED",
              "REQUIRED",
              "NOT_ALLOWED",
              "NOT_SET"
            ]
          },
          "scDefnId": {
            "type": "string",
            "description": "The UUID of the SC Defn that owns this variable definition."
          },
          "type": {
            "type": "string",
            "description": "The type of this variable.",
            "enum": [
              "STRING",
              "BOOLEAN",
              "INTEGER",
              "UUID"
            ]
          },
          "uniqueness": {
            "type": "string",
            "description": "A flag indicating if values of this variable must be unique and if so within what scope.",
            "enum": [
              "GLOBAL",
              "USER",
              "NONE"
            ]
          },
          "uniquenessScopeId": {
            "type": "string",
            "description": "A value that allows a variable to be defined unique in the scope of another variable."
          }
        },
        "description": "SC Defn Variables define the details about variables defined in the SC Defn.",
        "title": "SCDefnVariable"
      }
    }
  },
  "description": "Information returned about a smart credential definition.",
  "title": "SCDefn"
}
```

### 400

Bad Request

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 401

Access denied

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 403

Forbidden

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 404

Not Found

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 409

Conflict

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

## Security

Requirements

```json
[
  {
    "AdminAPIAuthentication": [
      "SCDEFNS:VIEW"
    ]
  }
]
```
