OpsNow Developer Guide
  • About
  • Endpoint
    • Platform
    • Resources
  • Authentication
  • Errors
  • Rate Limiting
  • API reference
    • Platform
    • Cost
    • Resources
    • AutoSavings
    • Commitment
Powered by GitBook

© 2023 OpsNow, Inc.

On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. API reference

Platform

PreviousAPI referenceNextCost

Last updated 6 days ago

Was this helpful?

Company APIs

Cloud Account - AWS APIs

Cloud Account - Azure APIs

Cloud Account - GCP APIs

listCompanies

get

Retrieves a list of all companies accessible to the logged-in user.

Authorizations
Query parameters
permissionTypestring · enumOptionalDefault: readPossible values:
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "list": [
      {
        "companyId": "123e4567-e89b-12d3-a456-426614174000",
        "companyName": "company1",
        "isMainCompany": "Y"
      }
    ]
  }
}

listCompanyUsers

get

Retrieves a list of all users associated with a company.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/users HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "list": [
      {
        "userId": "123e4567-e89b-12d3-a456-426614174000",
        "email": "user@example.com",
        "displayName": "John Doe",
        "masterCompanyId": "65dd4cbf-b412-4f83-8476-97a3f1e161b2",
        "userStatCd": "ACTIVATED",
        "userRoleId": "ADMIN",
        "userRoleName": "Admin",
        "masterUserRole": "OWNER",
        "enabled": true,
        "createdDate": "2023-01-01T12:00:00.000Z"
      }
    ]
  }
}

listAwsAccounts

get

Retrieves a list of AWS accounts associated with the specified company ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
Query parameters
isAddReadyToStartbooleanOptional

Specifies whether additional Member Accounts can be registered when isAddReadyToStart is set to true.

Example: true
accountTypestringOptional

The accountType parameter represents the type of AWS account, primarily used to distinguish between master and member accounts. In the AWS account structure, the master account is the root account of an AWS Organization, responsible for managing member accounts and consolidating billing. In contrast, member accounts are individual accounts that belong to the master account, each with its own resources and services. This parameter is used in API requests to specify whether to query for master accounts or member accounts. The acceptable values are master and member.

Example: master
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/vendors/aws/accounts HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "list": [
      {
        "accountId": "123456789012",
        "accountAlias": "AWS 1st DEV Infra Account",
        "accountType": "master",
        "isCostAvailable": "true",
        "stackTemplateVersion": "1.0",
        "status": "healthy",
        "contractStatus": "SUBSCRIBED",
        "isSpPurchaseAccount": true,
        "errorDescription": "Error occurred during stack creation. You can identify the cause of the error in AWS Console > CloudFormation > Events tab. Please take necessary actions and retry.",
        "createdDate": "2024-05-20T07:06:47.253Z",
        "updatedDate": "2024-05-20T07:06:47.253Z"
      }
    ]
  }
}

getAwsAccount

get

Fetches detailed information for a specific AWS account using the provided company and account IDs.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
accountIdstringRequired

The unique identifier of the AWS account.

Example: 123456789012
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/vendors/aws/accounts/{accountId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "accountId": "123456789012",
    "accountAlias": "AWS 1st DEV Infra Account",
    "accountType": "master",
    "managementAccountId": "987654321987",
    "status": "healthy",
    "roleArn": "arn:aws:iam::123456789012:role/role-name",
    "stackName": "stack-7bfe7be4-b423-4e92-b6ad-b685ce2fb2e2",
    "stackTemplateVersion": "1.0",
    "curBucketName": "bucket-name",
    "curBucketRegion": "us-east-1",
    "curBucketPrefix": "cur",
    "contractStatus": "us-east-1",
    "createdDate": "2024-05-20T07:06:47.253Z",
    "updatedDate": "2024-05-20T07:06:47.253Z"
  }
}

deleteAwsAccount

delete

Removes an AWS account from the system using the specified company and account IDs.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
accountIdstringRequired

The unique identifier of the AWS account.

