Skip to content

Commit

Permalink
backend update
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadar authored and Hadar committed Jun 9, 2024
1 parent c3a69bc commit e003c67
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The backend logic is yours, so it can do whatever you need it to do. Port suppor

As part of your backend and its logic implementation, you can keep your software catalog up to date by sending API requests or ingesting new data that is tied to the performed action (for example, adding a new service entity in Port once the scaffold process has finished).

See [Setup backend](/actions-and-automations/setup-backend/) for instructions and examples.
See [Setup backend](/actions-and-automations/create-self-service-experiences/setup-the-backend/) for instructions and examples.

<center>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Setup backend",
"position": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Setup backend
---

import DocCardList from '@theme/DocCardList';
import Tabs from "@theme/Tabs"
import TabItem from "@theme/TabItem"

# Setup backend

<center>

<iframe width="60%" height="400" src="https://www.youtube.com/embed/cU7W3xYbsEw" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen allow="fullscreen;"></iframe>

</center>
<br/>

Port's self-service actions support a variety of backends that can be used when triggered.

Here is the basic backend model:

<img src='/img/self-service-actions/setup-backend/backend-flow-diagram.png' width='90%' border='1px' />
<br/><br/>

## Define the backend

Port's uses the same backend types and configurations for both self-service actions and [automations](/actions-and-automations/define-automations/).

All available backends and their configurations can be found [here](/actions-and-automations/setup-backend/).

___

## Next step

Once the backend is set up, the action is ready to be used.
Optionally, you can [configure permissions and/or manual approval](/actions-and-automations/create-self-service-experiences/set-self-service-actions-rbac/) for your actions to control who is allowed to execute them.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Tabs from "@theme/Tabs"
import TabItem from "@theme/TabItem"

Once you execute a self-service action, an `actionRun` object will be created in Port.
Once a self-service action or automation has been executed, an `actionRun` object will be created in Port.

This page will teach you how to use Port's API to obtain existing action runs and update them with additional metadata and information about the run. You can use this interaction to mark actions as completed or failed, and keep a consistent history of executed actions and their status.

Expand Down
27 changes: 6 additions & 21 deletions docs/actions-and-automations/setup-backend/setup-backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,9 @@ import TabItem from "@theme/TabItem"

# Setup backend

<center>

<iframe width="60%" height="400" src="https://www.youtube.com/embed/cU7W3xYbsEw" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen allow="fullscreen;"></iframe>

</center>
<br/>

Port's self-service actions and automations support a variety of backends that can be used when triggered.

Here is the basic backend model:

<img src='/img/self-service-actions/setup-backend/backend-flow-diagram.png' width='90%' border='1px' />
<br/><br/>

When creating an action, you can define the payload that will be sent every time it is executed. The payload can include any data about the action that you want your backend to have access to.

Executing a self-service action involves the following steps:
The process contains the following steps:

1. **The action is triggered in Port** - the trigger can either be a user executing a self-service action via the UI, or an automation triggering an action.
2. **The payload is sent to your backend** - the payload, as defined by the action's creator, is sent to your backend. The backend can be a URL, a dedicated Kafka topic or one of your CI/CD workflows/pipelines.
Expand All @@ -34,6 +20,11 @@ Executing a self-service action involves the following steps:

## Define the backend

:::tip UI support
Currently, only self-service actions can be created via a wizard in the UI.
Automations can be created using a JSON definition, which can be found [here](/actions-and-automations/setup-backend/#json-structure).
:::

The action's backend is defined under the `Backend` tab of the action creation form in Port's UI.
Let's break the definition down to two parts:

Expand Down Expand Up @@ -253,9 +244,3 @@ Depending on the backend type you choose, the available fields will be different

</Tabs>

___

## Next step

Once the backend is set up, the action is ready to be used.
Optionally, you can [configure permissions and/or manual approval](/actions-and-automations/create-self-service-experiences/set-self-service-actions-rbac/) for your actions to control who is allowed to execute them.

0 comments on commit e003c67

Please sign in to comment.