> For the complete documentation index, see llms.txt.
Skip to main content

Check out Port for yourself ➜ 

User

User is a data type used to reference users that exist in Port.

Common usage​

Use Port User properties to reference people by email address, such as:

  • The engineer currently on call.
  • The lead maintainer of a service.
  • The reviewer assigned to a change.

Display format​

Both email and user formats accept an email address, but display it differently:

  • email format displays the raw email string.
  • user format displays the user's name and avatar from Port's list of known users.

The user format also indicates each user's status:

User statusExample
ActiveActive Port user displayed with an initials avatar and email address
InvitedInvited Port user displayed with a dashed initials avatar and email address
UnregisteredUnregistered Port user displayed with a generic avatar and email address

API definition​

You can add user properties using the blueprint JSON editor, the API, Terraform, or Pulumi.

User selection in the UI

Selecting User in the blueprint UI form creates a relation to the _user blueprint, rather than a user property.

Single or multiple users​

Use the Basic definition for a single user or the Array definition for multiple users.

Changing the number of users

You cannot switch an existing property between a single value and an array. Create a new property and migrate its data before replacing the original.

{
"myUserProp": {
"title": "My user",
"icon": "My icon",
"description": "My user property",
"type": "string",
"format": "user",
"default": "me@example.com"
}
}

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 = {
string_props = {
myUserProp = {
title = "My user"
required = false
format = "user"
}
}
}
}

Pulumi definition​

"""A Python Pulumi program"""

import pulumi
from port_pulumi import Blueprint,BlueprintPropertiesStringPropsArgs,BlueprintPropertiesArgs

blueprint = Blueprint(
"myBlueprint",
identifier="myBlueprint",
title="My Blueprint",
properties=BlueprintPropertiesArgs(
string_props={
"myUserProp": BlueprintPropertiesStringPropsArgs(
title="My user",
required=False,
format="user",
)
}
),
relations={}
)