Example: 123456789012
Responses
200
OK
*/*
400
Bad Request
404
Not Found
delete
DELETE /platform/v2/companies/{companyId}/vendors/aws/accounts/{accountId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "accountId": "123456789012"
  }
}

getAwsAccountSavingsAmount

get

Retrieves savings amount information for a specified AWS account, using the given company and account IDs.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
accountIdstringRequired

The unique identifier of the AWS account.

Example: 123456789012
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/vendors/aws/accounts/{accountId}/recommendation-savingsplan HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "netSavings": "10000.7"
  }
}

getAwsAccountSetup

get

Obtains the setup information for an AWS account linked to the given company ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
Query parameters
registrationTypestringOptional

Used to determine how to register AWS accounts. If the value is 'single', it registers a single account. If the value is 'bulk', it provides information to register multiple accounts at once.

Default: singleExample: single
excludeAccountsstring[]Optional

When obtaining the information needed to register accounts, specify the accounts you want to exclude when selecting in bulk. Enter AWS account numbers separated by commas, and the information will be returned excluding these accounts.

Example: 123456789012, 234567890123
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/vendors/aws/accounts/setup HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "stackCreateConsoleLink": "https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/review?templateURL=https://s3-data-dev-cloudformation.s3.ap-northeast-2.amazonaws.com/v1.2/opsnow-template-v1.2.yml&stackName=opsnow-stack-d442326f-878e-4500-8f82-d7c868f275bb&param_CostUsageReportBucketName=cur-d442326f-878e-4500-8f82-d7c868f275bb&param_CrossAccountExternalID=ae06161e-8d5b-4c34-80c1-26f2cf00fff5&param_CrossLinkedAccountID=370166107047&param_Domain=opsnow360.io&param_Profile=us2&param_UserId=0f27a2-ae56-4a2f-8544-68ecb8674639&param_ResourceId=d442326f-878e-4500-8f82-d7c868f275bb",
    "stackCreateCliCommand": "aws cloudformation create-stack --stack-name opsnow-stack-d442326f-878e-4500-8f82-d7c868f275bb --region us-east-1 --template-url https://s3-data-dev-cloudformation.s3.ap-northeast-2.amazonaws.com/v1.2/opsnow-template-v1.2.yml --parameters ParameterKey=CrossAccountExternalID,ParameterValue=ae06161e-8d5b-4c34-80c1-26f2cf00fff5 ParameterKey=CrossLinkedAccountID,ParameterValue=370166107047 ParameterKey=CostUsageReportBucketName,ParameterValue=cur-d442326f-878e-4500-8f82-d7c868f275bb ParameterKey=Domain,ParameterValue=opsnow360.io ParameterKey=Profile,ParameterValue=us2 ParameterKey=UserId,ParameterValue=0a0f27a2-ae56-4a2f-8544-68ecb8674639 ParameterKey=ResourceId,ParameterValue=d442326f-878e-4500-8f82-d7c868f275bb --capabilities CAPABILITY_NAMED_IAM",
    "stackDeleteCliCommand": "aws cloudformation delete-stack-set --stack-name opsnow-stack-d442326f-878e-4500-8f82-d7c868f275bb --region us-east-1 \\\\ && \\\\aws cloudformation delete-stack --stack-name opsnow-stack-d442326f-878e-4500-8f82-d7c868f275bb --region us-east-1 ",
    "stackName": "stack-7bfe7be4-b423-4e92-b6ad-b685ce2fb2e2",
    "templateUrl": "3f50b07a-df54-4a7e-8db7-75a5406e970d",
    "crossAccountExternalId": "ae06161e-8d5b-4c34-80c1-26f2cf00fff5",
    "crossLinkedAccountId": "123123123123",
    "costUsageReportBucketName": "cur-d442326f-878e-4500-8f82-d7c868f275bb",
    "domain": "sample.io",
    "profile": "us2",
    "userId": "a6e1e5f8-924d-4a8f-9f78-61c0879c9243",
    "resourceId": "3f50b07a-df54-4a7e-8db7-75a5406e970d",
    "organizationId": "f23a80d2-2077-4e0a-aa85-e7b08a379be7"
  }
}

listAwsAccounts

get

Retrieves a list of AWS accounts associated with the specified company ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/vendors/aws/management-accounts HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "list": [
      {
        "accountId": "123456789012",
        "accountAlias": "AWS 1st DEV Infra Account",
        "accountType": "master",
        "isCostAvailable": "true",
        "stackTemplateVersion": "1.0",
        "status": "healthy",
        "contractStatus": "SUBSCRIBED",
        "isSpPurchaseAccount": true,
        "errorDescription": "Error occurred during stack creation. You can identify the cause of the error in AWS Console > CloudFormation > Events tab. Please take necessary actions and retry.",
        "createdDate": "2024-05-20T07:06:47.253Z",
        "updatedDate": "2024-05-20T07:06:47.253Z"
      }
    ]
  }
}

listAzureTenants

get

Retrieves a list of Azure tenants associated with the specified company ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/vendors/azure/tenants HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "list": [
      {
        "tenantId": "6a05a771-d671-440a-9d64-087df0c16d6a",
        "applicationId": "993a65dd-691f-44f7-ba1d-21e7b4c60d38",
        "tenantAlias": "First Tenant",
        "tenantType": "PAY-AS-YOU-GO",
        "status": "healthy",
        "subscriptionCount": 5,
        "createdDate": "2023-07-10T14:48:00.000Z",
        "updatedDate": "2023-07-10T14:48:00.000Z"
      }
    ]
  }
}

getAzureTenant

get

Obtains the details of a specific Azure tenant linked to the given company ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
tenantIdstringRequired

A unique identifier used to identify an Azure Active Directory (AAD) tenant. It is used to distinguish the tenant to which all the organization's Azure resources and services belong.

Example: 6a05a771-d671-440a-9d64-087df0c16d6a
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "tenantId": "6a05a771-d671-440a-9d64-087df0c16d6a",
    "tenantAlias": "First Tenant",
    "tenantType": "PAY-AS-YOU-GO",
    "applicationId": "993a65dd-691f-44f7-ba1d-21e7b4c60d38",
    "enrollmentNumber": "123456",
    "status": "healthy",
    "createdDate": "2023-07-10T14:48:00.000Z",
    "updatedDate": "2023-07-10T14:48:00.000Z"
  }
}

deleteAzureTenant

delete

Deletes a specific Azure tenant linked to the specified company ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
tenantIdstringRequired

A unique identifier used to identify an Azure Active Directory (AAD) tenant. It is used to distinguish the tenant to which all the organization's Azure resources and services belong.

Example: 6a05a771-d671-440a-9d64-087df0c16d6a
Responses
200
OK
*/*
400
Bad Request
404
Not Found
delete
DELETE /platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "tenantId": "6a05a771-d671-440a-9d64-087df0c16d6a"
  }
}

