Skip to main content

Check out Port for yourself ➜ 

Labeled URL

Labeled URL is an object type used to store URLs with custom display labels. This property allows you to associate a human-readable label with a URL, making it easier to display meaningful link text in the UI instead of showing icons only.

Common labeled URL usage

The labeled URL property type can be used to store links with descriptive labels, for example:

  • Documentation links with descriptive titles.
  • External service dashboards with custom names.
  • Related resources with meaningful descriptions.
  • Pull request links with PR titles.
  • Monitoring dashboards with environment names.

Schema structure

A labeled URL object contains two fields:

FieldTypeRequiredDescription
urlstringYesThe URL to link to (internal or external).
displayTextstringNoThe display text to show for the link.

Example value

{
"url": "https://app.datadoghq.com/dashboard/abc123",
"displayText": "Production Metrics Dashboard"
}

Display behavior

Labeled URLs are rendered intelligently based on the URL type:

  • Internal links: Displayed as navigable links within Port.
  • External links: Displayed as buttons that open in a new tab.

API definition

{
"myLabeledUrlProp": {
"title": "My labeled URL",
"icon": "Link",
"description": "My labeled URL property",
"type": "object",
"format": "labeled-url"
}
}

Check out Port's API reference to learn more.

Terraform definition

resource "port_blueprint" "myBlueprint" {
# ...blueprint properties
properties = {
object_props = {
"myLabeledUrlProp" = {
title = "My labeled URL"
description = "My labeled URL property"
format = "labeled-url"
}
}
}
}

Pulumi definition

"""A Python Pulumi program"""

import pulumi
from port_pulumi import Blueprint,BlueprintPropertiesArgs,BlueprintPropertiesObjectPropsArgs

blueprint = Blueprint(
"myBlueprint",
identifier="myBlueprint",
title="My Blueprint",
properties=BlueprintPropertiesArgs(
object_props={
"myLabeledUrlProp": BlueprintPropertiesStringPropsArgs(
title="My labeled URL",
required=False,
format="labeled-url",
)
}
),
relations={}
)

Using labeled URLs in self-service actions

You can use labeled URL properties as user inputs in self-service actions and automations. The input form provides a JSON editor with schema validation to ensure proper structure.

Example action input

{
"documentationLink": {
"title": "Documentation Link",
"description": "Link to the service documentation",
"type": "object",
"format": "labeled-url"
}
}

Example entity data

When populating an entity with labeled URL data:

{
"identifier": "my-service",
"title": "My Service",
"properties": {
"documentationLink": {
"url": "https://docs.example.com/my-service",
"label": "Service Documentation"
},
"relatedLinks": [
{
"url": "https://github.com/org/my-service",
"label": "GitHub Repository"
},
{
"url": "https://app.datadoghq.com/dashboard/xyz",
"label": "Monitoring Dashboard"
}
]
}
}