Create an entity
POST/v1/blueprints/:blueprint_identifier/entities
This route allows you to create an entity in your software catalog based on an existing blueprint in your data model. It can also be used to overwrite or update an existing entity.
To learn more about entities, check out the documentation.
Request
Path Parameters
Possible values: non-empty
The identifier of the blueprint you want to create an entity from.
Query Parameters
If true
, this call will override the entire entity if it already exists.
If true
and upsert
is also true
, this call will update the entity if it already exists.
If true
, this call will only validate the entity and return the validation errors.
If true
, this call will also create missing related entities.
This is useful when you want to create an entity and its related entities in one call, or if you want to create an entity whose related entity does not exist yet.
You can provide a run_id
to associate the created entity with a specific action run.
- application/json
Body
- String identifier
- Search query
Array [
- `=` rule
- `in` rule
- Search query
- String
- Number
Array [
- `=` Rule
- `in` Rule
- String
- Number
]
]
identifier
object
oneOf
The identifier of the new entity.
string
Possible values: Value must match regular expression ^[A-Za-z0-9@_.:\\/=-]+$
Possible values: [and
, or
]
rules
object[]
required
A search query to define the entity's identifier based on a property of the entity.
Read more here.
anyOf
Possible values: [=
]
value
object
required
anyOf
string
number
Possible values: [in
]
Possible values: [and
, or
]
rules
object[]
required
A search query to define the entity's identifier based on a property of the entity.
Read more here.
anyOf
Possible values: [=
]
value
object
required
anyOf
string
number
Possible values: [in
]
The title of the new entity.
The icon of the new entity.
The Port team/s to which the new entity will belong.
An object containing the properties of the new entity, in "key":"value"
pairs where the key
is the property's identifier, and the value
is its value.
An object containing the relations of the new entity, in "key":"value"
pairs where the key
is the relation's identifier, and the value
is the related entity's identifier.
You can also use a search query to define relations based on a property of the related entity.
Responses
- 200
- 201
- 400
- 403
- 404
- 409
- 422
- 500
Successfully updated an entity
Successfully created an entity
One of the following errors occurred:
Error | Description |
---|---|
bad_request | The json provided does not match the route's schema |
run_exhausted | The action run with the provided runId has already finished execution |
One of the following errors occurred:
Error | Description |
---|---|
required_relation | Relation cannot be deleted because it is a required relation |
missing_permissions | You do not have permissions to perform the requested operation. For further details, please contact your admin |
One of the following errors occurred:
Error | Description |
---|---|
not_found | A resource with the provided identifier was not found |
One of the following errors occurred:
Error | Description |
---|---|
identifier_taken | The provided identifier already exists, identifiers must be unique |
One of the following errors occurred:
Error | Description |
---|---|
team_inheritance_enabled | The blueprint's entities inherite their team from other entities through an existing relation |
blueprint_schema_mismatch | The provided entity does not match the blueprint's schema |
required_relation | A relation is required |
relation_many_violation | A provided relation cannot contain more than one entity |
One of the following errors occurred:
Error | Description |
---|---|
internal_error | An internal error occurred |