listAzureSubscriptions

get

Retrieves a list of Azure subscriptions associated with the specified tenant ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
tenantIdstringRequired

A unique identifier used to identify an Azure Active Directory (AAD) tenant. It is used to distinguish the tenant to which all the organization's Azure resources and services belong.

Example: 6a05a771-d671-440a-9d64-087df0c16d6a
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId}/subscriptions HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "list": [
      {
        "companyId": "123e4567-e89b-12d3-a456-426614174000",
        "subscriptionId": "c925a595-81d2-470c-a8cd-f7bd56fa8e95",
        "subscriptionAlias": "First Subscription",
        "tenantId": "6a05a771-d671-440a-9d64-087df0c16d6a",
        "status": "healthy"
      }
    ]
  }
}

getAzureSubscription

get

Obtains the details of a specific Azure subscription linked to the given tenant ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
tenantIdstringRequired

A unique identifier used to identify an Azure Active Directory (AAD) tenant. It is used to distinguish the tenant to which all the organization's Azure resources and services belong.

Example: 6a05a771-d671-440a-9d64-087df0c16d6a
subscriptionIdstringRequired

A unique identifier for an Azure subscription, used to manage and bill for a set of Azure resources and services.

Example: c925a595-81d2-470c-a8cd-f7bd56fa8e95
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId}/subscriptions/{subscriptionId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "tenantId": "6a05a771-d671-440a-9d64-087df0c16d6a",
    "subscriptionId": "c925a595-81d2-470c-a8cd-f7bd56fa8e95",
    "subscriptionAlias": "First Subscription",
    "status": "healthy",
    "createdDate": "2023-07-10T14:48:00.000Z",
    "updatedDate": "2023-07-10T14:48:00.000Z"
  }
}

