Platform

User APIs

GET getUser

example.js
fetch('https://api.opsnow.io/platform/v2/users/{userId}', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

GET listUserCompanies

example.js
fetch('https://api.opsnow.io/platform/v2/users/{userId}/companies', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

Cloud Account APIs

GET getServiceAccount

example.js
fetch('https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/service-accounts/{serviceAccountId}', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

GET getAzureTenant

example.js
fetch('https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId}', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

GET getAwsAccount

example.js
fetch('https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts/{accountId}', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

GET listGcpServiceAccounts

example.js
fetch('https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/service-accounts', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

GET listGcpProjects_1

example.js
fetch('https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/projects', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

GET listAzureTenants

example.js
fetch('https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/azure/tenants', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

GET listAzureSubscriptions

example.js
fetch('https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId}/subscriptions', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

GET listVendors

example.js
fetch('https://api.opsnow.io/platform/v2/companies/{companyId}/vendors', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

GET listGcpProjects

example.js
fetch('https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/service-accounts/{serviceAccountId}/projects', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

GET listAwsAccounts

example.js
fetch('https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

GET getAwsAccountSavingsRecommendation

example.js
fetch('https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts/{accountId}/recommendation-savingsplan', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

GET getAwsAccountSetup

example.js
fetch('https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts/setup', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

Company APIs

GET listMasterCompanies

example.js
fetch('https://api.opsnow.io/platform/v2/companies/master-companies', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

GET listMasterCompanyUsers

example.js
fetch('https://api.opsnow.io/platform/v2/companies/{companyId}/master-users', {
  "method": "GET",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {YOUR_TOKEN_HERE}"
  }
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

Last updated

© 2023 OpsNow, Inc.