Change a blueprint
PUT/v1/blueprints/:identifier
This route allows you to change a specific blueprint in your Port account.
To learn more about blueprints, check out the documentation.
Modifying system blueprints
System blueprints (such as _team, _user, etc.) are managed by Port and their schemas may change over time.
If you use this endpoint, always fetch the system blueprint structure first and apply your changes on top of it. Sending a stale or incomplete schema will result in a 422 error.
For additive changes, you can use the Update a blueprint endpoint.
Request
Parameters (JSON)
{
"parameters": [
{
"schema": {
"type": "string"
},
"in": "path",
"name": "identifier",
"required": true,
"description": "The unique identifier of the resource you want to operate on."
}
]
}Request body schema (JSON)
{
"title": "Body",
"body": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"pattern": "^(?!\\.{1,2}$)[\\p{L}0-9@_.+:\\\\/-]+$",
"maxLength": 100,
"description": "The identifier of the blueprint."
},
"title": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "The title of the blueprint."
},
"description": {
"type": "string",
"maxLength": 200,
"description": "The description of the blueprint."
},
"icon": {
"type": "string",
"description": "The icon of the blueprint."
},
"ownership": {
"anyOf": [
{
"type": "object",
"title": "Inherited",
"description": "Ownership of the blueprint's entities will be inherited from a different related blueprint with `Direct` ownership.",
"properties": {
"type": {
"type": "string",
"enum": [
"Inherited"
]
},
"path": {
"type": "string",
"description": "The `path` key is a dot-separated path of relation identifiers that lead to the desired blueprint."
},
"title": {
"type": "string",
"maxLength": 100,
"description": "The title of the ownership property. The default value is `Owning teams`."
}
},
"additionalProperties": false,
"required": [
"type",
"path"
]
},
{
"type": "object",
"title": "Direct",
"description": "Ownership of the blueprint's entities will be defined by a hidden **relation** to the `Team` blueprint.",
"properties": {
"type": {
"type": "string",
"enum": [
"Direct"
]
},
"title": {
"type": "string",
"maxLength": 100,
"description": "The title of the ownership property. The default value is `Owning teams`."
},
"union": {
"type": "boolean",
"description": "When `true`, every writer owns its own slice of owning teams and the entity's owning teams are the combination of all slices. Cannot be changed once ownership is Direct."
}
},
"additionalProperties": false,
"required": [
"type"
]
}
]
},
"schema": {
"type": "object",
"description": "The schema of the blueprint, see `properties` and `required` below for more information.",
"properties": {
"properties": {
"type": "object",
"description": "The properties of the blueprint.<br/> Each property identifier can be `<= 100 characters` long, values must match the following pattern: `^[A-Za-z0-9@_=\\\\-]+$`.",
"propertyNames": {
"pattern": "^[A-Za-z0-9@_=\\\\-]+$",
"maxLength": 100
},
"additionalProperties": {
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 100,
"description": "The title of the property."
},
"description": {
"type": "string",
"description": "The description of the property."
},
"icon": {
"type": "string",
"description": "The icon of the property."
},
"type": {
"enum": [
"string",
"number",
"boolean",
"object",
"array"
],
"description": "The [type](https://docs.port.io/context-lake/data-model/setup-blueprint/properties/overview#supported-properties) of the property."
},
"format": {
"enum": [
"date-time",
"url",
"email",
"idn-email",
"ipv4",
"ipv6",
"markdown",
"yaml",
"user",
"blueprints",
"team",
"timer",
"proto",
"labeled-url"
],
"description": "The type's [format](https://docs.port.io/context-lake/data-model/setup-blueprint/properties/overview#supported-properties)."
},
"dateFormat": {
"enum": [
"relative",
"12-hour",
"24-hour",
"iso"
],
"description": "The display format for date-time properties. Only applicable when format is 'date-time'. Defaults to 'relative'."
},
"spec": {
"enum": [
"open-api",
"embedded-url",
"async-api"
],
"description": "The [spec](https://docs.port.io/context-lake/data-model/setup-blueprint/properties/overview#supported-properties) of the property."
},
"union": {
"type": "boolean",
"description": "Only applicable to `array` properties with `string` or `number` items. When `true`, every writer owns its own slice of the value and the property returns the combination of all slices, with each value appearing once. Writers send `{ \"<sourceKey>\": [values] }` instead of a plain array. Cannot be changed after the property is created."
},
"specAuthentication": {
"type": "object",
"description": "When using the `spec` property with `embedded-url`, the authentication spec of the property.",
"properties": {
"clientId": {
"type": "string"
},
"authorizationUrl": {
"type": "string",
"format": "url"
},
"tokenUrl": {
"type": "string",
"format": "url"
},
"authorizationScope": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"openid"
]
}
},
"additionalProperties": false,
"required": [
"clientId",
"authorizationUrl",
"tokenUrl"
]
}
},
"required": [
"type"
]
}
},
"required": {
"type": "array",
"items": {
"type": "string"
},
"description": "The required properties of the blueprint, these must be provided when creating an entity based on this blueprint. This is an array of the required properties' identifiers."
}
},
"additionalProperties": false,
"required": [
"properties"
]
},
"calculationProperties": {
"type": "object",
"description": "The [calculation properties](https://docs.port.io/context-lake/data-model/setup-blueprint/properties/calculation-property/) of the blueprint. <br/> Each calculation property identifier can be `<= 100 characters` long, values must match the following pattern: `^[A-Za-z0-9@_=\\\\-]+$`.",
"default": {},
"propertyNames": {
"pattern": "^[A-Za-z0-9@_=\\\\-]+$",
"maxLength": 100
},
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"maxLength": 100,
"description": "The title of the property."
},
"description": {
"type": "string",
"description": "The description of the property."
},
"icon": {
"type": "string",
"description": "The icon of the property."
},
"calculation": {
"type": "string",
"description": "The JQ expression that calculates the value of the property."
},
"type": {
"enum": [
"string",
"number",
"boolean",
"object",
"array"
],
"description": "The type of the property."
},
"format": {
"enum": [
"date-time",
"url",
"email",
"idn-email",
"ipv4",
"ipv6",
"markdown",
"yaml",
"user",
"team",
"proto",
"labeled-url"
],
"description": "The format of the property."
},
"dateFormat": {
"enum": [
"relative",
"12-hour",
"24-hour",
"iso"
],
"description": "The display format for date-time calculation properties. Only applicable when format is 'date-time'. Defaults to 'relative'."
},
"spec": {
"enum": [
"open-api",
"embedded-url",
"async-api"
],
"description": "The spec of the property."
},
"specAuthentication": {
"type": "object",
"description": "When using the `spec` property with `embedded-url`, the authentication spec of the property.",
"properties": {
"clientId": {
"type": "string"
},
"authorizationUrl": {
"type": "string",
"format": "url"
},
"tokenUrl": {
"type": "string",
"format": "url"
},
"authorizationScope": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"openid"
]
}
},
"additionalProperties": false,
"required": [
"clientId",
"authorizationUrl",
"tokenUrl"
]
},
"colorized": {
"type": "boolean",
"description": "Whether the property is colorized."
},
"colors": {
"type": "object",
"description": "When using the `colorized` property, the colors of the property.",
"additionalProperties": {
"enum": [
"blue",
"turquoise",
"orange",
"purple",
"pink",
"yellow",
"green",
"red",
"gold",
"silver",
"paleBlue",
"darkGray",
"lightGray",
"bronze",
"lime",
"olive",
"brown"
]
}
},
"items": {
"type": "object",
"properties": {
"type": {
"enum": [
"string",
"number",
"boolean",
"object",
"array"
],
"description": "The type of the item."
},
"format": {
"description": "The format of the item.",
"enum": [
"date-time",
"url",
"email",
"idn-format",
"ipv4",
"ipv6",
"markdown",
"yaml",
"user",
"team",
"timer",
"proto",
"labeled-url"
]
}
}
}
},
"required": [
"calculation",
"type"
]
}
},
"mirrorProperties": {
"type": "object",
"description": "The [mirror properties](https://docs.port.io/context-lake/data-model/setup-blueprint/properties/mirror-property/) of the blueprint. <br/> Each mirror property identifier can be `<= 100 characters` long, values must match the following pattern: `^[A-Za-z0-9@_=\\\\-]+$`.",
"propertyNames": {
"pattern": "^[A-Za-z0-9@_=\\\\-]+$",
"maxLength": 100
},
"additionalProperties": {
"type": "object",
"properties": {
"path": {
"type": "string",
"pattern": "^(?:[A-Za-z0-9@_=\\-$]+\\.)+?(\\w|\\$|@|-)*?[^\\.]+$",
"description": "The path to the property in the related blueprint. This is a string of relation identifiers separated by dots, the last identifier is the property identifier."
},
"title": {
"type": "string",
"maxLength": 100,
"description": "The title of the property."
}
},
"additionalProperties": false,
"required": [
"path"
]
}
},
"aggregationProperties": {
"type": "object",
"description": "The [aggregation properties](https://docs.port.io/context-lake/data-model/setup-blueprint/properties/aggregation-property/) of the blueprint. <br/> Each aggregation property identifier can be `<= 100 characters` long, values must match the following pattern: `^[A-Za-z0-9@_=\\\\-]+$`.",
"default": {},
"propertyNames": {
"pattern": "^[A-Za-z0-9@_=\\\\-]+$",
"maxLength": 100
},
"additionalProperties": {
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 100,
"description": "The title of the property."
},
"description": {
"type": "string",
"description": "The description of the property."
},
"icon": {
"type": "string",
"description": "The icon of the property."
},
"type": {
"enum": [
"number"
],
"default": "number",
"description": "The type of the property. This is the type of the aggregation result."
},
"target": {
"type": "string",
"description": "The blueprint identifier to run the aggregation on."
},
"calculationSpec": {
"type": "object",
"oneOf": [
{
"title": "Count entities",
"oneOf": [
{
"type": "object",
"title": "Count",
"properties": {
"func": {
"description": "The function to use for the aggregation.",
"enum": [
"count"
]
},
"calculationBy": {
"type": "string",
"description": "Whether to aggregate by entities or properties.",
"enum": [
"entities"
]
}
},
"required": [
"func",
"calculationBy"
],
"additionalProperties": false
},
{
"type": "object",
"title": "Average entities over time",
"properties": {
"func": {
"description": "The function to use for the aggregation.",
"enum": [
"average"
]
},
"measureTimeBy": {
"type": "string",
"description": "The time property to use for the aggregation."
},
"averageOf": {
"type": "string",
"enum": [
"hour",
"day",
"week",
"month",
"total"
]
},
"calculationBy": {
"type": "string",
"description": "Whether to aggregate by entities or properties.",
"enum": [
"entities"
]
}
},
"required": [
"func",
"calculationBy",
"averageOf"
],
"additionalProperties": false
}
]
},
{
"title": "Aggregate property",
"oneOf": [
{
"type": "object",
"title": "Aggregate property values",
"properties": {
"func": {
"type": "string",
"enum": [
"sum",
"min",
"max",
"median"
],
"description": "The function to use for the aggregation."
},
"property": {
"type": "string",
"description": "The property to aggregate."
},
"calculationBy": {
"type": "string",
"description": "Whether to aggregate by property or entities.",
"enum": [
"property"
]
}
},
"additionalProperties": false,
"required": [
"func",
"property",
"calculationBy"
]
},
{
"type": "object",
"title": "Average property over time",
"properties": {
"func": {
"description": "The function to use for the aggregation.",
"enum": [
"average"
]
},
"measureTimeBy": {
"type": "string",
"description": "The time property to use for the aggregation."
},
"averageOf": {
"type": "string",
"enum": [
"hour",
"day",
"week",
"month",
"total"
]
},
"property": {
"type": "string",
"description": "The property to aggregate."
},
"calculationBy": {
"type": "string",
"description": "Whether to aggregate by property or entities.",
"enum": [
"property"
]
}
},
"additionalProperties": false,
"required": [
"func",
"property",
"calculationBy",
"averageOf"
]
}
]
}
],
"description": "The calculation spec of the property."
},
"query": {
"title": "Entities query",
"type": "object",
"properties": {
"combinator": {
"enum": [
"and",
"or"
],
"description": "The combinator to use for the rules."
},
"rules": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "Date Rule",
"properties": {
"property": {
"title": "Contexted property",
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
},
"operator": {
"enum": [
"between",
"notBetween",
"="
]
},
"value": {
"type": "object",
"oneOf": [
{
"type": "object",
"title": "Date Range",
"properties": {
"from": {
"type": "string",
"format": "date-time"
},
"to": {
"type": "string",
"format": "date-time"
}
},
"required": [
"from",
"to"
]
},
{
"type": "object",
"title": "Date Preset",
"properties": {
"preset": {
"type": "string",
"enum": [
"today",
"tomorrow",
"yesterday",
"lastDay",
"lastWeek",
"last2Weeks",
"lastMonth",
"last3Months",
"last6Months",
"last12Months",
"last2Years",
"last3Years",
"nextDay",
"nextWeek",
"next2Weeks",
"nextMonth",
"next3Months",
"next6Months",
"next12Months"
]
}
},
"required": [
"preset"
]
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
}
},
"required": [
"property",
"operator",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"title": "Empty Rule",
"oneOf": [
{
"type": "object",
"title": "Empty Rule",
"properties": {
"operator": {
"enum": [
"isEmpty",
"isNotEmpty"
]
},
"property": {
"type": "string"
}
},
"required": [
"operator",
"property"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"title": "Number Rule",
"properties": {
"property": {
"title": "Contexted property",
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
},
"operator": {
"enum": [
">",
">=",
"<",
"<="
]
},
"value": {
"anyOf": [
{
"type": "number",
"title": "number"
},
{
"type": "string",
"format": "date-time",
"title": "date-time"
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
}
},
"required": [
"property",
"operator",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"title": "Expired Rule",
"oneOf": [
{
"type": "object",
"title": "Expired Rule",
"properties": {
"operator": {
"enum": [
"isExpired",
"isNotExpired"
]
},
"property": {
"type": "string"
}
},
"required": [
"operator",
"property"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"title": "String Rule",
"oneOf": [
{
"type": "object",
"title": "String Rule",
"properties": {
"property": {
"title": "Contexted property",
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
},
"operator": {
"enum": [
"=",
"!=",
"containsAny",
"contains",
"doesNotContains",
"beginsWith",
"doesNotBeginsWith",
"endsWith",
"doesNotEndsWith",
"in",
"notIn"
]
},
"value": {
"anyOf": [
{
"type": "null",
"title": "null"
},
{
"type": "string",
"title": "string"
},
{
"type": "number",
"title": "number"
},
{
"type": "boolean",
"title": "boolean"
},
{
"type": "string",
"format": "date-time",
"title": "date-time"
},
{
"type": "array",
"items": {
"type": "string"
},
"title": "array"
},
{
"type": "array",
"items": {
"type": "number"
},
"title": "array"
},
{
"type": "array",
"items": {
"type": "boolean"
},
"title": "array"
},
{
"type": "array",
"items": {
"type": "string",
"format": "date-time"
},
"title": "array"
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
}
},
"additionalProperties": false,
"required": [
"property",
"operator",
"value"
]
}
]
},
{
"type": "object",
"title": "Relation Rule",
"properties": {
"operator": {
"enum": [
"relatedTo"
]
},
"blueprint": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string",
"title": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"title": "array"
}
]
},
"direction": {
"enum": [
"upstream",
"downstream"
]
},
"required": {
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"operator",
"value",
"blueprint"
]
},
{
"type": "object",
"title": "Property schema rule",
"properties": {
"propertySchema": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"format": {
"type": "string"
},
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"format": {
"type": "string"
}
},
"required": [
"type"
]
}
},
"required": [
"type"
],
"additionalProperties": false
},
"operator": {
"enum": [
"=",
"!=",
"contains"
]
},
"value": {
"anyOf": [
{
"type": "null",
"title": "null"
},
{
"type": "string",
"title": "string"
},
{
"type": "number",
"title": "number"
},
{
"type": "boolean",
"title": "boolean"
}
]
}
},
"required": [
"operator",
"propertySchema"
],
"additionalProperties": false
},
{
"type": "object",
"title": "matchAny Rule",
"anyOf": [
{
"type": "object",
"title": "Property matchAny rule",
"properties": {
"property": {
"oneOf": [
{
"type": "object",
"title": "Path filter property",
"properties": {
"path": {
"type": "array",
"minItems": 1,
"items": {
"anyOf": [
{
"type": "string",
"title": "Relation identifier"
},
{
"type": "object",
"title": "Relation with max hops",
"properties": {
"relation": {
"type": "string"
},
"maxHops": {
"type": "number",
"minimum": 1,
"maximum": 15
}
}
}
]
}
},
"fromBlueprint": {
"type": "string"
}
},
"required": [
"path"
],
"additionalProperties": false
},
{
"title": "Contexted property",
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
}
]
},
"operator": {
"type": "string",
"enum": [
"matchAny"
]
},
"value": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"title": "Contexted property",
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
}
]
}
},
"required": [
"property",
"operator",
"value"
],
"additionalProperties": false
}
]
},
{
"allOf": [
"circular(Entities query)",
{
"title": "Nested query"
}
]
}
]
}
}
},
"required": [
"combinator",
"rules"
],
"additionalProperties": false,
"example": {
"combinator": "and",
"rules": [
{
"property": "$blueprint",
"operator": "=",
"value": "service"
},
{
"combinator": "or",
"rules": [
{
"property": "environment",
"operator": "=",
"value": "production"
},
{
"property": "environment",
"operator": "=",
"value": "staging"
}
]
}
]
}
},
"pathFilter": {
"type": "array",
"description": "Optional filter to run the aggregation on entities that are connected through a specific path. When empty will use all the related entities from all possible paths",
"maxItems": 1,
"items": {
"type": "object",
"properties": {
"path": {
"description": "The path to the property in the related blueprint. This is a string of relation identifiers separated by dots.",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"fromBlueprint": {
"type": "string"
}
},
"required": [
"path"
],
"additionalProperties": false
}
}
},
"additionalProperties": false,
"required": [
"title",
"target",
"calculationSpec"
]
}
},
"relations": {
"type": "object",
"description": "The [relations](https://docs.port.io/context-lake/data-model/setup-blueprint/relate-blueprints) of the blueprint. <br/> Each relation identifier can be `<= 100 characters` long, values must match the following pattern: `^[A-Za-z0-9@_=\\\\-]+$`.",
"propertyNames": {
"pattern": "^[A-Za-z0-9@_=\\\\-]+$",
"maxLength": 100
},
"additionalProperties": {
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 100
},
"target": {
"type": "string"
},
"required": {
"type": "boolean",
"default": false
},
"many": {
"type": "boolean",
"default": false
},
"description": {
"type": "string"
},
"type": {
"type": "string"
},
"union": {
"type": "boolean",
"description": "When `true`, every writer owns its own slice of the value and the relation returns the combination of all slices. Requires `many: true`. Cannot be changed after the relation is created."
}
},
"additionalProperties": false,
"required": [
"target",
"required",
"many"
]
}
},
"includeInGlobalSearch": {
"type": [
"boolean",
"null"
],
"description": "Overrides the org-level includeBlueprintsInGlobalSearchByDefault setting. When set, controls whether entities of this blueprint appear in global search results. Set to null to clear the override."
},
"changelogDestination": {
"description": "The destination of the blueprint's changelog.",
"oneOf": [
{
"type": "object",
"title": "Webhook",
"description": "The changelog will be sent to the specified webhook.",
"properties": {
"type": {
"type": "string",
"enum": [
"WEBHOOK"
]
},
"agent": {
"type": "boolean",
"description": "If `true`, Port's execution agent will be used to send the changelog."
},
"url": {
"type": "string",
"description": "The URL of the webhook.",
"format": "uri"
}
},
"required": [
"url",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"title": "Kafka",
"description": "The changelog will be sent to the Kafka topic connected to your Port account.",
"properties": {
"type": {
"type": "string",
"enum": [
"KAFKA"
]
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
}
},
"additionalProperties": true,
"required": [
"title",
"schema"
]
}
}
},
"required": true
}
}Responses
- 200
- 401
- 404
- 413
- 422
Updated successfully.
Default Response
A resource with the provided identifier was not found
Request body is too large (limit is 1MiB)
The json provided does not match the route's schema
Responses (JSON)
{
"responses": {
"200": {
"description": "Updated successfully.",
"content": {
"application/json": {
"schema": {
"description": "Updated successfully.",
"type": "object",
"properties": {
"ok": {
"enum": [
true
]
},
"blueprint": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"pattern": "^(?!\\.{1,2}$)[\\p{L}0-9@_.+:\\\\/-]+$",
"maxLength": 100,
"description": "The identifier of the blueprint."
},
"title": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"description": "The title of the blueprint."
},
"description": {
"type": "string",
"maxLength": 200,
"description": "The description of the blueprint."
},
"icon": {
"type": "string",
"description": "The icon of the blueprint."
},
"ownership": {
"anyOf": [
{
"type": "object",
"title": "Inherited",
"description": "Ownership of the blueprint's entities will be inherited from a different related blueprint with `Direct` ownership.",
"properties": {
"type": {
"type": "string",
"enum": [
"Inherited"
]
},
"path": {
"type": "string",
"description": "The `path` key is a dot-separated path of relation identifiers that lead to the desired blueprint."
},
"title": {
"type": "string",
"maxLength": 100,
"description": "The title of the ownership property. The default value is `Owning teams`."
}
},
"additionalProperties": false,
"required": [
"type",
"path"
]
},
{
"type": "object",
"title": "Direct",
"description": "Ownership of the blueprint's entities will be defined by a hidden **relation** to the `Team` blueprint.",
"properties": {
"type": {
"type": "string",
"enum": [
"Direct"
]
},
"title": {
"type": "string",
"maxLength": 100,
"description": "The title of the ownership property. The default value is `Owning teams`."
},
"union": {
"type": "boolean",
"description": "When `true`, every writer owns its own slice of owning teams and the entity's owning teams are the combination of all slices. Cannot be changed once ownership is Direct."
}
},
"additionalProperties": false,
"required": [
"type"
]
}
]
},
"schema": {
"type": "object",
"description": "The schema of the blueprint, see `properties` and `required` below for more information.",
"properties": {
"properties": {
"type": "object",
"description": "The properties of the blueprint.<br/> Each property identifier can be `<= 100 characters` long, values must match the following pattern: `^[A-Za-z0-9@_=\\\\-]+$`.",
"propertyNames": {
"pattern": "^[A-Za-z0-9@_=\\\\-]+$",
"maxLength": 100
},
"additionalProperties": {
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 100,
"description": "The title of the property."
},
"description": {
"type": "string",
"description": "The description of the property."
},
"icon": {
"type": "string",
"description": "The icon of the property."
},
"type": {
"enum": [
"string",
"number",
"boolean",
"object",
"array"
],
"description": "The [type](https://docs.port.io/context-lake/data-model/setup-blueprint/properties/overview#supported-properties) of the property."
},
"format": {
"enum": [
"date-time",
"url",
"email",
"idn-email",
"ipv4",
"ipv6",
"markdown",
"yaml",
"user",
"blueprints",
"team",
"timer",
"proto",
"labeled-url"
],
"description": "The type's [format](https://docs.port.io/context-lake/data-model/setup-blueprint/properties/overview#supported-properties)."
},
"dateFormat": {
"enum": [
"relative",
"12-hour",
"24-hour",
"iso"
],
"description": "The display format for date-time properties. Only applicable when format is 'date-time'. Defaults to 'relative'."
},
"spec": {
"enum": [
"open-api",
"embedded-url",
"async-api"
],
"description": "The [spec](https://docs.port.io/context-lake/data-model/setup-blueprint/properties/overview#supported-properties) of the property."
},
"union": {
"type": "boolean",
"description": "Only applicable to `array` properties with `string` or `number` items. When `true`, every writer owns its own slice of the value and the property returns the combination of all slices, with each value appearing once. Writers send `{ \"<sourceKey>\": [values] }` instead of a plain array. Cannot be changed after the property is created."
},
"specAuthentication": {
"type": "object",
"description": "When using the `spec` property with `embedded-url`, the authentication spec of the property.",
"properties": {
"clientId": {
"type": "string"
},
"authorizationUrl": {
"type": "string",
"format": "url"
},
"tokenUrl": {
"type": "string",
"format": "url"
},
"authorizationScope": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"openid"
]
}
},
"additionalProperties": false,
"required": [
"clientId",
"authorizationUrl",
"tokenUrl"
]
}
},
"required": [
"type"
]
}
},
"required": {
"type": "array",
"items": {
"type": "string"
},
"description": "The required properties of the blueprint, these must be provided when creating an entity based on this blueprint. This is an array of the required properties' identifiers."
}
},
"additionalProperties": false,
"required": [
"properties"
]
},
"calculationProperties": {
"type": "object",
"description": "The [calculation properties](https://docs.port.io/context-lake/data-model/setup-blueprint/properties/calculation-property/) of the blueprint. <br/> Each calculation property identifier can be `<= 100 characters` long, values must match the following pattern: `^[A-Za-z0-9@_=\\\\-]+$`.",
"default": {},
"propertyNames": {
"pattern": "^[A-Za-z0-9@_=\\\\-]+$",
"maxLength": 100
},
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"maxLength": 100,
"description": "The title of the property."
},
"description": {
"type": "string",
"description": "The description of the property."
},
"icon": {
"type": "string",
"description": "The icon of the property."
},
"calculation": {
"type": "string",
"description": "The JQ expression that calculates the value of the property."
},
"type": {
"enum": [
"string",
"number",
"boolean",
"object",
"array"
],
"description": "The type of the property."
},
"format": {
"enum": [
"date-time",
"url",
"email",
"idn-email",
"ipv4",
"ipv6",
"markdown",
"yaml",
"user",
"team",
"proto",
"labeled-url"
],
"description": "The format of the property."
},
"dateFormat": {
"enum": [
"relative",
"12-hour",
"24-hour",
"iso"
],
"description": "The display format for date-time calculation properties. Only applicable when format is 'date-time'. Defaults to 'relative'."
},
"spec": {
"enum": [
"open-api",
"embedded-url",
"async-api"
],
"description": "The spec of the property."
},
"specAuthentication": {
"type": "object",
"description": "When using the `spec` property with `embedded-url`, the authentication spec of the property.",
"properties": {
"clientId": {
"type": "string"
},
"authorizationUrl": {
"type": "string",
"format": "url"
},
"tokenUrl": {
"type": "string",
"format": "url"
},
"authorizationScope": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"openid"
]
}
},
"additionalProperties": false,
"required": [
"clientId",
"authorizationUrl",
"tokenUrl"
]
},
"colorized": {
"type": "boolean",
"description": "Whether the property is colorized."
},
"colors": {
"type": "object",
"description": "When using the `colorized` property, the colors of the property.",
"additionalProperties": {
"enum": [
"blue",
"turquoise",
"orange",
"purple",
"pink",
"yellow",
"green",
"red",
"gold",
"silver",
"paleBlue",
"darkGray",
"lightGray",
"bronze",
"lime",
"olive",
"brown"
]
}
},
"items": {
"type": "object",
"properties": {
"type": {
"enum": [
"string",
"number",
"boolean",
"object",
"array"
],
"description": "The type of the item."
},
"format": {
"description": "The format of the item.",
"enum": [
"date-time",
"url",
"email",
"idn-format",
"ipv4",
"ipv6",
"markdown",
"yaml",
"user",
"team",
"timer",
"proto",
"labeled-url"
]
}
}
}
},
"required": [
"calculation",
"type"
]
}
},
"mirrorProperties": {
"type": "object",
"description": "The [mirror properties](https://docs.port.io/context-lake/data-model/setup-blueprint/properties/mirror-property/) of the blueprint. <br/> Each mirror property identifier can be `<= 100 characters` long, values must match the following pattern: `^[A-Za-z0-9@_=\\\\-]+$`.",
"propertyNames": {
"pattern": "^[A-Za-z0-9@_=\\\\-]+$",
"maxLength": 100
},
"additionalProperties": {
"type": "object",
"properties": {
"path": {
"type": "string",
"pattern": "^(?:[A-Za-z0-9@_=\\-$]+\\.)+?(\\w|\\$|@|-)*?[^\\.]+$",
"description": "The path to the property in the related blueprint. This is a string of relation identifiers separated by dots, the last identifier is the property identifier."
},
"title": {
"type": "string",
"maxLength": 100,
"description": "The title of the property."
}
},
"additionalProperties": false,
"required": [
"path"
]
}
},
"aggregationProperties": {
"type": "object",
"description": "The [aggregation properties](https://docs.port.io/context-lake/data-model/setup-blueprint/properties/aggregation-property/) of the blueprint. <br/> Each aggregation property identifier can be `<= 100 characters` long, values must match the following pattern: `^[A-Za-z0-9@_=\\\\-]+$`.",
"default": {},
"propertyNames": {
"pattern": "^[A-Za-z0-9@_=\\\\-]+$",
"maxLength": 100
},
"additionalProperties": {
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 100,
"description": "The title of the property."
},
"description": {
"type": "string",
"description": "The description of the property."
},
"icon": {
"type": "string",
"description": "The icon of the property."
},
"type": {
"enum": [
"number"
],
"default": "number",
"description": "The type of the property. This is the type of the aggregation result."
},
"target": {
"type": "string",
"description": "The blueprint identifier to run the aggregation on."
},
"calculationSpec": {
"type": "object",
"oneOf": [
{
"title": "Count entities",
"oneOf": [
{
"type": "object",
"title": "Count",
"properties": {
"func": {
"description": "The function to use for the aggregation.",
"enum": [
"count"
]
},
"calculationBy": {
"type": "string",
"description": "Whether to aggregate by entities or properties.",
"enum": [
"entities"
]
}
},
"required": [
"func",
"calculationBy"
],
"additionalProperties": false
},
{
"type": "object",
"title": "Average entities over time",
"properties": {
"func": {
"description": "The function to use for the aggregation.",
"enum": [
"average"
]
},
"measureTimeBy": {
"type": "string",
"description": "The time property to use for the aggregation."
},
"averageOf": {
"type": "string",
"enum": [
"hour",
"day",
"week",
"month",
"total"
]
},
"calculationBy": {
"type": "string",
"description": "Whether to aggregate by entities or properties.",
"enum": [
"entities"
]
}
},
"required": [
"func",
"calculationBy",
"averageOf"
],
"additionalProperties": false
}
]
},
{
"title": "Aggregate property",
"oneOf": [
{
"type": "object",
"title": "Aggregate property values",
"properties": {
"func": {
"type": "string",
"enum": [
"sum",
"min",
"max",
"median"
],
"description": "The function to use for the aggregation."
},
"property": {
"type": "string",
"description": "The property to aggregate."
},
"calculationBy": {
"type": "string",
"description": "Whether to aggregate by property or entities.",
"enum": [
"property"
]
}
},
"additionalProperties": false,
"required": [
"func",
"property",
"calculationBy"
]
},
{
"type": "object",
"title": "Average property over time",
"properties": {
"func": {
"description": "The function to use for the aggregation.",
"enum": [
"average"
]
},
"measureTimeBy": {
"type": "string",
"description": "The time property to use for the aggregation."
},
"averageOf": {
"type": "string",
"enum": [
"hour",
"day",
"week",
"month",
"total"
]
},
"property": {
"type": "string",
"description": "The property to aggregate."
},
"calculationBy": {
"type": "string",
"description": "Whether to aggregate by property or entities.",
"enum": [
"property"
]
}
},
"additionalProperties": false,
"required": [
"func",
"property",
"calculationBy",
"averageOf"
]
}
]
}
],
"description": "The calculation spec of the property."
},
"query": {
"title": "Entities query",
"type": "object",
"properties": {
"combinator": {
"enum": [
"and",
"or"
],
"description": "The combinator to use for the rules."
},
"rules": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "Date Rule",
"properties": {
"property": {
"title": "Contexted property",
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
},
"operator": {
"enum": [
"between",
"notBetween",
"="
]
},
"value": {
"type": "object",
"oneOf": [
{
"type": "object",
"title": "Date Range",
"properties": {
"from": {
"type": "string",
"format": "date-time"
},
"to": {
"type": "string",
"format": "date-time"
}
},
"required": [
"from",
"to"
]
},
{
"type": "object",
"title": "Date Preset",
"properties": {
"preset": {
"type": "string",
"enum": [
"today",
"tomorrow",
"yesterday",
"lastDay",
"lastWeek",
"last2Weeks",
"lastMonth",
"last3Months",
"last6Months",
"last12Months",
"last2Years",
"last3Years",
"nextDay",
"nextWeek",
"next2Weeks",
"nextMonth",
"next3Months",
"next6Months",
"next12Months"
]
}
},
"required": [
"preset"
]
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
}
},
"required": [
"property",
"operator",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"title": "Empty Rule",
"oneOf": [
{
"type": "object",
"title": "Empty Rule",
"properties": {
"operator": {
"enum": [
"isEmpty",
"isNotEmpty"
]
},
"property": {
"type": "string"
}
},
"required": [
"operator",
"property"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"title": "Number Rule",
"properties": {
"property": {
"title": "Contexted property",
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
},
"operator": {
"enum": [
">",
">=",
"<",
"<="
]
},
"value": {
"anyOf": [
{
"type": "number",
"title": "number"
},
{
"type": "string",
"format": "date-time",
"title": "date-time"
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
}
},
"required": [
"property",
"operator",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"title": "Expired Rule",
"oneOf": [
{
"type": "object",
"title": "Expired Rule",
"properties": {
"operator": {
"enum": [
"isExpired",
"isNotExpired"
]
},
"property": {
"type": "string"
}
},
"required": [
"operator",
"property"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"title": "String Rule",
"oneOf": [
{
"type": "object",
"title": "String Rule",
"properties": {
"property": {
"title": "Contexted property",
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
},
"operator": {
"enum": [
"=",
"!=",
"containsAny",
"contains",
"doesNotContains",
"beginsWith",
"doesNotBeginsWith",
"endsWith",
"doesNotEndsWith",
"in",
"notIn"
]
},
"value": {
"anyOf": [
{
"type": "null",
"title": "null"
},
{
"type": "string",
"title": "string"
},
{
"type": "number",
"title": "number"
},
{
"type": "boolean",
"title": "boolean"
},
{
"type": "string",
"format": "date-time",
"title": "date-time"
},
{
"type": "array",
"items": {
"type": "string"
},
"title": "array"
},
{
"type": "array",
"items": {
"type": "number"
},
"title": "array"
},
{
"type": "array",
"items": {
"type": "boolean"
},
"title": "array"
},
{
"type": "array",
"items": {
"type": "string",
"format": "date-time"
},
"title": "array"
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
}
},
"additionalProperties": false,
"required": [
"property",
"operator",
"value"
]
}
]
},
{
"type": "object",
"title": "Relation Rule",
"properties": {
"operator": {
"enum": [
"relatedTo"
]
},
"blueprint": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string",
"title": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"title": "array"
}
]
},
"direction": {
"enum": [
"upstream",
"downstream"
]
},
"required": {
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"operator",
"value",
"blueprint"
]
},
{
"type": "object",
"title": "Property schema rule",
"properties": {
"propertySchema": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"format": {
"type": "string"
},
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"format": {
"type": "string"
}
},
"required": [
"type"
]
}
},
"required": [
"type"
],
"additionalProperties": false
},
"operator": {
"enum": [
"=",
"!=",
"contains"
]
},
"value": {
"anyOf": [
{
"type": "null",
"title": "null"
},
{
"type": "string",
"title": "string"
},
{
"type": "number",
"title": "number"
},
{
"type": "boolean",
"title": "boolean"
}
]
}
},
"required": [
"operator",
"propertySchema"
],
"additionalProperties": false
},
{
"type": "object",
"title": "matchAny Rule",
"anyOf": [
{
"type": "object",
"title": "Property matchAny rule",
"properties": {
"property": {
"oneOf": [
{
"type": "object",
"title": "Path filter property",
"properties": {
"path": {
"type": "array",
"minItems": 1,
"items": {
"anyOf": [
{
"type": "string",
"title": "Relation identifier"
},
{
"type": "object",
"title": "Relation with max hops",
"properties": {
"relation": {
"type": "string"
},
"maxHops": {
"type": "number",
"minimum": 1,
"maximum": 15
}
}
}
]
}
},
"fromBlueprint": {
"type": "string"
}
},
"required": [
"path"
],
"additionalProperties": false
},
{
"title": "Contexted property",
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
}
]
},
"operator": {
"type": "string",
"enum": [
"matchAny"
]
},
"value": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"title": "Contexted property",
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"title": "User-context field",
"properties": {
"property": {
"type": "string"
},
"context": {
"type": "string",
"enum": [
"user",
"userTeams"
]
}
},
"required": [
"property",
"context"
]
}
]
}
]
}
},
"required": [
"property",
"operator",
"value"
],
"additionalProperties": false
}
]
},
{
"allOf": [
"circular(Entities query)",
{
"title": "Nested query"
}
]
}
]
}
}
},
"required": [
"combinator",
"rules"
],
"additionalProperties": false,
"example": {
"combinator": "and",
"rules": [
{
"property": "$blueprint",
"operator": "=",
"value": "service"
},
{
"combinator": "or",
"rules": [
{
"property": "environment",
"operator": "=",
"value": "production"
},
{
"property": "environment",
"operator": "=",
"value": "staging"
}
]
}
]
}
},
"pathFilter": {
"type": "array",
"description": "Optional filter to run the aggregation on entities that are connected through a specific path. When empty will use all the related entities from all possible paths",
"maxItems": 1,
"items": {
"type": "object",
"properties": {
"path": {
"description": "The path to the property in the related blueprint. This is a string of relation identifiers separated by dots.",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"fromBlueprint": {
"type": "string"
}
},
"required": [
"path"
],
"additionalProperties": false
}
}
},
"additionalProperties": false,
"required": [
"title",
"target",
"calculationSpec"
]
}
},
"relations": {
"type": "object",
"description": "The [relations](https://docs.port.io/context-lake/data-model/setup-blueprint/relate-blueprints) of the blueprint. <br/> Each relation identifier can be `<= 100 characters` long, values must match the following pattern: `^[A-Za-z0-9@_=\\\\-]+$`.",
"propertyNames": {
"pattern": "^[A-Za-z0-9@_=\\\\-]+$",
"maxLength": 100
},
"additionalProperties": {
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 100
},
"target": {
"type": "string"
},
"required": {
"type": "boolean",
"default": false
},
"many": {
"type": "boolean",
"default": false
},
"description": {
"type": "string"
},
"type": {
"type": "string"
},
"union": {
"type": "boolean",
"description": "When `true`, every writer owns its own slice of the value and the relation returns the combination of all slices. Requires `many: true`. Cannot be changed after the relation is created."
}
},
"additionalProperties": false,
"required": [
"target",
"required",
"many"
]
}
},
"includeInGlobalSearch": {
"type": [
"boolean",
"null"
],
"description": "Overrides the org-level includeBlueprintsInGlobalSearchByDefault setting. When set, controls whether entities of this blueprint appear in global search results. Set to null to clear the override."
},
"changelogDestination": {
"description": "The destination of the blueprint's changelog.",
"oneOf": [
{
"type": "object",
"title": "Webhook",
"description": "The changelog will be sent to the specified webhook.",
"properties": {
"type": {
"type": "string",
"enum": [
"WEBHOOK"
]
},
"agent": {
"type": "boolean",
"description": "If `true`, Port's execution agent will be used to send the changelog."
},
"url": {
"type": "string",
"description": "The URL of the webhook.",
"format": "uri"
}
},
"required": [
"url",
"type"
],
"additionalProperties": false
},
{
"type": "object",
"title": "Kafka",
"description": "The changelog will be sent to the Kafka topic connected to your Port account.",
"properties": {
"type": {
"type": "string",
"enum": [
"KAFKA"
]
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
},
"updatedBy": {
"type": "string"
},
"createdBy": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"identifier",
"title",
"schema",
"createdBy",
"updatedBy",
"createdAt",
"updatedAt"
]
}
},
"required": [
"blueprint",
"ok"
],
"additionalProperties": false
}
}
}
},
"401": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false
}
}
}
},
"404": {
"description": "A resource with the provided identifier was not found",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error",
"message"
],
"additionalProperties": false,
"description": "A resource with the provided identifier was not found"
}
}
}
},
"413": {
"description": "Request body is too large (limit is 1MiB)",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false,
"description": "Request body is too large (limit is 1MiB)"
}
}
}
},
"422": {
"description": "The json provided does not match the route's schema",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error",
"message"
],
"additionalProperties": false,
"description": "The json provided does not match the route's schema"
}
}
}
}
}
}