deleteAzureSubscription

delete

Deletes a specific Azure subscription linked to the specified tenant ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
tenantIdstringRequired

A unique identifier used to identify an Azure Active Directory (AAD) tenant. It is used to distinguish the tenant to which all the organization's Azure resources and services belong.

Example: 6a05a771-d671-440a-9d64-087df0c16d6a
subscriptionIdstringRequired

A unique identifier for an Azure subscription, used to manage and bill for a set of Azure resources and services.

Example: c925a595-81d2-470c-a8cd-f7bd56fa8e95
Responses
200
OK
*/*
400
Bad Request
404
Not Found
delete
DELETE /platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId}/subscriptions/{subscriptionId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "subscriptionId": "c925a595-81d2-470c-a8cd-f7bd56fa8e95",
    "tenantId": "6a05a771-d671-440a-9d64-087df0c16d6a"
  }
}

listGcpProjects

get

Retrieves a list of GCP projects with the given company ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/vendors/gcp/projects HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "list": [
      {
        "projectId": "cloud-platform-1234",
        "projectAlias": "My Cloud Project",
        "projectType": "BILLING",
        "companyName": "company1",
        "serviceAccountId": "106821279384347983826",
        "datasetId": "my_dataset",
        "bigqueryTableName": "users_table",
        "status": "active"
      }
    ]
  }
}

getGcpProject

get

Retrieves detailed information about a specific GCP project linked to the given company ID and project ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
projectIdstringRequired

A unique identifier for a Google Cloud Platform project, used to organize and manage GCP resources, services, and billing.

Example: cloud-platform-1234
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/vendors/gcp/projects/{projectId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "projectId": "cloud-platform-1234",
    "projectAlias": "My Cloud Project",
    "companyName": "company1",
    "serviceAccountId": "106821279384347983826",
    "projectType": "BILLING",
    "datasetId": "my_dataset",
    "bigQueryTableName": "users_table",
    "status": "active",
    "createdDate": "2023-07-10T14:48:00.000Z",
    "updatedDate": "2023-07-10T14:48:00.000Z"
  }
}

deleteGcpProject

delete

Deletes a specific Gcp Project linked to the specified project ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
projectIdstringRequired

A unique identifier for a Google Cloud Platform project, used to organize and manage GCP resources, services, and billing.

Example: cloud-platform-1234
Responses
200
OK
*/*
400
Bad Request
404
Not Found
delete
DELETE /platform/v2/companies/{companyId}/vendors/gcp/projects/{projectId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "projectId": "cloud-platform-1234"
  }
}

listGcpServiceAccounts

get

Retrieves a list of GCP service accounts with the given company ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/vendors/gcp/service-accounts HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "list": [
      {
        "serviceAccountId": "106821279384347983826",
        "serviceAccountAlias": "my-service-account",
        "serviceAccountEmail": "my-service-account@my-project.iam.gserviceaccount.com",
        "status": "healthy",
        "createdDate": "2023-07-10T14:48:00.000Z",
        "updatedDate": "2023-07-10T14:48:00.000Z"
      }
    ]
  }
}

getGcpServiceAccount

get

Retrieves detailed information about a specific GCP service account and its associated project

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
serviceAccountIdstringRequired

A unique identifier used to identify a Google Cloud service account. It is used to distinguish the service account that interacts with Google Cloud resources and services.

