Skip to main content

Check out Port for yourselfย 

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โ€‹

  1. Navigate to https://app.amplication.com/ and go to the settings tab of your workspace.

  2. Navigate to the API Tokens section and generate a new token.

  3. 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:

Using this installation option means that the integration will be hosted by Port, with a customizable resync interval to ingest data into Port.

Live event support

Currently, live events are not supported for integrations hosted by Port.
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.
Support for live events is WIP and will be supported in the near future.

Self-hosted installation

Alternatively, you can install the integration using the Real-time (self-hosted) method to update Port in real time using webhooks.

Installation

To install, follow these steps:

  1. Go to the Data sources page of your portal.

  2. Click on the + Data source button in the top-right corner.

  3. Click on the relevant integration in the list.

  4. Under Select your installation method, choose Hosted by Port.

  5. Configure the integration settings and application settings as you wish (see below for details).

Application settings

Every integration hosted by Port has the following customizable application settings, which are configurable after installation:

  • Resync interval: The frequency at which Port will ingest data from the integration. There are various options available, ranging from every 1 hour to once a day.

  • Send raw data examples: A boolean toggle (enabled by default). If enabled, raw data examples will be sent from the integration to Port. These examples are used when testing your mapping configuration, they allow you to run your jq expressions against real data and see the results.

Integration settings

Every integration has its own tool-specific settings, under the Integration settings section.
Each of these settings has an โ“˜ icon next to it, which you can hover over to see a description of the setting.

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:

54.73.167.226  
63.33.143.237
54.76.185.219

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.

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"
}
}