Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Assets (Insights) : Import data via API : use existing objects/mapping?

thomas
Contributor
January 16, 2024

Hi,

I am trying to import lots of cloud assets into Jira Assets via script / automation.

Can we simply import data using the existing objects/schema and even mapping?

It seems not...

I have followed this guide and I came to realise that an import always requires an object (schema) to be created. You cannot use your existing schema objects you've created via the GUI despite this information in that same guide.

jira-import-inaccurate-blurb.png

It can't be right because when you look at the latest JSON schema from 2023-10-19, it states that `schema` is a required attribute and (empty is no go either).

When you omit schema or set it to `{}` then you'll end-up with this error

< PUT /jsm/assets/workspace/.../v1/importsource/.../mapping HTTP/1.1
< Host: api.atlassian.com
< User-Agent: python-requests/2.31.0
{"jsonValidationErrors":[{"type":"required","code":"1028","path":"$","schemaPath":"#/required","arguments":["schema"],"details":null,"message":"$.schema: is missing but it is required"}],"dataValidationErrors":[],"status":"error"}
o # OR if you use "schema": {}, then you end up having sub object requirement issues
{"jsonValidationErrors":[{"type":"required","code":"1028","path":"$.schema","schemaPath":"#/properties/schema/required","arguments":["objectSchema"],"details":null,"message":"$.schema.objectSchema: is missing but it is required"}],"dataValidationErrors":[],"status":"error"}

So what's the go? How do people bulk import/update assets in Jira Assets?

Does it mean you can only drive assets using the API if you also drive the objects themselves? (greenfield)

 

1 answer

Suggest an answer

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

Atlassian Community Events