Example: 106821279384347980000
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/vendors/gcp/service-accounts/{serviceAccountId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "serviceAccountId": "106821279384347983826",
    "serviceAccountAlias": "my-service-account",
    "serviceAccountProjectId": "cloud-platform-1234",
    "serviceAccountEmail": "my-service-account@my-project.iam.gserviceaccount.com",
    "createdDate": "2023-07-10T14:48:00.000Z",
    "updatedDate": "2023-07-10T14:48:00.000Z",
    "projects": [
      {
        "projectId": "cloud-platform-1234",
        "projectAlias": "My Cloud Project",
        "companyName": "company1",
        "serviceAccountId": "106821279384347983826",
        "projectType": "BILLING",
        "datasetId": "my_dataset",
        "bigQueryTableName": "users_table",
        "status": "active",
        "createdDate": "2023-07-10T14:48:00.000Z",
        "updatedDate": "2023-07-10T14:48:00.000Z"
      }
    ]
  }
}

deleteGcpServiceAccount

delete

Deletes a specific Gcp Account linked to the specified company ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
serviceAccountIdstringRequired

A unique identifier used to identify a Google Cloud service account. It is used to distinguish the service account that interacts with Google Cloud resources and services.

Example: 106821279384347980000
Responses
200
OK
*/*
400
Bad Request
404
Not Found
delete
DELETE /platform/v2/companies/{companyId}/vendors/gcp/service-accounts/{serviceAccountId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "serviceAccountId": "106821279384347983826"
  }
}

listGcpServiceAccountProjects

get

Retrieves a list of GCP projects with the given Service Account ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
serviceAccountIdstringRequired

A unique identifier used to identify a Google Cloud service account. It is used to distinguish the service account that interacts with Google Cloud resources and services.

Example: 106821279384347980000
Responses
200
OK
*/*
400
Bad Request
404
Not Found
get
GET /platform/v2/companies/{companyId}/vendors/gcp/service-accounts/{serviceAccountId}/projects HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "status": "success",
  "data": {
    "list": [
      {
        "projectId": "cloud-platform-1234",
        "projectAlias": "My Cloud Project",
        "projectType": "BILLING",
        "companyName": "company1",
        "serviceAccountId": "106821279384347983826",
        "datasetId": "my_dataset",
        "bigqueryTableName": "users_table",
        "status": "active"
      }
    ]
  }
}
  • Company APIs
  • GETlistCompanies
  • GETlistCompanyUsers
  • Cloud Account - AWS APIs
  • GETlistAwsAccounts
  • GETgetAwsAccount
  • PUTupdateAwsAccount
  • DELETEdeleteAwsAccount
  • GETgetAwsAccountSavingsAmount
  • GETgetAwsAccountSetup
  • GETlistAwsAccounts
  • Cloud Account - Azure APIs
  • GETlistAzureTenants
  • POSTcreateAzureTenant
  • GETgetAzureTenant
  • PUTupdateAzureTenant
  • DELETEdeleteAzureTenant
  • GETlistAzureSubscriptions
  • POSTcreateAzureSubscription
  • GETgetAzureSubscription
  • PUTupdateAzureSubscription
  • DELETEdeleteAzureSubscription
  • POSTlistAzureRegistrableSubscriptions
  • Cloud Account - GCP APIs
  • GETlistGcpProjects
  • POSTcreateGcpProject
  • GETgetGcpProject
  • PUTupdateGcpProject
  • DELETEdeleteGcpProject
  • GETlistGcpServiceAccounts
  • POSTcreateGcpServiceAccount
  • GETgetGcpServiceAccount
  • PUTupdateGcpServiceAccount
  • DELETEdeleteGcpServiceAccount
  • GETlistGcpServiceAccountProjects

updateAwsAccount

put

Updates the information of an existing AWS account identified by company and account IDs.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
accountIdstringRequired

The unique identifier of the AWS account.

Example: 123456789012
Body
accountAliasstringOptional

The alias of the AWS account, used for easy identification.

Example: AWS 1st DEV Infra Account
isCancelDeleteAccountbooleanOptional

Specifies whether to cancel the deletion of the AWS Account.

