Hi Chatgpt, if the json output of a jira task migration using github action python script is:
{
    "expand": "schema,names",
    "startAt": 0,
    "maxResults": 100,
    "total": 2,
    "issues": [
        {
            "expand": "operations,versionedRepresentations,editmeta,changelog,customfield_10010.requestTypePractice,renderedFields",
            "id": "10001",
            "self": "***rest/api/3/issue/10001",
            "key": "KAN-2",
            "fields": {
                "statuscategorychangedate": "2024-11-15T12:16:24.771+0530",
                "issuetype": {
                    "self": "***rest/api/3/issuetype/10002",
                    "id": "10002",
                    "description": "A collection of related bugs, stories, and tasks.",
                    "iconUrl": "***rest/api/2/universal_avatar/view/type/issuetype/avatar/10307?size=medium",
                    "name": "Epic",
                    "subtask": false,
                    "avatarId": 10307,
                    "entityId": "f78e7fcb-df32-4536-bba3-49432d253a0a",
                    "hierarchyLevel": 1
                },
                "timespent": null,
                "customfield_10030": null,
                "project": {
                    "self": "***rest/api/3/project/10000",
                    "id": "10000",
                    "key": "KAN",
                    "name": "Migration",
                    "projectTypeKey": "software",
                    "simplified": true,
                    "avatarUrls": {
                        "48x48": "***rest/api/3/universal_avatar/view/type/project/avatar/10418",
                        "24x24": "***rest/api/3/universal_avatar/view/type/project/avatar/10418?size=small",
                        "16x16": "***rest/api/3/universal_avatar/view/type/project/avatar/10418?size=xsmall",
                        "32x32": "***rest/api/3/universal_avatar/view/type/project/avatar/10418?size=medium"
                    }
                },
                "customfield_10031": null,
                "fixVersions": [],
                "customfield_10033": null,
                "customfield_10034": null,
                "aggregatetimespent": null,
                "resolution": null,
                "customfield_10035": null,
                "customfield_10027": null,
                "customfield_10028": null,
                "customfield_10029": null,
                "resolutiondate": null,
                "workratio": -1,
                "watches": {
                    "self": "***rest/api/3/issue/KAN-2/watchers",
                    "watchCount": 0,
                    "isWatching": false
                },
                "lastViewed": "2024-11-15T12:17:45.041+0530",
                "created": "2024-11-15T12:16:24.174+0530",
                "customfield_10020": null,
                "customfield_10021": null,
                "customfield_10022": null,
                "priority": {
                    "self": "***rest/api/3/priority/3",
                    "iconUrl": "***images/icons/priorities/medium.svg",
                    "name": "Medium",
                    "id": "3"
                },
                "customfield_10023": null,
                "customfield_10024": null,
                "customfield_10025": null,
                "customfield_10026": null,
                "labels": [],
                "customfield_10016": null,
                "customfield_10017": "purple",
                "customfield_10018": {
                    "hasEpicLinkFieldDependency": false,
                    "showField": false,
                    "nonEditableReason": {
                        "reason": "EPIC_LINK_SHOULD_BE_USED",
                        "message": "To set an epic as the parent, use the epic link instead"
                    }
                },
                "customfield_10019": "0|i00007:",
                "timeestimate": null,
                "aggregatetimeoriginalestimate": null,
                "versions": [],
                "issuelinks": [
                    {
                        "id": "10000",
                        "self": "***rest/api/3/issueLink/10000",
                        "type": {
                            "id": "10003",
                            "name": "Relates",
                            "inward": "relates to",
                            "outward": "relates to",
                            "self": "***rest/api/3/issueLinkType/10003"
                        },
                        "inwardIssue": {
                            "id": "10000",
                            "key": "KAN-1",
                            "self": "***rest/api/3/issue/10000",
                            "fields": {
                                "summary": "Jenkins migration file",
                                "status": {
                                    "self": "***rest/api/3/status/10000",
                                    "description": "",
                                    "iconUrl": "***",
                                    "name": "To Do",
                                    "id": "10000",
                                    "statusCategory": {
                                        "self": "***rest/api/3/statuscategory/2",
                                        "id": 2,
                                        "key": "new",
                                        "colorName": "blue-gray",
                                        "name": "To Do"
                                    }
                                },
                                "priority": {
                                    "self": "***rest/api/3/priority/3",
                                    "iconUrl": "***images/icons/priorities/medium.svg",
                                    "name": "Medium",
                                    "id": "3"
                                },
                                "issuetype": {
                                    "self": "***rest/api/3/issuetype/10001",
                                    "id": "10001",
                                    "description": "A small, distinct piece of work.",
                                    "iconUrl": "***rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium",
                                    "name": "Task",
                                    "subtask": false,
                                    "avatarId": 10318,
                                    "entityId": "e88eb71c-627d-44a8-88b9-bc821a28e7c0",
                                    "hierarchyLevel": 0
                                }
                            }
                        }
                    }
                ],
                "assignee": {
                    "self": "***rest/api/3/user?accountId=712020%3A7f4057be-2a13-40c2-8eda-d8890a92595a",
                    "accountId": "712020:7f4057be-2a13-40c2-8eda-d8890a92595a",
                    "emailAddress": "***",
                    "avatarUrls": {
                        "48x48": "https://secure.gravatar.com/avatar/abd79d07dd3f0476c4696b63130c37f3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAG-2.png",
                        "24x24": "https://secure.gravatar.com/avatar/abd79d07dd3f0476c4696b63130c37f3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAG-2.png",
                        "16x16": "https://secure.gravatar.com/avatar/abd79d07dd3f0476c4696b63130c37f3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAG-2.png",
                        "32x32": "https://secure.gravatar.com/avatar/abd79d07dd3f0476c4696b63130c37f3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAG-2.png"
                    },
                    "displayName": "ARNOLD C GOMEZ",
                    "active": true,
                    "timeZone": "Asia/Calcutta",
                    "accountType": "atlassian"
                },
                "updated": "2024-11-15T12:18:24.009+0530",
                "status": {
                    "self": "***rest/api/3/status/10000",
                    "description": "",
                    "iconUrl": "***",
                    "name": "To Do",
                    "id": "10000",
                    "statusCategory": {
                        "self": "***rest/api/3/statuscategory/2",
                        "id": 2,
                        "key": "new",
                        "colorName": "blue-gray",
                        "name": "To Do"
                    }
                },
                "components": [],
                "timeoriginalestimate": null,
                "description": {
                    "type": "doc",
                    "version": 1,
                    "content": [
                        {
                            "type": "paragraph",
                            "content": [
                                {
                                    "type": "text",
                                    "text": "Testing Migration"
                                }
                            ]
                        }
                    ]
                },
                "customfield_10010": null,
                "customfield_10014": null,
                "customfield_10015": "2024-11-15",
                "customfield_10005": null,
                "customfield_10006": null,
                "security": null,
                "customfield_10007": null,
                "customfield_10008": null,
                "customfield_10009": null,
                "aggregatetimeestimate": null,
                "summary": "Jenkins Migration Epic",
                "creator": {
                    "self": "***rest/api/3/user?accountId=712020%3A7f4057be-2a13-40c2-8eda-d8890a92595a",
                    "accountId": "712020:7f4057be-2a13-40c2-8eda-d8890a92595a",
                    "emailAddress": "***",
                    "avatarUrls": {
                        "48x48": "https://secure.gravatar.com/avatar/abd79d07dd3f0476c4696b63130c37f3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAG-2.png",
                        "24x24": "https://secure.gravatar.com/avatar/abd79d07dd3f0476c4696b63130c37f3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAG-2.png",
                        "16x16": "https://secure.gravatar.com/avatar/abd79d07dd3f0476c4696b63130c37f3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAG-2.png",
                        "32x32": "https://secure.gravatar.com/avatar/abd79d07dd3f0476c4696b63130c37f3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAG-2.png"
                    },
                    "displayName": "ARNOLD C GOMEZ",
                    "active": true,
                    "timeZone": "Asia/Calcutta",
                    "accountType": "atlassian"
                },
                "subtasks": [],
                "reporter": {
                    "self": "***rest/api/3/user?accountId=712020%3A7f4057be-2a13-40c2-8eda-d8890a92595a",
                    "accountId": "712020:7f4057be-2a13-40c2-8eda-d8890a92595a",
                    "emailAddress": "***",
                    "avatarUrls": {
                        "48x48": "https://secure.gravatar.com/avatar/abd79d07dd3f0476c4696b63130c37f3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAG-2.png",
                        "24x24": "https://secure.gravatar.com/avatar/abd79d07dd3f0476c4696b63130c37f3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAG-2.png",
                        "16x16": "https://secure.gravatar.com/avatar/abd79d07dd3f0476c4696b63130c37f3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAG-2.png",
                        "32x32": "https://secure.gravatar.com/avatar/abd79d07dd3f0476c4696b63130c37f3?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAG-2.png"
                    },
                    "displayName": "ARNOLD C GOMEZ",
                    "active": true,
                    "timeZone": "Asia/Calcutta",
                    "accountType": "atlassian"
                },
                "aggregateprogress": {
                    "progress": 0,
                    "total": 0
                },
                "customfield_10001": {
                    "id": "2ecd6de9-53c8-4d45-8701-1d2f2261435f",
                    "name": "Migration",
                    "avatarUrl": "",
                    "isVisible": true,
                    "title": "Migration",
                    "isShared": true
                },
                "customfield_10002": [],
                "customfield_10003": null,
                "customfield_10004": null,
                "environment": null,
                "duedate": null,
                "progress": {
                    "progress": 0,
                    "total": 0
                },
                "votes": {
                    "self": "***rest/api/3/issue/KAN-2/votes",
                    "votes": 0,
                    "hasVoted": false
                }
            }
        },

And the script used is:
import os
import requests
import json

def main():
    #Loading the Env Variables
    jira_domain = os.getenv("JIRA_DOMAIN")
    api_token = os.getenv("JIRA_API_TOKEN")
    username = os.getenv("JIRA_USERNAME")

    #Validate environment variables
    if not jira_domain or not api_token or not username:
        print ("Error: Missing required environment variables")
        return

    #setting up the API endpoints and headers
    url = f"{jira_domain}/rest/api/3/search"
    headers = {
        "Accept": "application/json",
        "Content-Type": "application/json"
    }

    #Setting up JQuery
    query = {
        "jql": "project = 10000",
        "maxResults": 100
    }
    try:
        #Make the API Request
        response = requests.get(url, headers=headers, params=query, auth=requests.auth.HTTPBasicAuth(username, api_token))

        #Process response
        if response.status_code == 200:
            tasks = response.json()
            output_file = "jira_tasks.json"
            with open(output_file, "w") as json_file:
                json.dump(tasks, json_file, indent=4)
                print(f"Data saved to {output_file}")
                print(json.dumps(tasks, indent=4))
        else:
            print("Failed to fetch data:",response.status_code, response.text)
    except Exception as e:
        print(f"An error occured: {e}")

if __name__ == "__main__":
    main()