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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,975
Community Members
 
Community Events
184
Community Groups

REST API - Importing Assets - Objects Identical value varies each execution - Why? How to Fix?

Ian Carlos
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Apr 13, 2023

Hi everyone! I hope you're fine,

 

You'll see, I'm trying to perform an ASSETs import automation, following the next guide:

Imports REST API Guide 

 

I have successfully performed the automation, reading a CSV and submitting the data, Update and Create work both without any issue

 

The thing is, I need to make a report if the automation went well (or at least if it seems to)

 

When the importing is done, I get the following response performing an API REST call to the getExecutionStatus url (see the Step 5b: Start an import in the Imports REST API Guide):


NOTE: This time I'm performing an import without any new ASSET nor ASSET update (since I'll be doing the import daily and a non-change case could present)

{

    "status": "DONE",
    "progressResult": {
        "type": "IMPORT",
        "id": 100,
        "started": "2023-04-13T09:59:57.941+00:00",
        "ended": "2023-04-13T10:00:01.666+00:00",
        "objectSchemaId": 1,
        "result": "OK",
        "status": "FINISHED",
        "infoMessage": "No data to import",
        "jobId": "19747985-e0a4-4g83-af0c-f757c4fceb34",
        "importSourceId": "89e6a7ad-2cda-4c0f-80e3-71d9ae35caf8",
        "populatedObjectTypes": [
            "Book"
        ],
        "onlyExecutedForObjectTypes": [],
        "objectTypeResultMap": {
            "1": {
                "id": null,
                "objectTypeName": "Book",
                "objectTypeId": 1,
                "objectsUpdated": 0,
                "objectsCreated": 0,
                "objectsIdentical": 175,
                "objectsMissingUpdated": 0,
                "objectsMissingDeleted": 0,
                "entriesInSource": 260,
                "duplicateEntries": 0,
                "emptyLabelEntries": 0,
                "emptyExternalIdEntries": 0,
                "objectsFilteredWithQlQuery": 0,
                "errorMessages": null,
                "readExternalDataTimeInMs": 6,
                "mapExternalDataTimeInMs": 0,
                "qlQueryFilteringTimeInMs": 0,
                "decidingActionsTimeInMs": 10,
                "writeInsightDataTimeInMs": 0,
                "postFunctionTimeInMs": 0,
                "executionTimeInMs": 16,
                "objectsWithUpdatedReferences": 0
            }
        },
        "errorMessages": null,
        "totalNumberEntriesInImport": 260
    }
}

I was thinking to make a comparision 

# Using Python 3.x
if objectsUpdated + objectsCreated + objectsIdentical + objectsMissingUpdated + objectsMissingDeleted + duplicateEntries + emptyLabelEntries == entriesInSource:
return True # All good
else:
return False # Oh, something happened

But objectsIdentical varies each execution... with the same CSV... (and I'm performing the tests in a sandbox environment, so, I know nobody is creating / updating ASSETs besides me)

 

I know that errorMessages is an useful field too, but I'm trying to understand this issue

 

Do you know why is this happening? Or how to fix it?

 

Thanks in advance

Best regards,

0 answers

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