Example: true
Responses
200
OK
*/*
400
Bad Request
404
Not Found
put
PUT /platform/v2/companies/{companyId}/vendors/aws/accounts/{accountId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 73

{
  "accountAlias": "AWS 1st DEV Infra Account",
  "isCancelDeleteAccount": true
}
{
  "status": "success",
  "data": {
    "accountId": "123456789012"
  }
}

createAzureTenant

post

Creates a new Azure tenant for the specified company ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
Body
tenantIdstringRequired

A unique identifier used to identify an Azure Active Directory (AAD) tenant. It is used to distinguish the tenant to which all the organization's Azure resources and services belong.

Example: 6a05a771-d671-440a-9d64-087df0c16d6a
tenantAliasstringRequired

The alias name of the Azure tenant.

Example: First Tenant
applicationIdstringRequired

The applicationId is a unique identifier assigned to an application when it is registered in Azure Active Directory (AAD). This identifier is used to identify the application and authenticate it when communicating with other services or applications. It is often referred to as ClientId. For example, when the application sends an authentication request to AAD, it includes this applicationId to prove its identity.

Example: 993a65dd-691f-44f7-ba1d-21e7b4c60d38
clientSecretstringRequired

The clientSecret is a secret key generated when an application is registered in Azure Active Directory (AAD). This secret key is used along with the applicationId when the application makes an authentication request. If both pieces of information match, AAD verifies the legitimacy of the application. It is crucial to store and manage the clientSecret securely as it is sensitive information that can pose security risks if exposed.

Example: your-client-secret
tenantTypestringRequired

Represents the type of the tenant, primarily categorized based on the subscription model. Examples include EA (Enterprise Agreement), Pay-As-You-Go, CSP and Azure Plan. This provides information related to the billing plan used by the tenant.

Example: PAY-AS-YOU-GOPattern: PAY-AS-YOU-GO|EA|AZURE-PLAN|CSP
enrollmentNumberstringOptional

The 'Enrollment Number' refers to a unique identifier assigned to an organization when they purchase Microsoft Azure services. This number is used to manage multiple subscriptions, track usage and costs for billing purposes, and oversee services and resources linked to a specific subscription. It allows organizations to efficiently manage and monitor their Azure services.

Example: 123456
primaryKeystringOptional

In the context of an Azure Enterprise Agreement (EA) account, the PRIMARY_KEY is a unique key provided to the organization. This key is used to authenticate and access Azure services and resources associated with the EA account. It acts as a secure credential, allowing the organization to manage and monitor its Azure usage and billing.

Example: jwt-token-format
Responses
200
OK
*/*
400
Bad Request
404
Not Found
post
POST /platform/v2/companies/{companyId}/vendors/azure/tenants HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 260

{
  "tenantId": "6a05a771-d671-440a-9d64-087df0c16d6a",
  "tenantAlias": "First Tenant",
  "applicationId": "993a65dd-691f-44f7-ba1d-21e7b4c60d38",
  "clientSecret": "your-client-secret",
  "tenantType": "PAY-AS-YOU-GO",
  "enrollmentNumber": "123456",
  "primaryKey": "jwt-token-format"
}
{
  "status": "success",
  "data": {
    "tenantId": "6a05a771-d671-440a-9d64-087df0c16d6a"
  }
}

updateAzureTenant

put

Updates the information of a specific Azure tenant associated with the given company ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
tenantIdstringRequired

A unique identifier used to identify an Azure Active Directory (AAD) tenant. It is used to distinguish the tenant to which all the organization's Azure resources and services belong.

Example: 6a05a771-d671-440a-9d64-087df0c16d6a
Body
tenantAliasstringRequired

The alias name of the Azure tenant.

Example: First Tenant
Responses
200
OK
*/*
400
Bad Request
404
Not Found
put
PUT /platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 30

{
  "tenantAlias": "First Tenant"
}
{
  "status": "success",
  "data": {
    "tenantId": "6a05a771-d671-440a-9d64-087df0c16d6a",
    "subscriptionId": "c925a595-81d2-470c-a8cd-f7bd56fa8e95"
  }
}

createAzureSubscription

post

Creates a new Azure subscription for the specified tenant ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
tenantIdstringRequired

A unique identifier used to identify an Azure Active Directory (AAD) tenant. It is used to distinguish the tenant to which all the organization's Azure resources and services belong.

Example: 6a05a771-d671-440a-9d64-087df0c16d6a
Body
subscriptionIdstringRequired

A unique identifier for an Azure subscription, used to manage and bill for a set of Azure resources and services.

Example: c925a595-81d2-470c-a8cd-f7bd56fa8e95
subscriptionAliasstringRequired

The alias name of the Azure subscription.

Example: First Subscription
Responses
200
OK
*/*
400
Bad Request
404
Not Found
post
POST /platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId}/subscriptions HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 98

