|
| 1 | +const getWorkspaces = () => { |
| 2 | + |
| 3 | + const options = { |
| 4 | + "headers": { |
| 5 | + "accept": "*/*, application/json", |
| 6 | + "accept-language": "en-US,en;q=0.9", |
| 7 | + "content-type": "application/json", |
| 8 | + "sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"96\", \"Google Chrome\";v=\"96\"", |
| 9 | + "sec-ch-ua-mobile": "?0", |
| 10 | + "sec-ch-ua-platform": "\"macOS\"", |
| 11 | + "sec-fetch-dest": "empty", |
| 12 | + "sec-fetch-mode": "cors", |
| 13 | + "sec-fetch-site": "same-origin", |
| 14 | + "x-requested-with": "fetch", |
| 15 | + "x-timezone": "America/Los_Angeles", |
| 16 | + }, |
| 17 | + "referrer": "https://app.segment.com/workspaces", |
| 18 | + "referrerPolicy": "strict-origin-when-cross-origin", |
| 19 | + "body": "{\"operationName\":\"getWorkspaces\",\"variables\":{},\"query\":\"query getWorkspaces {\\n workspaces: workspaces {\\n id\\n slug\\n name\\n isCurrentUserOwner\\n isCurrentUserExemptFromSSO\\n sso {\\n defaultAuth0ConnectionId\\n auth0ConnectionIds\\n isForced\\n __typename\\n }\\n owners {\\n id\\n __typename\\n }\\n lockouts {\\n workspaceId\\n reason\\n message\\n createdAt\\n __typename\\n }\\n billing {\\n isOnStartupProgram\\n isFreeAccount\\n __typename\\n }\\n __typename\\n }\\n}\\n\"}", |
| 20 | + "method": "POST", |
| 21 | + "mode": "cors", |
| 22 | + "credentials": "include" |
| 23 | + } |
| 24 | + const workspaceResponse = fetch ("https://app.segment.com/gateway-api/graphql", options) |
| 25 | + |
| 26 | + console.log(workspaceResponse) |
| 27 | + |
| 28 | +} |
| 29 | + |
| 30 | +getWorkspaces() |
0 commit comments