Skip to content

Commit c847fcc

Browse files
authored
Merge branch 'main' into improve-k8s-docs
2 parents 852cb80 + d22ef76 commit c847fcc

File tree

12 files changed

+921
-19
lines changed

12 files changed

+921
-19
lines changed

docs/actions-and-automations/setup-backend/create-update-entity/create-update-entity.md

Lines changed: 108 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
14
# Create/update entity
25

36
In some cases, we don't want to run complex logic via a workflow or pipeline, but rather want our backend to simply create or update an entity in our software catalog.
@@ -33,15 +36,15 @@ To use this backend type, you will need to define the following fields:
3336
| `team` | The team/s this entity will belong to. |
3437
| `icon` | The icon of the entity. |
3538
| `properties` | The properties of the entity, in `"key":"value"` pairs where the key is the property's identifier, and the value is its value. |
36-
| `relations` | The relations of the entity, in `"key":"value"` pairs where the key is the relation's identifier, and the value is the related entity's identifier. |
39+
| `relations` | The relations of the entity, in `"key":"value"` pairs where the key is the relation's identifier, and the value is the related entity's identifier (for single relations) or an array of identifiers (for "many" relations). |
3740

3841
### Use jq to map the entity
3942

4043
All fields in the `mapping` object can be mapped using `jq` expressions, by wrapping the value in double curly braces `{{ }}`.
4144

4245
For example, say we want to assign the initiator of the action to a new entity when it is created, we can take his email from the action run object and assign it to a property named `assignee`:
4346