{
  "subscriptionId": "c925a595-81d2-470c-a8cd-f7bd56fa8e95",
  "subscriptionAlias": "First Subscription"
}
{
  "status": "success",
  "data": {
    "subscriptionId": "c925a595-81d2-470c-a8cd-f7bd56fa8e95",
    "tenantId": "6a05a771-d671-440a-9d64-087df0c16d6a"
  }
}

updateAzureSubscription

put

Updates the information of a specific Azure subscription associated with the given tenant ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
tenantIdstringRequired

A unique identifier used to identify an Azure Active Directory (AAD) tenant. It is used to distinguish the tenant to which all the organization's Azure resources and services belong.

Example: 6a05a771-d671-440a-9d64-087df0c16d6a
subscriptionIdstringRequired

A unique identifier for an Azure subscription, used to manage and bill for a set of Azure resources and services.

Example: c925a595-81d2-470c-a8cd-f7bd56fa8e95
Body
subscriptionAliasstringRequired

The alias name of the Azure subscription.

Example: First Subscription
Responses
200
OK
*/*
400
Bad Request
404
Not Found
put
PUT /platform/v2/companies/{companyId}/vendors/azure/tenants/{tenantId}/subscriptions/{subscriptionId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "subscriptionAlias": "First Subscription"
}
{
  "status": "success",
  "data": {
    "subscriptionId": "c925a595-81d2-470c-a8cd-f7bd56fa8e95",
    "tenantId": "6a05a771-d671-440a-9d64-087df0c16d6a"
  }
}

listAzureRegistrableSubscriptions

post

List registrable Azure subscriptions for the specified tenant ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
Body
tenantIdstringRequired

A unique identifier used to identify an Azure Active Directory (AAD) tenant. It is used to distinguish the tenant to which all the organization's Azure resources and services belong.

Example: 6a05a771-d671-440a-9d64-087df0c16d6a
applicationIdstringRequired

The applicationId is a unique identifier assigned to an application when it is registered in Azure Active Directory (AAD). This identifier is used to identify the application and authenticate it when communicating with other services or applications. It is often referred to as ClientId. For example, when the application sends an authentication request to AAD, it includes this applicationId to prove its identity.

Example: 993a65dd-691f-44f7-ba1d-21e7b4c60d38
clientSecretstringRequired

The clientSecret is a secret key generated when an application is registered in Azure Active Directory (AAD). This secret key is used along with the applicationId when the application makes an authentication request. If both pieces of information match, AAD verifies the legitimacy of the application. It is crucial to store and manage the clientSecret securely as it is sensitive information that can pose security risks if exposed.

Example: your-client-secret
tenantTypestringRequired

Represents the type of the tenant, primarily categorized based on the subscription model. Examples include EA (Enterprise Agreement), Pay-As-You-Go, CSP and Azure Plan. This provides information related to the billing plan used by the tenant.

Example: PAY-AS-YOU-GOPattern: PAY-AS-YOU-GO|EA|AZURE-PLAN|CSP
Responses
200
OK
*/*
400
Bad Request
404
Not Found
post
POST /platform/v2/companies/{companyId}/vendors/azure/tenants/registrable-subscriptions HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 171

{
  "tenantId": "6a05a771-d671-440a-9d64-087df0c16d6a",
  "applicationId": "993a65dd-691f-44f7-ba1d-21e7b4c60d38",
  "clientSecret": "your-client-secret",
  "tenantType": "PAY-AS-YOU-GO"
}
{
  "status": "success",
  "data": {
    "list": [
      {
        "companyId": "123e4567-e89b-12d3-a456-426614174000",
        "subscriptionId": "c925a595-81d2-470c-a8cd-f7bd56fa8e95",
        "subscriptionAlias": "First Subscription",
        "tenantId": "6a05a771-d671-440a-9d64-087df0c16d6a",
        "status": "healthy"
      }
    ]
  }
}

