Let me start off by saying that I consider myself an advanced amateur with both API and JSON.
Where I am now
By importing CSV files I have a good handle on Insight and have a good idea of how I want to use it. Now I need to automate the import using PowerShell, but I am doing all testing in Postman as the PowerShell Insight module is no longer working.
I have a basic Insight Scheme set up:
I also have the import set up, key generated and working:
I am following along with this document: Insight external imports workflow (atlassian.com)
I am at the point where I am trying to set up mapping.
My current block:
My problem is that I can't get Insight to import any scheme I try, and I have tried a lot of variations and tried to search all over. I tried the two default schema files and get "
{"jsonValidationErrors":[{"type":"required","code":"1028","path":"$","sc
hemaPath":"#/required","arguments":["schema"],"details":null,"message":"$.schema: is
missing but it is required"},{"type":"required","code":"1028","path":"$","schemaPath":"#/req
uired","arguments":["mapping"],"details":null,"message":"$.mapping: is missing but it is
required"}],"dataValidationErrors":[],"status":"error"}
If I can get the right format I could take it from there if anyone can help. However if I'm way off base in what I'm doing I would appreciate a pointer.
Right now I don't know what I need or how to format it and the examples are not explained and are very advanced at the moment with no context.
Any help?
Thanks for reading!
Here's a skeleton external imports schema and mapping payload:
{
"$schema": "https://api.atlassian.com/jsm/insight/imports/external/schema/versions/2021_09_15",
"schema": {
"objectSchema": {
"name": "My schema name",
"description": "",
"objectTypes": [
{
"name": "My object name",
"description": "",
"attributes": [
{
"name": "Name",
"description": "",
"type": "text",
"label": true
}, {
"name": "Some other attribute",
"description": "",
"type": "text",
"label": true
}
]
}
]
}
},
"mapping": {
"objectTypeMappings": [
{
"objectTypeName": "My object name",
"description": "",
"selector": "",
"attributesMapping": [
{
"attributeName": "Name",
"attributeLocators": [
"name"
],
"externalIdPart": true
},
{
"attributeName": "Some other attribute",
"attributeLocators": [
"some_other_attribute"
],
"externalIdPart": true
}
]
}
]
}
}
Looking at your error message it seems like you don't have the schema and mapping keys defined.
I'm with you on the docs - I opened a FR asking for better ones ==> https://jira.atlassian.com/browse/JSDCLOUD-11886?filter=-2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.