--- title: "API: listCredentials" slug: "api-listcredentials" updated: 2025-01-07T16:30:38Z published: 2025-01-07T16:30:38Z canonical: "support.smarteru.com/api-listcredentials" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.smarteru.com/llms.txt > Use this file to discover all available pages before exploring further. # API: listCredentials - Starting June 1, 2022, SmarterU will require all API calls to POST to HTTPS. Any POST to HTTP will result in the SU:01 error (i.e., No POST data detected.). - If you are viewing the help in a language other than English, please change your language to English before copying and pasting any code. All API attributes and functions are in English. - Tags are required unless specified. ## **Description** The listCredentials method retrieves [actions](/v1/docs/actions) that meet the specified filters. [Actions](/v1/docs/actions) were previously referred to *credentials*.   ## **Who Has Access** The following users have access to the listCredentials method: - Users with the [Manage Learning Plans, Certifications, and Requirements](/v1/docs/account-permission-manage-learning-plans-certifications-and-requirements) account permission. - [Administrators and owners](/v1/docs/user-profile-information#access-level). ## **API Call XML Package** ```markup listCredentials - OR - - OR - ``` ## **Credential Tag Group** The Credential tag group is a container for the how the response is returned and the action filters. ```markup - OR - - OR - ``` The Credential tag may contain the following. ### **Page** (optional) The page number to return. The default is *1*. ### PageSize (optional) The maximum number of results to return. If the PageSize tag is not provided, up to 50 results are returned by default. The maximum allowed value is 1000. ### SortField (optional) The field used to sort the results. Acceptable values are: - *Name* - The action's name. - *Status* - The action's status - *Expiration* - The action's expiration date. ### SortOrder (optional) The direction that the results will be sorted: - *Asc* - The results will be sorted in ascending order. This is the default. - *Desc* - The results will be sorted in descending order. ### **Filters** (optional) The Filters tag is a container for action filters. Refer to [Filters Tag Group](/v1/docs/api-listcredentials#filters-tag-group). ## Filters Tag Group The Filters tag group is a container for action filters. ```markup - OR - - OR - ``` The Filters tag may contain the following. ### CredentialStatus The action's status. Acceptable values are *Active*, *Inactive*, or *All*. The default is *All*. ### Expiration A container for filtering actions by their expiration. Refer to [Expiration Tag Group](/v1/docs/api-listcredentials#expiration-tag-group). ### Tags2 A container for filtering actions by their tags. Refer to [Tags2 Tag Group](/v1/docs/api-listcredentials#tags2-tag-group). ## Expiration Tag Group The Expiration tag group is a container for filtering actions by their expiration. ```markup - OR - ``` The Expiration tag contains the following. ### Days (optional) A container for filtering actions based on the number of days until they expire. For example, actions that expire within 14-21 days. This tag is mutually exclusive with the [Date](/v1/docs/api-listcredentials#date-optional) tag and contains the following. | Tag | Description | | --- | --- | | **DaysFrom** | The smaller number in the range of days that an action expires. For example, if you're filtering for actions that expire within 14-21 days, DaysFrom is 14. | | **DaysTo** | The larger number in the range of days that an action expires. For example, if you're filtering for actions that expire within 14-21 days, DaysTo is 21. | ### Date (optional) A container for filtering actions based on the date that they expire. This tag is mutually exclusive with the [Days](/v1/docs/api-listcredentials#days-optional) tag. This tag contains the following. | Tag | Description | | --- | --- | | **DateFrom** | The first date to include in the action expiration date range filter in d-MMM format. | | **DateTo** | The last date to include in the action expiration date range filter in d-MMM format. | ## Tags2 Tag Group The Tags2 tag group is a container for filtering actions by their tags. ```markup - OR - ``` Each tag filter is contained in a Tag2 tag and may contain the following. ### TagID To obtain a tag's ID: 1. Navigate to the [Tag Management Dashboard](https://support.smarteru.com/docs/tag-management-dashboard). 2. Right click on a tag. 3. Click **Inspect** (or Inspect Element, in some browsers). This displays the Developer Tools in your browser. The tag's ID will be located within the code. ![](https://cdn.document360.io/7efaadab-fef6-4186-806a-2ca14c9ce9ea/Images/Documentation/Tag%20ID%2020211115.png) If you do not see the code, you may need to view a different tab within your Developer Tools. ### TagName The [tag's name](https://support.smarteru.com/docs/tag-main#name). This tag is mutually exclusive with the TagID tag. ### TagValues (optional) A comma-separated list of the [tag values](/v1/docs/tag-pre-defined-values) to include. ## **API Response XML Package** The [API response XML package](/v1/docs/api-response-xml-package) will always include a Result, Info, and [Errors](/v1/docs/api-listcredentials#error-codes) tag. ```markup ``` The Credential tag is a container for the actions returned by the listCredentials method. Each action is contained in a Credential tag and may contain the following. ### **Name** The [action's name](/v1/docs/action-main#name). ### CredentialID The action's system-generated identifier. ### **Status** The [action's status](/v1/docs/action-main#status). ### Expires Indicates whether the [action expires](https://support.smarteru.com/v1/docs/action-expiration#expires). Acceptable values are: - *0*  - The action doesn't expire. - *1* - The action expires. ### ExpirationType Indicates how the action's expiration is calculated: - *ByDays* - The action's expiration is calculated based on a specified number of days. - *ByDate* - The action's expiration is a specific date. ### Expiration The value returned depends on what ExpirationType returns: - If [ExpirationType](/v1/docs/api-listcredentials#expirationtype) returns ByDays, this returns the number of days. - If [ExpirationType](/v1/docs/api-listcredentials#expirationtype) returns ByDate, this returns the date. ### Tags2 A container for the action's tags. Each tag is contained in a Tags2 tag and contains the following. | Tag | Description | | --- | --- | | **TagID** | The tag's system-generated identifer. | | **TagName** | The tag's name. | | **TagValues** | A comma-separated list of tag values associated with the action. | ### TotalRecords The total number of records returned. ### Example API Response XML Package Below is an example of an API response XML package. ```markup Success 1123 Active 0 12 Active 1 ByDays 365 ``` ## **Error Codes** | Error Code | Description | | --- | --- | | LC:01 | The page provided is invalid. | | LC:02 | The filters provided is invalid. | | LC:03 | The credential status provided is invalid. | | LC:04 | The required permissions are not met to call the listCredentials method. | | LC:05 | The value for a role status must be Active, Inactive, or All. | | LC:06 | The page size provided is invalid. | | LC:07 | The sort field provided is invalid. | | LC:08 | The sort order provided is invalid. | | LC:09 | The expiration provided is invalid. | | LC:10 | The days provided is invalid. | | LC:11 | The days from provided is invalid. | | LC:12 | The days to provided is invalid. | | LC:13 | The date provided is invalid. | | LC:14 | The date from provided is invalid. | | LC:15 | The date to provided is invalid. | ## Related - [Actions](/actions.md) - [API: createCredential](/api-createcredential.md) - [API: getCredential](/api-getcredential.md) - [API: updateCredential](/api-updatecredential.md)