Component description

The api-card component creates a list of cards that serve as easy navigation to apps, spaces, or objects on pages/dashboards.

Example

Minimal JSON

{
  "type": "api-card",
  "api": "",
  "nameAttribute": "",
  "layouts": []
}
{
  "key": "space_cards_app_overview",
  "template": {
    "componentId": "template#space_cards_app_overview",
    "type": "api-card",
    "api": "api/dashboard/spaces",
    "headerTitle": "page.home.spaces.title.key",
    "noDataText": "page.home.spaces.no_data.key",
    "noDataIconKey": "circle",
    "onClickOpens": "link",
    "nameAttribute": "#shortDescription",
    "middleSectionAttributeTypeKey": "#shortDescription",
    "bottomTextKey": "core#api.card.objects.apps",
    "filter": {
      "applicationId": {
        "value": "@appId"
      },
      "includeSubspaces": {
        "value": true
      }
    },
    "layouts": [
      {
        "type": "cards"
      }
    ]
  }
}

Example taken from the core package.

Nested properties

PropertyDescriptionValuesMandatory
typeapi-cardstringYes
apiAPI endpoint which provides data to the card. See the full list of available API endpoints.string*Yes
layoutsDefault layout for the API cards. At least one must be selected. To enable a layout selector, add more layout types. Supported values are: cards, tablearray of strings in (“cards”, “table”)Yes
nameAttributeName of the card displayed as the first row. Supported values are for example: spaceName, applicationName, objectName, dashboardName, #shortDescriptionstringYes
additionalRelationTypesArray of keys of additional relation types displayed on the card.arrayNo
additionalUserRelationTypesArray of keys of additional user relation types displayed on the card.arrayNo
bottomTextKeyKey of the translation used at the bottom of the card. E.g., number of objects, apps, sub-spaces.stringNo
componentIdUnique ID of a component. If left empty, a random string will be generated. Primarily used in patch packages to define the component's position within the layout (template).stringNo
favouriteObjectTypesArray of keys of favorite object types.arrayNo
filterConditions used to limit or refine data selection. For more information, see filter.jsonNo
headerRightActionsActions available in the component header. Supported values are: search, addSpacestring in (“search”, “addSpace”)No
headerTitleTranslation key of the title. Define the key in translations to specify how the text is displayed in the UI. Unlike the name property, if you use a specific string of text for the title, this text will appear with the package key. For example, Comment Section will be displayed as package_key_comment section.stringNo
headerTitleFilteredAssets filter.stringNo
isMarketplaceVisualShortens the middle section of long breadcrumbs into ellipses. A tooltip with the full path is available upon hover.booleanNo
middleSectionAttributeTypeKeyKey of the translation used in the middle of the card. E.g., #shortDescription for description.stringNo
noDataIconKeyKey of the icon used to visually represent the asset. Use predefined icons from Settings > Configuration > Icons, or define custom ones in the icons asset. Icon is used when no object is found.stringNo
noDataTextKey of the translation displayed when no object is found.stringNo
objectPathKeyObject or application path. Supported value is: pathNames: Use to add object path to the card.stringNo
onClickOpensAction when a card is clicked. Supported values are: link: Opens the specified link., newWindow: Opens the asset in a new window., rightPanelDetail: Opens the object in a right panel.string in (“link”, “newWindow”, “rightPanelDetail”)No
relationTypeKeyKey of the relation type displayed on the card.stringNo
searchFormKeyKey of the relevant search form.stringNo
secondaryNameAttributeKey of the relation type used as the card’s subtitle, whose icon is also displayed.stringNo
sortTypesParameters that can be used to sort API cards. Add multiple types for a selector. Supported values are: created, modified, name, popularityarray of strings in (“created”, “modified”, “name”, “popularity”)No
userRelationTypeKeyKey of the user relation type displayed on the card.stringNo