createGcpProject

post

Creates a new gcp project for the specified company ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
Body
serviceAccountIdstringRequired

A unique identifier used to identify a Google Cloud service account. It is used to distinguish the service account that interacts with Google Cloud resources and services.

Example: 106821279384347983826
projectIdstringRequired

A unique identifier for a Google Cloud Platform project, used to organize and manage GCP resources, services, and billing.

Example: cloud-platform-1234
projectAliasstringRequired

A user-friendly name or alias for a GCP project, used for easier identification and management.

Example: My Cloud Project
datasetIdstringOptional

A unique identifier for a BigQuery dataset, which is a collection of tables and views in Google Cloud Platform.

Example: my_dataset
Responses
200
OK
*/*
400
Bad Request
404
Not Found
post
POST /platform/v2/companies/{companyId}/vendors/gcp/projects HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 137

{
  "serviceAccountId": "106821279384347983826",
  "projectId": "cloud-platform-1234",
  "projectAlias": "My Cloud Project",
  "datasetId": "my_dataset"
}
{
  "status": "success",
  "data": {
    "projectId": "cloud-platform-1234"
  }
}

updateGcpProject

put

Updates the information of a specific GCP project with the given project ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
projectIdstringRequired

A unique identifier for a Google Cloud Platform project, used to organize and manage GCP resources, services, and billing.

Example: cloud-platform-1234
Body
projectAliasstringOptional

A user-friendly name or alias for a GCP project, used for easier identification and management.

Example: My Cloud Project
datasetIdstringOptional

A unique identifier for a BigQuery dataset, which is a collection of tables and views in Google Cloud Platform.

Example: my_dataset
Responses
200
OK
*/*
400
Bad Request
404
Not Found
put
PUT /platform/v2/companies/{companyId}/vendors/gcp/projects/{projectId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 60

{
  "projectAlias": "My Cloud Project",
  "datasetId": "my_dataset"
}
{
  "status": "success",
  "data": {
    "projectId": "cloud-platform-1234"
  }
}

createGcpServiceAccount

post

Creates a new gcp service account for the specified company ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
Body
serviceAccountAliasstringRequired

The alias name of the GCP service account.

Example: my-service-account
serviceAccountKeystringRequired

A Base64-encoded string of the JSON key file containing the credentials for a GCP service account.

Example: <Base64-encoded JSON key file string>
Responses
200
OK
*/*
400
Bad Request
404
Not Found
post
POST /platform/v2/companies/{companyId}/vendors/gcp/service-accounts HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 104

{
  "serviceAccountAlias": "my-service-account",
  "serviceAccountKey": "<Base64-encoded JSON key file string>"
}
{
  "status": "success",
  "data": {
    "serviceAccountId": "106821279384347983826"
  }
}

updateGcpServiceAccount

put

Updates the information of a specific GCP account associated with the given company ID.

Authorizations
Path parameters
companyIdstringRequired

The ID of the organization, obtainable through 'listCompanies'.

Example: f23a80d2-2077-4e0a-aa85-e7b08a379be7
serviceAccountIdstringRequired

A unique identifier used to identify a Google Cloud service account. It is used to distinguish the service account that interacts with Google Cloud resources and services.

Example: 106821279384347980000
Body
serviceAccountAliasstringRequired

The alias name of the GCP service account.

Example: my-service-account
Responses
200
OK
*/*
400
Bad Request
404
Not Found
put
PUT /platform/v2/companies/{companyId}/vendors/gcp/service-accounts/{serviceAccountId} HTTP/1.1
Host: api.opsnow.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 44

{
  "serviceAccountAlias": "my-service-account"
}
{
  "status": "success",
  "data": {
    "serviceAccountId": "106821279384347983826"
  }
}