Logo da Empresa

FORMAT: 1A
HOST: https://rocket.uat.enube.me/api/v1

Rocket

Authentication

Login

This is simple endpoint which lets you get a user token by providing the username and
password of the user using a JSON body.

Request:

POST https://analytics.rocket.enube.me/rocketsvc/api/v4/auth/login
Content-Type: application/json

{
"Username": "user", 
"Password": "p4ssw0rd"
}

Response:

POST https://analytics.rocket.enube.me/rocketsvc/api/v4/auth/login
Content-Type: application/json

{
    "expiresAt": 1750956538,
    "refreshExpiresAt": "2025-07-02T16:48:58.730430246Z",
    "refreshToken": "525ce067-d917-4e25-85d3-e87bd558688a",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJleHAiOjE3NTA5NTY1MzgsIm5iZiI6MTc1MDg3MDEzOCwiaWF0IjoxNzUwODcwMTM4LCJqdGkiOiJmNThlZTA2Yy1jNmI2LTQ5MzUtYWE3YS01YTc4N2JmY2VhZGUiLCJyb2xlcyI6WyJhZG1pbiJdLCJwZXJtaXNzaW9ucyI6bnVsbCwicHJvZmlsZXMiOlt7ImlkIjoiZDc5ZWU3MzEtZmI2Yi00ZWExLWJlZDYtNzBjNDFjZTQzNzY4IiwicHJvdmlkZfdajaldJalkjdfkRnJvb3QiOiIzNDg1MWM0Mi04N2QyLTQyM2QtOGZhYy01MzdiMGU2ZjEzM2IiLCJyZXNvdXJjZV90eXBlIjoiZGlzdHJpYnV0b3JzIiwicmVzb3VyY2VzkjdkfjdkJkdjKJDFKJOIOHItNDIzZC04ZmFjLTUzN2IwZTZmMTMzYiJdfSx7ImlkIjoiMjk5M2UyMjktYjQxMS00YmQxLTlhODMtYzdlMWEyZmYwNzZhIiwicHJvdmlkZXIiOiJhd3MiLCJyb290IjoiMiIsInJlc291cmNlX3R5cGUiOiJkaXN0cmlidXRvcnMiLCJyZXNvdXJjZXMiOlsiMiJdfSx7ImlkIjoiYzY2MzgwNTktNWFmNi00OGU4LWE2M2MtNTQ0Yzc3ZWY5Zjk2IiwicHJvdmlkZXIiOiJnY3AiLCJyb290IjoiMiIsInJlc291cmNlX3R5cGUiOiJkaXN0cmlidXRvcnMiLCJyZXNvdXJjZXMiOlsiMiJdfSx7ImlkIjoiOTlmZjUzZWQtNWI1ZC00NTJlLWIyMzUtYzY1ZWFjMjZlYzcxIiwicHJvdmlkZXIiOiJhenVyZS9saWNlbnNlcyIsInJvb3QiOiJiciIsInJlc291cmNlX3R5cGUiOiIiLCJyZXNvdXJjZXMiOlsiYnIiXX1dfQ.G0GIsfzT0_MPO_BxKHGEpdodzkgGBQb-cK5j_-U7YQ4"
}

OAuth V1 (Deprecated)

This is a compatibility endpoint used to login on a specific user using username
and password. The endpoint needs an Authorization header with the “Basic” authentication
method, providing the accessKey:secretKey value in standard base-64 encoding.

Request:

GET https://rocket.uat.enube.me/api/v1/oauth2/token
Authorization: Basic <base64 encoded username:password>

Response:

GET https://rocket.uat.enube.me/api/v1/oauth2/token
Status: 200
Content-Type: application/json

{
  "access_token": "eyJJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dnZWRfcmVzb3VyY2VfaWQiOlsiMzQ4NTFjNDItODdkMi00MjNkLThmYWMtNTM3YjBlNmYxMzNiIl0sImxvZ2dlZF9yZXNvdXJjZV90eXBlIjoiZGlzdHJpYnV0b3IiLCJsb2dnZWRfY2xvdWQiOiJhenVyZSIsImxvZ2dlZF9vcmciOiIzNDg1MWM0Mi04N2QyLTQyM2QtOGZhYy01MzdiMGU2ZjEzM2IiLCJsb2dnZWRfYXV0aCI6NzcyLCJpc19hZG1pbiI6ZmFsc2UsImV4cCI6MTYyMjU1NTU3Miwic3ViIjoiV0VTVENPTiBCcmFzaWwifQ.uH_AZNZn_Cgo2rHj30xqeYsoyengFcQOo6MUqZSoPwY",
  "expires_in": 1622555572,
  "token_type": "Bearer"
}

Usage

List usage

To get the usage data of the Azure cloud provider, you can use the /api/v4/azure/usages endpoint and
use a JSON body to filter out what usage data you want specifically. You need to be authorized to use
this endpoint.

When filtering out a customers usage, the view filter should be customers, when filtering out customer’s
data (subscriptions), the view should be subscriptions and you can specify the customer by using the customer_id
filter. By default, the user profile ID will be used to fill out the distributor_id, reseller_id
and/or customer_id.

Request

POST https://analytics.rocket.enube.me/rocketsvc/api/v4/azure/usages
Content-Type: application/json
Authorization: Bearer <token>

