Platform
User APIs
GET
getUser
GET
getUserexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/users/{userId}"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/users/{userId}" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/users/{userId}", headers=headers)
print(response.json())
GET
listUserCompanies
GET
listUserCompaniesexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/users/{userId}/companies"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/users/{userId}/companies" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/users/{userId}/companies", headers=headers)
print(response.json())
Cloud Account APIs
GET
getServiceAccount
GET
getServiceAccountexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/service-accounts/{serviceAccountId}"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/service-accounts/{serviceAccountId}" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/service-accounts/{serviceAccountId}", headers=headers)
print(response.json())
GET
getAzureTenant
GET
getAzureTenantexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId}"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId}" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId}", headers=headers)
print(response.json())
GET
getAwsAccount
GET
getAwsAccountexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts/{accountId}"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts/{accountId}" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts/{accountId}", headers=headers)
print(response.json())
GET
listGcpServiceAccounts
GET
listGcpServiceAccountsexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/service-accounts"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/service-accounts" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/service-accounts", headers=headers)
print(response.json())
GET
listGcpProjects_1
GET
listGcpProjects_1example.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/projects"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/projects" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/projects", headers=headers)
print(response.json())
GET
listAzureTenants
GET
listAzureTenantsexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/azure/tenants"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/azure/tenants" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/azure/tenants", headers=headers)
print(response.json())
GET
listAzureSubscriptions
GET
listAzureSubscriptionsexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId}/subscriptions"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId}/subscriptions" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId}/subscriptions", headers=headers)
print(response.json())
GET
listVendors
GET
listVendorsexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/companies/{companyId}/vendors" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors", headers=headers)
print(response.json())
GET
listGcpProjects
GET
listGcpProjectsexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/service-accounts/{serviceAccountId}/projects"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/service-accounts/{serviceAccountId}/projects" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/gcp/service-accounts/{serviceAccountId}/projects", headers=headers)
print(response.json())
GET
listAwsAccounts
GET
listAwsAccountsexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts", headers=headers)
print(response.json())
GET
getAwsAccountSavingsRecommendation
GET
getAwsAccountSavingsRecommendationexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts/{accountId}/recommendation-savingsplan"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts/{accountId}/recommendation-savingsplan" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts/{accountId}/recommendation-savingsplan", headers=headers)
print(response.json())
GET
getAwsAccountSetup
GET
getAwsAccountSetupexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts/setup"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts/setup" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/companies/{companyId}/vendors/aws/accounts/setup", headers=headers)
print(response.json())
Company APIs
GET
listMasterCompanies
GET
listMasterCompaniesexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/companies/master-companies"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/companies/master-companies" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/companies/master-companies", headers=headers)
print(response.json())
GET
listMasterCompanyUsers
GET
listMasterCompanyUsersexample.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));
Example.java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.opsnow.io/platform/v2/companies/{companyId}/master-users"))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer {YOUR_TOKEN_HERE}")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();
curl-command.sh
curl -X GET "https://api.opsnow.io/platform/v2/companies/{companyId}/master-users" -H "Content-Type: application/json" -H "Authorization: Bearer {YOUR_TOKEN_HERE}"
example.py
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {YOUR_TOKEN_HERE}'
}
response = requests.get("https://api.opsnow.io/platform/v2/companies/{companyId}/master-users", headers=headers)
print(response.json())
Last updated