Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

External ID Mismatch on Jira Asset Imports API

Alex Barker
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 21, 2023

I am trying to create an external app to automatically import data into assets from an external source. We have an existing object type that we want the external app to import data into but attempting to call the PUT Mapping endpoint on the existing schema gives "EXTERNAL_ID_MISMATCH" errors

... 
"dataValidationErrors": [

        {

            "code": "EXTERNAL_ID_MISMATCH",

            "location": "object-type/users"

        },
...

Trying to get the existing external IDs through GET schema-and-mapping does not return any external IDs currently set, so I am not sure what it is mismatching with.

The schema & mapping upload works for a schema that does not already exist.

Am I missing something here? It would be nice if the documentation for the imports API could be improved.

1 answer

0 votes
thomas January 18, 2024

I believe it is impossible. I am in the same boat.

The schema you've created via the GUI cannot be used for your external import because the external import requires a "schema:" defined in the JSON, aka its own schema.

You get an EXTERNAL_ID_MISMATCH error because you've probably defined one or many objects in your JSON schema with the SAME name than what's in your current GUI schema/workspace.

e.g:

{"jsonValidationErrors":[],"dataValidationErrors":[{"code":"EXTERNAL_ID_MISMATCH","location":"object-type/foobar"}

In your JSON, look under the object-type/foobar and change the associated name to something else and you will see it will import your object fine but it will create a new one!

I am unsure if what you/we are trying to do is possible. The import rest API feels more like 'infrastructure-as-code' and must drive the WHOLE schema but is seriously limited in its abilities to do so. So frustrating.

Ref:

Suggest an answer

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

Atlassian Community Events