> For the complete documentation index, see llms.txt.
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.

Creating via UI

When creating a URL property in the UI, enabling the Custom display text toggle creates a labeled URL property. Note that this toggle cannot be changed after the property is saved.

Common usage​

Use labeled URL properties when a link needs readable display text, such as:

  • Runbook links labeled with incident types.
  • Monitoring dashboards labeled with environment names.
  • Pull requests labeled with their titles.

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​

The examples below use version 2.29.0 of the Terraform and Pulumi providers. Configure your provider first, then run one example at a time in its own project. Each example creates a blueprint; use distinct identifiers when you combine examples.

resource "port_blueprint" "myBlueprint" {
identifier = "myBlueprint"
title = "My blueprint"
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": BlueprintPropertiesObjectPropsArgs(
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"
}
]
}
}