Forums

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

What is the JSON syntax for a referencing on object type using an external import?

Jacob Olson December 2, 2021

I am testing external imports and have run into a problem with referencing object types. I have tested the JSON for external imports without referencing object types, and had no problem. For that I used the JSON structure that Atlassian Developer provided: https://developer.atlassian.com/cloud/insight/imports/schema-and-mapping/#reference-type-attributes

Atlassian Developer also provides a JSON guide that includes referencing object types: https://api.atlassian.com/jsm/insight/imports/external/schema/versions/2021_09_15

I have been trying to follow their JSON for referencing object types but I keep getting this error: 

{
    "jsonValidationErrors": [
        {
            "type""required",
            "code""1028",
            "path""$.schema.objectSchema.objectTypes[1].attributes[12]",
            "arguments": [
                "referenceObjectTypeName"
            ],
            "details"null,
            "message""$.schema.objectSchema.objectTypes[1].attributes[12].referenceObjectTypeName: is missing but it is required"
        }
    ],
    "dataValidationErrors": [],
    "status""error"
}
I am wondering if anyone can help me to understand what the error is referencing, and what I can do to fix it?
Thank you!
Picture1.PNG Picture2.PNG Picture3.PNG Picture4.PNG Picture5.PNG Picture6.PNG Picture7.PNG Picture8.PNG Picture9.PNG

1 answer

0 votes
Jacob Olson December 7, 2021

I was reviewing the information at the Atlassian Developer website and found something I was missing. For the attributes that are referencing other attributes I used this format:
{
"name":"UserID",
"description":"",
"type":"referenced_object",
"referenceObjectTypeName":"users"
}


In the Mapping, I used this format:
{
"attributeName": "UserID",
"attributeLocators": [
"UserID"
],
"objectMappingIQL": "UserID is not EMPTY"
}

I was not including the object mapping IQL, and I was not correctly specifying the "type" and "referenceObjectTypeName" in the object type.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events