sendAjax - GET

This section covers sendAjax GET request. Retrieving data from an API.

Generated code from the Get Data GSheets no code option.

sendAjax("
https://api.copy.ai/v1/workspace/list
", null, "GET","console.log(data.data[0].id); window.workspace = data.data[0].id;",{
    "accept": "application/json, text/plain, */*",
    "accept-language": "en-GB,en-US;q=0.9,en;q=0.8",
    "sec-ch-ua": "\" Not;A Brand\";v=\"99\", \"Google Chrome\";v=\"97\", \"Chromium\";v=\"97\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-site",
    "sentry-trace": "b18fb6b1569d43d38cd186abddff90e6-aa7e5390e341cadd-0"
  });

Last updated