Amplication
Port's Amplication integration allows you to model Amplication resources in your software catalog, from which you can then automate code generation using predefined templates, ensuring standardization for resource creation.
Overview
This integration allows you to:
- Automate scaffolding of new services using Amplication’s templates.
- Ensure standardization by enforcing predefined golden paths for resource creation.
- Leverage code generation to accelerate development and maintain consistency.
- Poll Amplication for templates, resources, and outdated version alerts to keep you in sync with your Amplication resources.
Supported resources
The resources that can be ingested from Amplication into Port are listed below:
Prerequisites
Generate an Amplication API token
-
Navigate to
https://app.amplication.com/and go to the settings tab of your workspace. -
Navigate to the
API Tokenssection and generate a new token. -
Copy the token and save it in a secure location.
Amplication host URL
Your Amplication host URL should be https://server.amplication.com/graphql.
Setup
Choose one of the following installation methods:
Not sure which method is right for your use case? Check the available installation methods.
- Hosted by Port (Recommended)
- Self-hosted
- CI
-
Go to the data source page in your portal.
-
Under
Select your installation method, chooseHosted by Port. -
configure the
custom settingsandadvanced configurationas you wish (see below for details).
Custom settings
Each integration has its own tool-specific configuration that you provide during setup:
Advanced configuration
In Port, you can configure the following settings for the integration:
-
Live event support:Currently, live events are not supported for this integration.
Resyncs will be performed periodically (with a configurable interval), or manually triggered by you via Port's UI.Therefore, real-time events (including GitOps) will not be ingested into Port immediately.
Live events support for this integration is WIP and will be supported in the near future.Supported live event triggers (click to expand)
-
Actions processing enabled:
When enabled, Port will automatically process actions for this integration. -
Create default resources:
When enabled, Port will automatically create default blueprints and mapping configurations for this integration.
Port secrets
Some integration settings require sensitive pieces of data, such as tokens. For these settings, Port secrets will be used, ensuring that your sensitive data is encrypted and secure.
When filling in such a setting, its value will be obscured (shown as ••••••••).
For each such setting, Port will automatically create a secret in your organization.
To see all secrets in your organization, follow these steps.
Port source IP addresses
When using this installation method, Port will make outbound calls to your 3rd-party applications from static IP addresses. You may need to add these addresses to your allowlist, in order to allow Port to interact with the integrated service:
- Europe (EU):
54.73.167.226,63.33.143.237,54.76.185.219 - United States (US):
3.234.37.33,54.225.172.136,3.225.234.99
Using this installation option means that the integration will be able to update Port in real time using webhooks.
Prerequisites
-
A Kubernetes cluster - the integration's container chart will be deployed to this cluster.
-
kubectlandhelmmust be installed on your machine. YourkubectlCLI must be connected to the Kubernetes cluster where you plan to install the integration.
For details about the available parameters for the installation, see the table below.
- Helm
- ArgoCD
-
Go to the Amplication data source page in your portal.
-
Select the
Real-time and always onmethod. -
A
helmcommand will be displayed, with default values already filled out (e.g. your Port client ID, client secret, etc). Copy the command, replace the placeholders with your values, then run it in your terminal to install the integration.
BaseUrl & webhook configuration
To enable real-time updates of the data in your software catalog, you need to define the liveEvents.baseUrl parameter.
This parameter should be set to the URL of your Amplication integration instance, which needs to have the option to setup webhooks via HTTP requests/receive HTTP requests, so ensure the network is configured accordingly.
- If Amplication and the integration are in the same cluster/network: Use an internal URL (e.g., a Kubernetes service DNS name).
For Kubernetes deployments, create a service to expose the integration pod and use the service URL asliveEvents.baseUrl. If both the source system and integration are in the same cluster, an internal ClusterIP service is sufficient. - If Amplication is external to the integration's network: The integration must be exposed via an ingress, load balancer, or public URL that Amplication can reach.
If liveEvents.baseUrl is not provided, the integration will continue to function correctly. In such a configuration, to retrieve the latest information from the target system, the scheduledResyncInterval parameter has to be set, or a manual resync will need to be triggered through Port's UI.
To test webhooks or live event delivery to your local environment, expose your local pod or service to the internet using ngrok (e.g. ngrok http http://localhost:8000)
Scalable mode for large integrations
If you are deploying the integration at scale and want to decouple the resync process from the live events process (recommended for large or high-throughput environments), you can enable scalable mode by adding the following flags to your Helm install command:
--set workload.kind="CronJob" \
--set workload.cron.resyncTimeoutMinutes=60 \
--set scheduledResyncInterval="'*/60 * * * *'" \
--set liveEvents.worker.enabled=true
All Ocean integrations expose a health check endpoint at /docs.
For example, if your integration is accessible at https://your-integration-host:8000, you can access the health check at https://your-integration-host:8000/docs.
The port_region, port.baseUrl, portBaseUrl, port_base_url and OCEAN__PORT__BASE_URL parameters select which Port API instance to use:
- EU (app.port.io) →
https://api.getport.io - US (app.us.port.io) →
https://api.us.getport.io
To install the integration using ArgoCD:
- Create a
values.yamlfile inargocd/my-ocean-amplication-integrationin your git repository with the content:
Remember to replace the placeholders for AMPLICATION_HOST and AMPLICATION_TOKEN.
initializePortResources: true
scheduledResyncInterval: 120
integration:
identifier: my-ocean-amplication-integration
type: amplication
eventListener:
type: POLLING
config:
amplicationHost: AMPLICATION_HOST
secrets:
amplicationToken: AMPLICATION_TOKEN
- Install the
my-ocean-amplication-integrationArgoCD Application by creating the followingmy-ocean-amplication-integration.yamlmanifest:
Remember to replace the placeholders for YOUR_PORT_CLIENT_ID YOUR_PORT_CLIENT_SECRET and YOUR_GIT_REPO_URL.
Multiple sources ArgoCD documentation can be found here.
ArgoCD Application
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-ocean-amplication-integration
namespace: argocd
spec:
destination:
namespace: my-ocean-amplication-integration
server: https://kubernetes.default.svc
project: default
sources:
- repoURL: 'https://port-labs.github.io/helm-charts/'
chart: port-ocean
targetRevision: 0.9.5
helm:
valueFiles:
- $values/argocd/my-ocean-amplication-integration/values.yaml
parameters:
- name: port.clientId
value: YOUR_PORT_CLIENT_ID
- name: port.clientSecret
value: YOUR_PORT_CLIENT_SECRET
- name: port.baseUrl
value: https://api.getport.io
- repoURL: YOUR_GIT_REPO_URL
targetRevision: main
ref: values
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
The port_region, port.baseUrl, portBaseUrl, port_base_url and OCEAN__PORT__BASE_URL parameters select which Port API instance to use:
- EU (app.port.io) →
https://api.getport.io - US (app.us.port.io) →
https://api.us.getport.io
- Apply your application manifest with
kubectl:
kubectl apply -f my-ocean-amplication-integration.yaml
This table summarizes the available parameters for the installation. Note the parameters specific to this integration, they are last in the table.
| Parameter | Description | Required |
|---|---|---|
port.clientId | Your port client id | ✅ |
port.clientSecret | Your port client secret | ✅ |
port.baseUrl | Your Port API URL - https://api.getport.io for EU, https://api.us.getport.io for US | ✅ |
integration.identifier | Change the identifier to describe your integration | ✅ |
integration.type | The integration type | ✅ |
integration.eventListener.type | The event listener type | ✅ |
scheduledResyncInterval | The number of minutes between each resync | ❌ |
initializePortResources | Default true, When set to true the integration will create default blueprints and the port App config Mapping | ❌ |
integration.secrets.amplicationToken | The Amplication API token. | ✅ |
integration.config.amplicationHost | The Amplication host. For example https://server.amplication.com/graphql | ✅ |
For advanced configuration such as proxies or self-signed certificates, click here.
Event listener
The integration uses polling to pull the configuration from Port every minute and check it for changes. If there is a change, a resync will occur.
This workflow/pipeline will run the Amplication integration once and then exit, this is useful for scheduled ingestion of data.
- GitHub
- Jenkins
- Azure Devops
- GitLab
Make sure to configure the following Github Secrets:
| Parameter | Description | Required |
|---|---|---|
OCEAN__PORT__CLIENT_ID | Your port client id | ✅ |
OCEAN__PORT__CLIENT_SECRET | Your port client secret | ✅ |
OCEAN__PORT__BASE_URL | Your Port API URL - https://api.getport.io for EU, https://api.us.getport.io for US | ✅ |
OCEAN__INTEGRATION__CONFIG__AMPLICATION_HOST | The Amplication host. For example https://server.amplication.com/graphql | ✅ |
OCEAN__INTEGRATION__CONFIG__AMPLICATION_TOKEN | The Amplication API token. | ✅ |
OCEAN__INTEGRATION__IDENTIFIER | Change the identifier to describe your integration, if not set will use the default one | ❌ |
OCEAN__INITIALIZE_PORT_RESOURCES | Default true, When set to false the integration will not create default blueprints and the port App config Mapping | ❌ |
Here is an example for amplication-integration.yml workflow file:
name: Amplication Exporter Workflow
on:
workflow_dispatch:
schedule:
- cron: '0 */1 * * *' # Determines the scheduled interval for this workflow. This example runs every hour.
jobs:
run-integration:
runs-on: ubuntu-latest
timeout-minutes: 30 # Set a time limit for the job
steps:
- uses: port-labs/ocean-sail@v1
with:
type: 'amplication'
port_client_id: ${{ secrets.OCEAN__PORT__CLIENT_ID }}
port_client_secret: ${{ secrets.OCEAN__PORT__CLIENT_SECRET }}
port_base_url: https://api.getport.io
config: |
amplication_token: ${{ secrets.OCEAN__INTEGRATION__CONFIG__AMPLICATION_TOKEN }}
amplication_host: ${{ secrets.OCEAN__INTEGRATION__CONFIG__AMPLICATION_HOST }}
Your Jenkins agent should be able to run docker commands.
Make sure to configure the following Jenkins Credentials of Secret Text type:
| Parameter | Description | Required |
|---|---|---|
OCEAN__PORT__CLIENT_ID | Your port client id | ✅ |
OCEAN__PORT__CLIENT_SECRET | Your port client secret | ✅ |
OCEAN__PORT__BASE_URL | Your Port API URL - https://api.getport.io for EU, https://api.us.getport.io for US | ✅ |
OCEAN__INTEGRATION__CONFIG__AMPLICATION_HOST | The Amplication host. For example https://server.amplication.com/graphql | ✅ |
OCEAN__INTEGRATION__CONFIG__AMPLICATION_TOKEN | The Amplication API token. | ✅ |
OCEAN__INTEGRATION__IDENTIFIER | Change the identifier to describe your integration, if not set will use the default one | ❌ |
OCEAN__INITIALIZE_PORT_RESOURCES | Default true, When set to false the integration will not create default blueprints and the port App config Mapping | ❌ |
Here is an example for Jenkinsfile groovy pipeline file:
pipeline {
agent any
stages {
stage('Run Amplication Integration') {
steps {
script {
withCredentials([
string(credentialsId: 'OCEAN__INTEGRATION__CONFIG__AMPLICATION_TOKEN', variable: 'OCEAN__INTEGRATION__CONFIG__AMPLICATION_TOKEN'),
string(credentialsId: 'OCEAN__INTEGRATION__CONFIG__AMPLICATION_HOST', variable: 'OCEAN__INTEGRATION__CONFIG__AMPLICATION_HOST'),
string(credentialsId: 'OCEAN__PORT__CLIENT_ID', variable: 'OCEAN__PORT__CLIENT_ID'),
string(credentialsId: 'OCEAN__PORT__CLIENT_SECRET', variable: 'OCEAN__PORT__CLIENT_SECRET'),
]) {
sh('''
#Set Docker image and run the container
integration_type="amplication"
version="latest"
image_name="ghcr.io/port-labs/port-ocean-${integration_type}:${version}"
docker run -i --rm --platform=linux/amd64 \
-e OCEAN__EVENT_LISTENER='{"type":"ONCE"}' \
-e OCEAN__INITIALIZE_PORT_RESOURCES=true \
-e OCEAN__INTEGRATION__CONFIG__AMPLICATION_TOKEN=$OCEAN__INTEGRATION__CONFIG__AMPLICATION_TOKEN \
-e OCEAN__INTEGRATION__CONFIG__AMPLICATION_HOST=$OCEAN__INTEGRATION__CONFIG__AMPLICATION_HOST \
-e OCEAN__PORT__CLIENT_ID=$OCEAN__PORT__CLIENT_ID \
-e OCEAN__PORT__CLIENT_SECRET=$OCEAN__PORT__CLIENT_SECRET \
-e OCEAN__PORT__BASE_URL='https://api.getport.io' \
$image_name
exit $?
''')
}
}
}
}
}
}
Prerequisites
- Your Azure Devops agent should be able to run docker commands. Learn more about agents here.
- You must have permissions to create and manage Azure DevOps variable groups for storing credentials.
Set up your credentials
- Create a Variable Group: Name it port-ocean-credentials.
- Store the required variables (see the table below).
- Authorize Your Pipeline:
-
Go to "Library" -> "Variable groups."
-
Find port-ocean-credentials and click on it.
-
Select "Pipeline Permissions" and add your pipeline to the authorized list.
-
| Parameter | Description | Required |
|---|---|---|
OCEAN__PORT__CLIENT_ID | Your port client id | ✅ |
OCEAN__PORT__CLIENT_SECRET | Your port client secret | ✅ |
OCEAN__PORT__BASE_URL | Your Port API URL - https://api.getport.io for EU, https://api.us.getport.io for US | ✅ |
OCEAN__INTEGRATION__CONFIG__AMPLICATION_HOST | The Amplication host. For example https://server.amplication.com/graphql | ✅ |
OCEAN__INTEGRATION__CONFIG__AMPLICATION_TOKEN | The Amplication API token. | ✅ |
OCEAN__INTEGRATION__IDENTIFIER | Change the identifier to describe your integration, if not set will use the default one | ❌ |
OCEAN__INITIALIZE_PORT_RESOURCES | Default true, When set to false the integration will not create default blueprints and the port App config Mapping | ❌ |
Here is an example for amplication-integration.yml pipeline file:
trigger:
- main
pool:
vmImage: "ubuntu-latest"
variables:
- group: port-ocean-credentials
steps:
- script: |
# Set Docker image and run the container
integration_type="amplication"
version="latest"
image_name="ghcr.io/port-labs/port-ocean-$integration_type:$version"
docker run -i --rm \
-e OCEAN__EVENT_LISTENER='{"type":"ONCE"}' \
-e OCEAN__INITIALIZE_PORT_RESOURCES=true \
-e OCEAN__INTEGRATION__CONFIG__AMPLICATION_TOKEN=$(OCEAN__INTEGRATION__CONFIG__AMPLICATION_TOKEN) \
-e OCEAN__INTEGRATION__CONFIG__AMPLICATION_HOST=$(OCEAN__INTEGRATION__CONFIG__AMPLICATION_HOST) \
-e OCEAN__PORT__CLIENT_ID=$(OCEAN__PORT__CLIENT_ID) \
-e OCEAN__PORT__CLIENT_SECRET=$(OCEAN__PORT__CLIENT_SECRET) \
-e OCEAN__PORT__BASE_URL='https://api.getport.io' \
$image_name
exit $?
displayName: 'Ingest Data into Port'
Make sure to configure the following GitLab variables:
| Parameter | Description | Required |
|---|---|---|
OCEAN__PORT__CLIENT_ID | Your port client id | ✅ |
OCEAN__PORT__CLIENT_SECRET | Your port client secret | ✅ |
OCEAN__PORT__BASE_URL | Your Port API URL - https://api.getport.io for EU, https://api.us.getport.io for US | ✅ |
OCEAN__INTEGRATION__CONFIG__AMPLICATION_HOST | The Amplication host. For example https://server.amplication.com/graphql | ✅ |
OCEAN__INTEGRATION__CONFIG__AMPLICATION_TOKEN | The Amplication API token. | ✅ |
OCEAN__INTEGRATION__IDENTIFIER | Change the identifier to describe your integration, if not set will use the default one | ❌ |
OCEAN__INITIALIZE_PORT_RESOURCES | Default true, When set to false the integration will not create default blueprints and the port App config Mapping | ❌ |
Here is an example for .gitlab-ci.yml pipeline file:
default:
image: docker:24.0.5
services:
- docker:24.0.5-dind
before_script:
- docker info
variables:
INTEGRATION_TYPE: amplication
VERSION: latest
stages:
- ingest
ingest_data:
stage: ingest
variables:
IMAGE_NAME: ghcr.io/port-labs/port-ocean-$INTEGRATION_TYPE:$VERSION
script:
- |
docker run -i --rm --platform=linux/amd64 \
-e OCEAN__EVENT_LISTENER='{"type":"ONCE"}' \
-e OCEAN__INITIALIZE_PORT_RESOURCES=true \
-e OCEAN__INTEGRATION__CONFIG__AMPLICATION_TOKEN=$OCEAN__INTEGRATION__CONFIG__AMPLICATION_TOKEN \
-e OCEAN__INTEGRATION__CONFIG__AMPLICATION_HOST=$OCEAN__INTEGRATION__CONFIG__AMPLICATION_HOST \
-e OCEAN__PORT__CLIENT_ID=$OCEAN__PORT__CLIENT_ID \
-e OCEAN__PORT__CLIENT_SECRET=$OCEAN__PORT__CLIENT_SECRET \
-e OCEAN__PORT__BASE_URL='https://api.getport.io' \
$IMAGE_NAME
rules: # Run only when changes are made to the main branch
- if: '$CI_COMMIT_BRANCH == "main"'
The port_region, port.baseUrl, portBaseUrl, port_base_url and OCEAN__PORT__BASE_URL parameters select which Port API instance to use:
- EU (app.port.io) →
https://api.getport.io - US (app.us.port.io) →
https://api.us.getport.io
For advanced configuration such as proxies or self-signed certificates, click here.
Configuration
Port integrations use a YAML mapping block to ingest data from Amplication's API into Port.
The mapping makes use of the JQ JSON processor to select, modify, concatenate, transform and perform other operations on existing fields and values from the integration API.
Default mapping configuration
This is the default mapping configuration for this integration:
Default mapping configuration (Click to expand)
deleteDependentEntities: true
createMissingRelatedEntities: true
resources:
- kind: amplication_template
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id
title: .name
blueprint: '"AmplicationTemplate"'
properties:
description: .description
project: .project.name
project_id: .project.id
blueprint: .blueprint.name
blueprint_id: .blueprint.id
- kind: amplication_resource
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id
title: .name
blueprint: '"AmplicationResource"'
properties:
description: .description
project: .project.name
project_id: .project.id
blueprint: .blueprint.name
blueprint_id: .blueprint.id
git_organization: .gitRepository.gitOrganization.provider
git_repository: .gitRepository.gitOrganization.name + "/" + .gitRepository.name
relations:
template: if .serviceTemplate != null then .serviceTemplate.id else null end
- kind: amplication_alert
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id
title: 'if .block != null then .type + ": " + .block.displayName else .type end'
blueprint: '"AmplicationAlert"'
properties:
block_id: if .block != null then .block.id else null end
block_displayName: if .block != null then .block.displayName else null end
type: .type
outdatedVersion: .outdatedVersion
latestVersion: .latestVersion
status: .status
relations:
resource: .resourceId
Monitoring and sync status
To learn more about how to monitor and check the sync status of your integration, see the relevant documentation.
Examples
Examples of blueprints and the relevant integration configurations:
Templates
Template Blueprint
{
"identifier": "AmplicationTemplate",
"description": "Blueprint for templates coming from Amplication's app",
"title": "Amplication Template",
"icon": "Amplication",
"schema": {
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"description": {
"type": "string",
"title": "Description"
},
"project": {
"type": "string",
"title": "Project"
},
"project_id": {
"type": "string",
"title": "Project ID"
},
"blueprint": {
"type": "string",
"title": "Blueprint"
},
"blueprint_id": {
"type": "string",
"title": "Blueprint ID"
}
},
"required": [
"name",
"project_id",
"project"
]
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {
"resource_count": {
"title": "Resource Count",
"icon": "Amplication",
"type": "number",
"description": "Number of resources created from this template",
"target": "AmplicationResource",
"calculationSpec": {
"func": "count",
"calculationBy": "entities"
}
}
},
"relations": {}
}
Integration configuration
createMissingRelatedEntities: True
resources:
- kind: amplication_template
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id
title: .name
blueprint: '"AmplicationTemplate"'
properties:
name: .name
description: .description
project: .project.name
project_id: .project.id
blueprint: .blueprint.name
blueprint_id: .blueprint.id
Resources
Resource blueprint
{
"identifier": "AmplicationResource",
"description": "Blueprint for resources coming from Amplication's app",
"title": "Amplication Resource",
"icon": "Amplication",
"schema": {
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"description": {
"type": "string",
"title": "Description"
},
"project": {
"type": "string",
"title": "Project"
},
"project_id": {
"type": "string",
"title": "Project ID"
},
"git_organization": {
"icon": "Git",
"type": "string",
"title": "Git Organization"
},
"git_repository": {
"icon": "Git",
"type": "string",
"title": "Git Repository"
},
"blueprint": {
"type": "string",
"title": "Blueprint"
},
"blueprint_id": {
"type": "string",
"title": "Blueprint ID"
}
},
"required": [
"name",
"project",
"project_id"
]
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {
"new_alerts_count": {
"title": "Alerts Count",
"icon": "Alert",
"type": "number",
"description": "Number of new outdated version alerts this resource has",
"target": "AmplicationAlert",
"query": {
"combinator": "and",
"rules": [
{
"property": "status",
"operator": "=",
"value": "New"
}
]
},
"calculationSpec": {
"func": "count",
"calculationBy": "entities"
}
}
},
"relations": {
"template": {
"target": "AmplicationTemplate",
"title": "Template",
"description": "The template of this resource",
"required": false,
"many": false
}
}
}
Integration configuration
createMissingRelatedEntities: True
resources:
- kind: amplication_resource
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id
title: .name
blueprint: '"AmplicationResource"'
properties:
name: .name
description: .description
project: .project.name
project_id: .project.id
blueprint: .blueprint.name
blueprint_id: .blueprint.id
git_organization: .gitRepository.gitOrganization.provider
git_repository: '.gitRepository.gitOrganization.name + "/" + .gitRepository.name'
relations:
template: if .serviceTemplate != null and .serviceTemplate != "None" then .serviceTemplate.id else null end
Outdated Version Alerts
Outdated Version Alert blueprint
{
"identifier": "AmplicationAlert",
"description": "Blueprint for outdated version alerts coming from Amplication's app",
"title": "Amplication Version Alert",
"icon": "Amplication",
"schema": {
"properties": {
"block_id": {
"type": "string",
"title": "Block ID"
},
"block_displayName": {
"type": "string",
"title": "Plugin Name"
},
"type": {
"type": "string",
"title": "Type",
"default": "Other",
"enum": [
"PluginVersion",
"TemplateVersion",
"CodeEngineVersion",
"Other"
],
"enumColors": {
"PluginVersion": "blue",
"TemplateVersion": "orange",
"CodeEngineVersion": "purple",
"Other": "bronze"
}
},
"outdatedVersion": {
"type": "string",
"title": "Outdated Version"
},
"latestVersion": {
"type": "string",
"title": "Latest Version"
},
"status": {
"type": "string",
"title": "Status",
"default": "New",
"enum": [
"New",
"Resolved",
"Ignored",
"Canceled"
],
"enumColors": {
"New": "turquoise",
"Resolved": "red",
"Ignored": "green",
"Canceled": "blue"
}
}
},
"required": [
"block_id",
"block_displayName",
"type",
"outdatedVersion",
"latestVersion",
"status"
]
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"resource": {
"title": "Resource",
"target": "AmplicationResource",
"required": false,
"many": false
}
}
}
Integration configuration
createMissingRelatedEntities: True
resources:
- kind: amplication_alert
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id
title: '.type + ": " + .block.displayName'
blueprint: '"AmplicationAlert"'
properties:
block_id: .block.id
block_displayName: .block.displayName
type: .type
outdatedVersion: .outdatedVersion
latestVersion: .latestVersion
status: .status
relations:
resource: .resourceId
Let's Test It
This section includes a sample response data from Amplication. In addition, it includes the entity created from the resync event based on the Ocean configuration provided in the previous section.
Payload
Here is an example of the payload structure from Amplication:
Template response data
{
"id": "cm6zln01a0209utjtlorazri1",
"name": "Port Node.js Template",
"description": "Template created from an existing resource",
"resourceType": "ServiceTemplate",
"project": {
"id": "cm6zlfk2o01liutjtdw8xj7f0",
"name": "Port Integration"
},
"blueprint": {
"id": "cm6gb3j00000p14gz2n11otq4",
"name": "Node.js Service (Amplication's Standard)"
}
}
Resource response data
{
"id": "cm6gr9t4s0000jx5t8l8prvik",
"name": "Sample Resource Name",
"description": "General description for the resource",
"resourceType": "Service",
"project": {
"id": "cm6gb3j0a000q14gzlq9m7h1o",
"name": "Sample Project"
},
"blueprint": {
"id": "cm6gb3j00000p14gz2n11otq4",
"name": "Node.js Service (Amplication's Standard)"
},
"serviceTemplate": null,
"gitRepository": {
"name": "examplerepo",
"gitOrganization": {
"name": "examplecompany",
"provider": "Github"
}
}
}
Alert response data
{
"id": "cm71nzqfh00lftp1dh9bslk0n",
"createdAt": "2025-02-12T08:44:11.022Z",
"updatedAt": "2025-02-12T08:44:11.022Z",
"resourceId": "cm71nzdyn00kltp1dyoe4abpu",
"blockId": "cm67mln9k004k55uul3j4ywww",
"block": {
"id": "cm67mln9k004k55uul3j4ywww",
"displayName": "Resource Template Version"
},
"type": "TemplateVersion",
"outdatedVersion": "0.1.0",
"latestVersion": "0.2.0",
"status": "New"
}
Mapping Result
The combination of the sample payload and the Ocean configuration generates the following Port entity:
Template entity in Port
{
"identifier": "cm6zln01a0209utjtlorazri1",
"title": "Port Node.js Template",
"team": [],
"properties": {
"name": "Port Node.js Template",
"description": "Template created from an existing resource",
"project": "Port Integration",
"project_id": "cm6zlfk2o01liutjtdw8xj7f0",
"blueprint": "Node.js Service (Amplication's Standard)",
"blueprint_id": "cm6gb3j00000p14gz2n11otq4"
},
"relations": {},
"icon": "Amplication"
}
Resource entity in Port
{
"identifier": "cm6gr9t4s0000jx5t8l8prvik",
"title": "Sample Resource Name",
"team": [],
"properties": {
"name": "Sample Resource Name",
"description": "General description for the resource",
"project": "Sample Project",
"project_id": "cm6gb3j0a000q14gzlq9m7h1o",
"git_organization": "Github",
"git_repository": "examplecompany/examplerepo",
"blueprint": "Node.js Service (Amplication's Standard)",
"blueprint_id": "cm6gb3j00000p14gz2n11otq4"
},
"relations": {},
"icon": "Amplication"
}
Alert entity in Port
{
"identifier": "cm71nzqfh00lftp1dh9bslk0n",
"title": "TemplateVersion: Resource Template Version",
"icon": "Amplication",
"team": [],
"properties": {
"block_id": "cm67mln9k004k55uul3j4ywww",
"block_displayName": "Resource Template Version",
"type": "PluginVersion",
"outdatedVersion": "0.1.0",
"latestVersion": "0.2.0",
"status": "New"
},
"relations": {
"resource": "cm6gr9t4s0000jx5t8l8prvik"
}
}