44-
```json
47+
```json showLineNumbers
4548
{
4649
"identifier": "someTaskEntity",
4750
"title": "Some Task",
@@ -55,3 +58,106 @@ For example, say we want to assign the initiator of the action to a new entity w
5558
:::tip Test your mapping
5659
You can use the `Test JQ` button in the bottom-left corner to test your mapping against the action's schema.
5760
:::
61+
62+
## Map entity relations
63+
64+
When creating or updating entities, you often need to establish relations with other entities. The mapping approach depends on whether you're dealing with single or multiple entity inputs.
65+
66+
67+
<Tabs groupId="relation-mapping" defaultValue="single" values={[
68+
{label: "Single Entity", value: "single"},
69+
{label: "Array Entity", value: "array"},
70+
{label: "Flexible Mapping", value: "flexible"}
71+
]}>
72+
73+
<TabItem value="single">
74+
75+
For a single entity relation, map the entity identifier directly:
76+
77+
```json showLineNumbers
78+
{
79+
"identifier": "myServiceEntity",
80+
"title": "My Service",
81+
"properties": {},
82+
"relations": {
83+
"domain": "{{ .inputs.domain }}"
84+
}
85+
}
86+
```
87+
88+
</TabItem>
89+
90+
<TabItem value="array">
91+
92+
When your action accepts [array entity inputs](/docs/actions-and-automations/create-self-service-experiences/setup-ui-for-action/user-inputs/entity.md#array), you need to extract the identifiers from the array using the `map(.identifier)` pattern:
93+
94+
```json showLineNumbers
95+
{
96+
"identifier": "myUserEntity",
97+
"title": "My User",
98+
"properties": {},
99+
"relations": {
100+
"skills": "{{ .inputs.skills | map(.identifier) }}"
101+
}
102+
}
103+
```
104+
105+
:::info Array entity inputs
106+
When users select multiple entities from an [entity array input](/docs/actions-and-automations/create-self-service-experiences/setup-ui-for-action/user-inputs/entity.md#array), the input contains an array of entity objects. Each object includes both `identifier` and `title` properties, but relations can only reference entity identifiers.
107+
:::
108+
109+
</TabItem>
110+
111+
<TabItem value="flexible">
112+
113+
For maximum flexibility, you can create a conditional mapping that handles both single entity and array entity inputs:
114+
115+
```json showLineNumbers
116+
{
117+
"identifier": "myProjectEntity",
118+
"title": "My Project",
119+
"properties": {},
120+
"relations": {
121+
"dependencies": "{{ .inputs.dependencies | if type == \"array\" then map(.identifier) else .identifier end }}"
122+
}
123+
}
124+
```
125+
126+
This pattern automatically:
127+
- Extracts identifiers from arrays when multiple entities are selected
128+
- Uses the identifier directly when a single entity is selected
129+
130+
</TabItem>
131+
132+
</Tabs>
133+
134+
135+
### Common use cases
136+
137+
Here are some typical scenarios for mapping array relations:
138+
139+
**Mapping skills to a user:**
140+
```json showLineNumbers
141+
"relations": {
142+
"skills": "{{ .inputs.selectedSkills | map(.identifier) }}"
143+
}
144+
```
145+
146+
**Mapping team members to a project:**
147+
```json showLineNumbers
148+
"relations": {
149+
"members": "{{ .inputs.teamMembers | map(.identifier) }}"
150+
}
151+
```
152+
153+
**Mapping dependencies between services:**
154+
```json showLineNumbers
155+
"relations": {
156+
"dependsOn": "{{ .inputs.dependencies | map(.identifier) }}"
157+
}
158+
```
159+
160+
161+
:::info Entity titles in relations
162+
Relations can only reference entity **identifiers**, not titles. Even though entity objects contain both `identifier` and `title` properties, you must always use `.identifier` when mapping to relations.
163+
:::

docs/ai-agents/overview.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,20 @@ The data model of AI agents includes two main blueprints:
8989

9090
2. **AI invocations** - Each interaction made with an AI agent is recorded as an invocation. This acts as a log of everything going through your AI agents so you can monitor and improve them over time. Learn more in our [Interact with AI agents](/ai-agents/interact-with-ai-agents) guide.
9191

92+
## Relevant guides
93+
94+
Explore these guides to see AI agents in action and learn how to implement them in your organization:
95+
96+
- [Generate incident updates with AI](/guides/all/generate-incident-updates-with-ai)
97+
- [Enrich tasks with AI-powered context](/guides/all/enrich-tasks-with-ai)
98+
- [Setup PR enricher AI agent](/guides/all/setup-pr-enricher-ai-agent)
99+
- [Setup service explorer AI agent](/guides/all/setup-service-explorer-ai-agent)
100+
- [Setup platform request triage AI agent](/guides/all/setup-platform-request-triage-ai-agent)
101+
- [Setup task manager AI agent](/guides/all/setup-task-manager-ai-agent)
102+
- [Setup incident manager AI agent](/guides/all/setup-incident-manager-ai-agent)
103+
- [Add RCA context to AI agents](/guides/all/add-rca-context-to-ai-agents)
104+
- [Enrich security vulnerability using AI](/guides/all/enrich-security-vulnerability-using-ai)
105+
92106
## Frequently asked questions
93107

94108
<details>

docs/ai-agents/port-mcp-server.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import TabItem from "@theme/TabItem"
1414
style={{borderRadius:'4px'}}
1515
width="568"
1616
height="320"
17-
src="https://www.youtube.com/embed/hxUTTPSApQs"
17+
src="https://www.youtube.com/embed/WrVgQ-whBiE"
1818
title="YouTube video player"
1919
frameborder="0"
2020
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
@@ -49,6 +49,21 @@ The Port MCP Server directly enables these kinds of valuable, in-context interac
4949

5050
## Key capabilities and use-cases
5151

52+
<center>
53+
<div className="video-container">
54+
<iframe
55+
style={{borderRadius:'4px'}}
56+
width="568"
57+
height="320"
58+
src="https://www.youtube.com/embed/hxUTTPSApQs"
59+
title="YouTube video player"
60+
frameborder="0"
61+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
62+
allowfullscreen>
63+
</iframe>
64+
</div>
65+
</center>
66+
5267
The Port MCP Server enables you to interact with your Port data and capabilities directly through natural language within your chosen LLM-powered tools. Here's what you can achieve:
5368

5469
### Find information quickly
@@ -97,6 +112,11 @@ Receive assistance with common development and operational tasks, directly withi
97112

98113
![Getting instructions for new service setup](/img/ai-agents/MCPClaudeServiceSetup.png)
99114

115+
### Find your own use cases
116+
117+
You can use Port's MCP to find the use cases that will be valuable to you. Try using this prompt: "think of creative prompts I can use to showcase the power of Port's MCP, based on the data available in Port"
118+
119+
100120
## Using Port MCP
101121

102122
### Setup

docs/api-reference/pages.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
Port API's `pages` endpoints will undergo a structural change in the near future. The new structure will be more intuitive and easier to use.
88

9+
Until the new structure is released, you can refer to the [Swagger API documentation](https://api.port.io/swagger/#Pages) for the available endpoints and their usage.
10+
911
Currently, the `pages` endpoints allow you to:
1012

1113
- **Create**, **update**, **delete**, and **get** pages.

docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/mapping_extensions.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,38 @@ To do so, we will use the `file://` prefix with the path of the file to tell the
4545
url: .remoteUrl
4646
// highlight-next-line
4747
readme: file://README.md
48-
```
48+
```
49+
50+
## Link pipelines to repositories via selector
51+
You can configure your selector to include repository information in the pipeline entity mapping.
52+
This allows you to create a direct relationship between a pipeline and its source repository.
53+
54+
```yaml showLineNumbers
55+
- kind: pipeline
56+
selector:
57+
query: 'true'
58+
# highlight-next-line
59+
includeRepo: 'true'
60+
port:
61+
entity:
62+
mappings:
63+
identifier: .id | tostring
64+
title: .name
65+
blueprint: '"azureDevOpsPipeline"'
66+
properties:
67+
url: .url
68+
revision: .revision
69+
folder: .folder
70+
relations:
71+
project: .__projectId | gsub(" "; "")
72+
repository: >-
73+
if .__repository
74+
then .__repository.project.name + "/" + .__repository.name | gsub(" "; "")
75+
else null
76+
end
77+
```
78+
:::tip Recommendation
79+
Use this only when necessary, as including repository data requires an extra API call per pipeline, which increases the number of requests made and can impact your Azure DevOps API rate limits.
80+
81+
If you don’t require repo-level linkage, it’s more efficient to relate pipelines → projects instead.
82+
:::

docs/customize-pages-dashboards-and-plugins/page/entity-page.md

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,75 @@ Since we changed direction midway, this relation is **indirect**:
4343

4444
When looking at the entity page of a certain `Workflow Run`, the related entities `Deployment Workflow` and `Service` automatically appear, but `Deployment` does not, since its relation is in the other direction.
4545

46-
You can add additional entities to the `Related entities` table by clicking on the `+` button above the table.
46+
### Add a Related entities tab
4747

48-
In the form that appears, the `Related blueprint` dropdown will display all entities that are related in any way to the current entity. In our `Workflow Run` example above, we can use this button to add a `Deployment` tab to our widget.
48+
Click the `+` button above the table to add a custom tab.
49+
50+
1. Set the tab's `Name` and optional `Description`.
51+
52+
2. Choose the `Related blueprint` you want to display.
53+
54+
3. Pick a `Relation path`:
55+
56+
- **All paths** – includes all available paths from the current blueprint to the target blueprint.
57+
- **Specific path** – choose one specific relation chain (multi‑hop is supported).
58+
59+
4. (Optional) Add `Additional filters` to restrict the result set.
60+
61+
:::tip Relation path options
62+
Use "all paths" for a broad overview. Choose a specific path when multiple paths exist to the same blueprint and you want the tab to reflect exactly one path.
63+
:::
64+
65+
66+
#### Filters and Edit JSON
67+
68+
Selecting `Filters` opens a dialog where you can build conditions using form controls (property, operator, value).
69+
You can switch to a JSON editor using the `Edit JSON` button to define the dataset directly.
70+
71+
The dataset follows this structure:
72+
73+
```json showLineNumbers
74+
{
75+
"combinator": "and",
76+
"rules": [
77+
{
78+
"property": "$title",
79+
"operator": "contains",
80+
"value": "awesome-package"
81+
}
82+
]
83+
}
84+
```
85+
86+
87+
Use the JSON editor when you need to copy/paste filter sets, keep them in source control, or express conditions that are faster to author as JSON. You can toggle back to the form at any time.
88+
89+
<h4>Define the tab in JSON mode</h4>
90+
91+
You can also toggle `Json Mode` in the "Add tab" dialog to author the entire tab as JSON. An example:
92+
93+
```json showLineNumbers
94+
{
95+
"dataset": {
96+
"combinator": "and",
97+
"rules": [
98+
{
99+
"property": "$title",
100+
"operator": "contains",
101+
"value": "awesome-package"
102+
}
103+
]
104+
},
105+
"title": "custom path package",
106+
"targetBlueprint": "Package",
107+
"relationPath": {
108+
"path": ["service_in_env", "package"],
109+
"fromBlueprint": "service_in_env_deployments"
110+
}
111+
}
112+
```
113+
114+
This JSON corresponds to a tab named `custom path package` that targets the `Package` blueprint, follows a specific path from `service_in_env_deployments` via `service_in_env` to `package`, and filters results to titles containing the letter `awesome-package`.
49115

50116
#### Show/hide columns
51117

0 commit comments

Comments
 (0)