{
  "filters": [
    {
      "key": "start_time",
      "value": "2025-06-01"
    },
    {
      "key": "end_time",
      "value": "2025-06-30"
    },
    {
      "key": "distributor_id",
      "value": ""
    },
    {
      "key": "reseller_id",
      "value": ""
    },
    {
      "key": "customer_id",
      "value": ""
    },
    {
      "key": "subscription_id",
      "value": ""
    },
    {
      "key": "resource_group",
      "value": ""
    },
    {
      "key": "resource_id",
      "value": ""
    },
    {
      "key": "view",
      "value": "customers"
    },
    {
      "key": "invoice_type",
      "value": "1"
    },
    {
      "key": "cost",
      "value": "resellers"
    },
    {
      "key": "catalog",
      "value": "consumption"
    },
    {
      "key": "catalog",
      "value": "marketplace"
    }
  ]
}

Response

POST https://analytics.rocket.enube.me/rocketsvc/api/v4/azure/usages
Content-Type: application/json

[
    {
        "id": "53184d73-92b5-4555-9ad9-8735e54f54dc",
        "parent_id": "1153005",
        "resource_type": "customers",
        "type": "1",
        "name": "ABC",
        "last": 1620.8050073074419,
        "actual": 1141.067082266125,
        "forecast": 1369.2804987193501,
        "leaf": false,
        "extra": {
            "alias": null,
            "estimate": 1891.65
        }
    },
    {
        "id": "71e2ebbc-639a-45c7-8fef-da57a2be4be7",
        "parent_id": "1153005",
        "resource_type": "customers",
        "type": "1",
        "name": "Rocket customer",
        "last": 4128.486493879048,
        "actual": 2926.5546987278876,
        "forecast": 3511.8656384734654,
        "leaf": false,
        "extra": {
            "alias": null,
            "estimate": 4070.6
        }
    },
    {
        "id": "96e9b693-5cc0-4f19-bc9a-1ccba175da87",
        "parent_id": "1153005",
        "resource_type": "customers",
        "type": "1",
        "name": "ACME",
        "last": 364.9087332181206,
        "actual": 328.7487687995284,
        "forecast": 394.49852255943415,
        "leaf": false,
        "extra": {
            "alias": null,
            "estimate": 415.92
        }
    }
]

List customers

To know all customers or subscriptions available, you can use the filters endpoint to
have a list of them. You can also provide filters to this endpoint to get the customers
of a defined period of time.

Request

POST https://analytics.rocket.enube.me/rocketsvc/api/v4/azure/filters/customers
Content-Type: application/json
Authorization: Bearer <token>

{
  "filters": [
    {
      "key": "start_time",
      "value": "2025-06-01"
    },
    {
      "key": "end_time",
      "value": "2025-06-30"
    },
    {
      "key": "distributor_id",
      "value": ""
    },
    {
      "key": "reseller_id",
      "value": ""
    },
    {
      "key": "customer_id",
      "value": ""
    },
    {
      "key": "subscription_id",
      "value": ""
    },
    {
      "key": "resource_group",
      "value": ""
    },
    {
      "key": "resource_id",
      "value": ""
    },
    {
      "key": "view",
      "value": "customers"
    },
    {
      "key": "invoice_type",
      "value": "1"
    },
    {
      "key": "cost",
      "value": "resellers"
    },
    {
      "key": "catalog",
      "value": "consumption"
    },
    {
      "key": "catalog",
      "value": "marketplace"
    }
  ]
}

Response

POST https://analytics.rocket.enube.me/rocketsvc/api/v4/azure/filters/customers
Content-Type: application/json

[
    {
        "label": "Rocket customers",
        "value": "71e2ebbc-639a-45c7-8fef-da57a2be4be7"
    },
    {
        "label": "ACME 2",
        "value": "221652a5-6cb0-4abb-a8a0-2abb849d134e"
    },
    {
        "label": "False Capytal",
        "value": "96e9b693-5cc0-4f19-bc9a-1ccba175da87"
    }
]

List subscriptions

Similar to listing customers, you can use the filters endpoint to get the subscriptions
of a specified time range and customer.

Request

POST https://analytics.rocket.enube.me/rocketsvc/api/v4/azure/filters/subscriptions
Content-Type: application/json
Authorization: Bearer <token>

{
  "filters": [
    {
      "key": "start_time",
      "value": "2025-06-01"
    },
    {
      "key": "end_time",
      "value": "2025-06-30"
    },
    {
      "key": "distributor_id",
      "value": ""
    },
    {
      "key": "reseller_id",
      "value": ""
    },
    {
      "key": "customer_id",
      "value": "96e9b693-5cc0-4f19-bc9a-1ccba175da87"
    },
    {
      "key": "subscription_id",
      "value": ""
    },
    {
      "key": "resource_group",
      "value": ""
    },
    {
      "key": "resource_id",
      "value": ""
    },
    {
      "key": "view",
      "value": "subscriptions"
    },
    {
      "key": "invoice_type",
      "value": "1"
    },
    {
      "key": "cost",
      "value": "resellers"
    },
    {
      "key": "catalog",
      "value": "consumption"
    },
    {
      "key": "catalog",
      "value": "marketplace"
    }
  ]
}

Response

POST https://analytics.rocket.enube.me/rocketsvc/api/v4/azure/filters/subscriptions
Content-Type: application/json

[
    {
        "label": "Datacap",
        "value": "a9ccb198-18b9-491b-83b4-1a236e89640e"
    },
    {
        "label": "Datacap 2",
        "value": "9d7f4946-6cea-473c-95f6-b62111474c48"
    }
]

Entre em Contato