Jira Assets Cloud: Import data via API: how to define the type of reference (Ref, Technical, Dep etc

thomas
Contributor
January 18, 2024

Hi,

In the GUI when editing or creating to an object you can refer to another object. An object reference also comes with a "type" of link like Dependency, Technical, etc which will define the link type in the object graph.

See screenshot below to image what I am talking about

Untitled 2.png

It doesn't look like we can set the link "type" in an external/api import based on the latest JSON schema available. Is it supported?

We can see a 'pizza' type in the above image which seems to have been created via my JSON schema, below. I can only assume the link type name defaulted to the object attribute name using it... but is there a way to say it's a "Dependency" link?

"$schema": "https://api.atlassian.com/jsm/assets/imports/external/schema/versions/2023_10_19",
"schema": {
"objectSchema": {
...
"objectTypes": [
{
"externalId": "object-type/k8s",
"name": "K8s",
"description": "All K8s items",
"children": [
{
"externalId": "object-type/k8s_space",
"name": "Space2",
...
{
"externalId": "object-type-attribute/pizza",
"name": "pizza",
"description": "something that will go poof",
"type": "referenced_object",
"referenceObjectTypeExternalId": "object-type/reference_items_cluster",
"minimumCardinality": 1,
"maximumCardinality": 1
}
]
}
]
},
{
"externalId": "object-type/reference_items2",
"name": "Reference Items2",
"description": "A bunch of static stuff",
"children": [
{
"externalId": "object-type/reference_items_cluster",
"name": "Cluster",
"description": "Cluster of servers"
}
]
}
]

PS: Unfortunately the forum code block didn't maintain indentation so I tried to recreate it quickly by hand so don't pay attention to it. The real JSON is valid.

1 answer

0 votes
Deleted user July 11, 2024

Hello Thomas,

I would like to know if you have found a solution to your problem ?

I'm at the same step and I'm blocked.

kind regards

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events