Unable to fetch fields through REST API

Hello Everyone

We have JIRA Cloud Setup and I am trying to automate few tasks. I am using Google App Script to use the JIRA REST API.

While jira creation is working perfectly fine, I am unable to use the search API in the right fashion. Even after I specify the fields parameter in the URI, I am not getting those fields in the response. Can anyone guide

ar options = {
    'method': 'GET',
    'headers': {
      'Authorization': auth,
      'Content-Type': 'application/json'
    },
    'muteHttpExceptions': true
  };

  var columns = [
    'key',
    'summary',
    'status',
    'customfield_13262' // Add your custom fields here
  ];

  // Convert columns to fields parameter
  var fields = columns.map(function(column) {
    return 'fields.' + column;
  }).join(',');

  
  // Fetch issues from Jira
  var response = UrlFetchApp.fetch(jiraUrl + apiEndpoint + '?jql=' + encodeURIComponent(jqlQuery) + '&maxResults=' + encodeURIComponent(5000) + '&fields=' + encodeURIComponent(fields), options);

are you using this endpoint? Try not to append fields. prefix when you convert columns to fields parameter.