Introduction

All public REST endpoints of the meshMetering API are described in this documentation. These endpoints allow integration with company processes and existing tools. We also provide a Postman collection and openAPI documentation.

The first step for being able to use the new Postman Collection is to import it in Postman. To proceed, configure the credentials in the "Authorization" tab of this collection. These credentials can be retrieved from the panel by creating a new API User or by using the credentials of an already created API User. Finally, set the hostname variable to ensure that the requests are ready to be executed.

Authentication

Before you start interacting with any of the endpoints we offer, make sure that you acquired valid HTTP Basic Auth credentials. API users, which can be used for basic auth, can be created via meshPanel. These API users are only available for users with Partner Admin rights.

Each endpoint listed in the documentation is secured via HTTP Basic Auth. To authenticate requests, please set the Authorization header as such:

Authorization: Basic <base64 encoded username:password>

All endpoints are encrypted via SSL and can only be called via HTTPS.

Technical Specification

This section describes technical details of the meshStack API, such as the exact data types it provides or HTTP specifics.

HTTP verbs

meshStack tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.

Verb Usage

GET

Used to retrieve a resource

POST

Used to create a new resource

PATCH

Used to update an existing resource, including partial updates

PUT

Used to update an existing resource, full updates only

DELETE

Used to delete an existing resource

HTTP status codes

meshStack tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.

Status code Usage

200 OK

Standard response for successful HTTP requests.
The actual response will depend on the request method used.
In a GET request, the response will contain an entity corresponding to the requested resource.
In a POST request, the response will contain an entity describing or containing the result of the action.

201 Created

The request has been fulfilled and resulted in a new resource being created.

204 No Content

The server successfully processed the request, but is not returning any content.

400 Bad Request

The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

401 Unauthorized

The server cannot authorize the request. Check the Basic Auth credentials used for the request.

403 Forbidden

The request is not allowed for the authorized user.

404 Not Found

The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible.

409 Conflict

The request leads to a conflict. A resource or a unique identifier used in the request already exists.

Data Types

  • Dates are always handled as UTC dates and formatted to ISO 8601 standard (e.g. 2020-12-22T09:37:43Z).

  • String fields are usually limited to 255 characters

Hypermedia

meshStack uses hypermedia. Resources include links to other resources in their responses. Responses are in Hypertext Application Language (HAL) format. Links can be found beneath the _links key. Users of the API should not create URIs themselves, instead they should use the above-described links to navigate from resource to resource.

Notice that HAL hrefs can be templated: For example, if an endpoint requires a path variable, the _links array may include an entry like the following:

{
  "_links" : {
    "users" : {
      "href" : "https://example-url.org/api/users/{username}",
      "templated" : true
    }
  }
}

Please refer to the HAL specification for more details about template URIs.

Versioning

meshStack applies versioning via custom Media Types. This allows custom versioning per resource. As meshStack is developed and deployed continuously, this custom versioning per resource is the best way for applying versioning. If e.g. the meshWorkspace response is modified in an incompatible way, a new version will be provided for meshWorkspaces and all other resources are untouched.

If using a request body, such as when inserting a new meshProject via a POST endpoint, the custom media type must be provided in the Content-Type header. In case of a response body, such as when requesting a list of all meshWorkspaces via a GET endpoint, the client should send the custom media type in the Accept header.

Examples for these headers are:

Accept: application/vnd.meshcloud.api.meshworkspace.v1.hal+json
Content-Type: application/vnd.meshcloud.api.meshobjectcollection.v1+json;charset=UTF-8

Which Media Type is required for which resource is described in the according Resource section. If a request body is required and a different Content-Type like simple application/json is requested, the endpoint will return an error.

If the Accept header is not provided, you may get the response of any version. Therefore please always provide the Accept header so you are guaranteed to get the resource in the expected format.

Common Data Formats

This section describes common data formats that are used across different endpoints.

Paging

Paged list endpoints support two request parameters for pagination, page and size.

Parameter Description

page

The number of the page you want to retrieve (default=0).

size

The amount of elements in a single page (default=20). Note: You can size up to 200. Greater values will be automatically lowered to this value.

Responses are structured like the following snippet:

{
    "_embedded": { }
    "_links": {
        "self" : {
          "href" : "https://mesh-billing-url/api/meshobjects/meshchargebacks"
        },
        "first" : {
          "href" : "https://mesh-billing-url/api/meshobjects/meshchargebacks?page=0&size=20"
        },
        "prev" : {
          "href" : "https://mesh-billing-url/api/meshobjects/meshchargebacks?page=0&size=20"
        },
        "next" : {
          "href" : "https://mesh-billing-url/api/meshobjects/meshchargebacks?page=2&size=20"
        },
        "last" : {
          "href" : "https://mesh-billing-url/api/meshobjects/meshchargebacks?page=3&size=20"
        }
    }
    "page": {
        "size": 20,
        "totalElements": 64,
        "totalPages": 4,
        "number": 0
    }
}

The above example is taken from the meshWorkspace list endpoint. All relevant paging information is provided in the 'page' element. In addition to that the links to the first page, the next page (if exists), the previous page (if exists) and the last page are provided as well. Pagination links are only provided, if there is more than one page available for the given pagination parameters.

Scalability

This API is designed to handle a large volume of requests while maintaining optimal performance. However, it’s important to note that scaling requests may become a problem if the API is not used in a conform way. In this document, we will discuss how to use the API in a way that will allow for seamless scaling of requests.

Scaling requests is not a problem as long as the API is used in a conform way. Conformity means adhering to the following best practices:

  • Use pagination to limit the number of results returned in each response. This will reduce the amount of data that needs to be transferred and processed.

  • Use caching to store frequently requested data. This will reduce the load on the API and improve response times.

  • When possible, use filters to limit the number of requests to your dedicated use case

By following the best practices outlined in this document, you can ensure that the API can handle your requests without any issues. If you have any questions or concerns about scaling requests, please contact the support team for assistance.

Resources

Index

This is the entry point to navigate through the API of meshStack Metering. Starting from here you will be able to find all endpoints your authenticated user has access to.

Request Headers
Name Description

Accept

meshApi is versioned and you should use application/vnd.meshcloud.api.v1.hal+json as an Accept header to be guaranteed the V1 response format of this endpoint. New versions will be added in future.

Example Request
GET /api HTTP/1.1
Authorization: Basic dmFsaWRfdXNlcm5hbWU6dmFsaWRfcGFzc3dvcmQ=
Accept: application/vnd.meshcloud.api.v1.hal+json
Host: mesh-billing-url
Example Curl Request
$ curl 'https://mesh-billing-url/api' -i -u 'valid_username:valid_password' -X GET \
    -H 'Accept: application/vnd.meshcloud.api.v1.hal+json'
Response Fields
Path Type Description

_links

Object

All available Top-Level Links for the authenticated user.

Relation Description

meshobjects

The MeshObjects API to get meshObjects.

Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/vnd.meshcloud.api.v1.hal+json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 176

{
  "_links" : {
    "meshobjects" : {
      "href" : "https://mesh-billing-url/api/meshobjects"
    },
    "self" : {
      "href" : "https://mesh-billing-url/api"
    }
  }
}

meshObjects

Via this API you can get meshObjects from meshMetering.

Request Headers
Name Description

Accept

meshApi is versioned and you should use application/vnd.meshcloud.api.meshobjects.v1.hal+json as an Accept header to be guaranteed the V1 response format of this endpoint. New versions will be added in future.

Example Request
GET /api/meshobjects HTTP/1.1
Authorization: Basic dmFsaWRfdXNlcm5hbWU6dmFsaWRfcGFzc3dvcmQ=
Accept: application/vnd.meshcloud.api.meshobjects.v1.hal+json
Host: mesh-billing-url
Example Curl Request
$ curl 'https://mesh-billing-url/api/meshobjects' -i -u 'valid_username:valid_password' -X GET \
    -H 'Accept: application/vnd.meshcloud.api.meshobjects.v1.hal+json'
Response Fields
Path Type Description

_links

Object

All available meshObject Links for the authenticated user.

Relation Description

meshtenantusagereports

Get meshTenantUsageReports.

meshchargebacks

Get meshChargebacks.

Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/vnd.meshcloud.api.meshobjects.v1.hal+json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 673

{
  "_links" : {
    "meshchargebacks" : {
      "href" : "https://mesh-billing-url/api/meshobjects/meshchargebacks{?workspaceIdentifier,projectIdentifier,period,finalized,legacy,finalizedSince,cancelledSince}",
      "templated" : true
    },
    "meshtenantusagereports" : {
      "href" : "https://mesh-billing-url/api/meshobjects/meshtenantusagereports{?ownedByWorkspace,ownedByProject,isManaged,platform,platformType,platformTenantId,period,reportCategory,paymentMethodIdentifier,meshTenantId,finalizedAfter,cancelledAfter,status,showCancelled,sort}",
      "templated" : true
    },
    "self" : {
      "href" : "https://mesh-billing-url/api/meshobjects"
    }
  }
}

meshTenantUsageReports

A meshTenantUsageReport contains all cost and payment information as well as tags for one tenant in one period (month). Via the API, you receive more detailed information than via the UI. Besides tags and payment information, you also get the seller information separated via line items in the meshTenantUsageReport.

List meshTenantUsageReports

Provides a paged list of meshTenantUsageReports.

Note: If no request parameters for filtering are specified, all meshTenantUsageReports, except for cancelled ones, are returned. A meshTenantUsageReport gets cancelled, if any changes occur after finalization of it. A new meshTenantUsageReport with an incremented version gets created in case of such an update. So the old one is available as cancelled, and the new as finalized. By default, meshTenantUsageReports are sorted descending by period.

Request Headers
Name Description

Accept

meshApi is versioned and you should use application/vnd.meshcloud.api.meshtenantusagereport.v3.hal+json as an Accept header to be guaranteed the V3 response format of this endpoint. New versions might be added in future.

Request Parameters
Parameter Description

ownedByWorkspace

Filter for meshTenantUsageReports that belong to the meshWorkspace with given identifier. (optional)

ownedByProject

Filter for meshTenantUsageReports that belong to the meshProject with given identifier. Make sure to also filter for ownedByWorkspace, as a project identifier is only unique inside a workspace! (optional)

isManaged

Filter for meshTenantUsageReports that are either managed or not managed by meshStack! meshStack collects all cost information from the cloud platform for all tenants. If a tenant is not managed by meshStack, it is an unmanaged tenant. If you provide true for this filter parameter, you only get meshTenantUsageReports for tenants that are managed by meshStack. If you provide false, you only get meshTenantUsageReports of unmanaged tenants. (optional)

platform

Filter for meshTenantUsageReports that belong to the provided platform in the format <platformIdentifier>.<locationIdentifier> (optional)

platformType

Filter for meshTenantUsageReports that belong to the provided platform type. Must be one of: Azure, Aws, Gcp, AzureResourceGroup, AzureKubernetesService, Kubernetes, OpenShift, OpenStack, CloudFoundry, MeshMarketplace, GitHub, Custom (optional)

platformTenantId

Filter for meshTenantUsageReports that belong to a certain tenant that can be identified via platform tenant ID (optional)

period

Filter for meshTenantUsageReports that belong to the provided period in format YYYY-MM, e.g. 2025-01 (optional)

reportCategory

Filter for meshTenantUsageReports that belong to the provided reportCategory, BILLING or ENVIRONMENTAL. (optional)

paymentMethodIdentifier

Filter for meshTenantUsageReports that have the meshPaymentMethod with given identifier assigned. Use an empty or blank value to filter for meshTenantUsageReports without an assigned meshPaymentMethod. (optional)

finalizedAfter

Filter for meshTenantUsageReports that were finalized after the provided date (e.g. 2025-06-01T00:00:00Z). You can use this filter to retrieve all meshTenantUsageReports finalized after your last request for processing them in your billing system. You can e.g. provide the latest finalizationDate you received in your last request. You may then receive the newly finalized usage reports of the new period and probably updated usage reports of previous periods. This filter parameter is exclusive, meaning it will only match reports that were finalized after the given date. (optional)

cancelledAfter

Filter for meshTenantUsageReports that were cancelled after the provided date (e.g. 2025-06-01T00:00:00Z). When you apply this filter is provided, you will only get cancelled usage reports, meaning outdated data that was already updated. This filter parameter is exclusive, meaning it will only match reports that were cancelled after the given date. (optional)

showCancelled

By default, cancelled meshTenantUsageReports are not included in the response. If you want to include them, you can set this parameter to true. This is not required when you already filter for cancelledAfter. (optional)

status

Filter for meshTenantUsageReports that are in the given state OPEN, FINALIZED or UPDATED. You can e.g. use this filter to exclude meshTenantUsageReports that have never been finalized yet (e.g. preview usage reports of the current month) or to get all usage reports that were UPDATED at least once. You can provide this parameter multiple times, e.g. to get only FINALIZED and UPDATED usage reports: ?status=FINALIZED&status=UPDATED. (optional)

page

The page number (default=0). See Paging information.

size

The amount of elements in a single page (default=20). See Paging information.

sort

A custom order for sorting the results (optional). For meshTenantUsageReports it is possible to filter by the following fields: platform, platformType, platformTenantId, ownedByWorkspace, ownedByProject, total, generatedAt, reportCategory, paymentMethodIdentifier, finalizedAt, cancelledAt. Possible directions are 'asc' or 'desc'. (e.g. sort=platform,desc)

Example Request
GET /api/meshobjects/meshtenantusagereports?ownedByWorkspace=test-workspace-2&showCancelled=true&page=0&size=10&sort=period,desc HTTP/1.1
Authorization: Basic dmFsaWRfdXNlcm5hbWU6dmFsaWRfcGFzc3dvcmQ=
Accept: application/vnd.meshcloud.api.meshtenantusagereport.v3.hal+json
Host: mesh-billing-url
Example Curl Request
$ curl 'https://mesh-billing-url/api/meshobjects/meshtenantusagereports?ownedByWorkspace=test-workspace-2&showCancelled=true&page=0&size=10&sort=period,desc' -i -u 'valid_username:valid_password' -X GET \
    -H 'Accept: application/vnd.meshcloud.api.meshtenantusagereport.v3.hal+json'
Response Fields
Path Type Description

_embedded

Object

Contains the actual content of the paged response.

_embedded.meshTenantUsageReports[]

Array

List of meshTenantUsageReport.

page

Object

See Paging information.

_links

Object

Currently only contains the self link and pagination links.

Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/vnd.meshcloud.api.meshtenantusagereport.v3.hal+json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 3609

{
  "_embedded" : {
    "meshTenantUsageReports" : [ {
      "kind" : "meshTenantUsageReport",
      "apiVersion" : "v3",
      "metadata" : {
        "uuid" : "720f8801-d500-4ff3-bdc2-aae5d6c1e2df",
        "ownedByWorkspace" : "test-workspace-2",
        "ownedByProject" : "test-project",
        "createdAt" : "2025-01-07T01:00:00Z"
      },
      "spec" : {
        "period" : "2024-12",
        "reportCategory" : "BILLING",
        "platformType" : "Azure",
        "platform" : "azure.prod",
        "platformTenantId" : "02ad42b1-4030-487e-b4d8-4c6d68795461",
        "version" : 2
      },
      "status" : {
        "generatedAt" : "2025-01-07T01:00:00Z",
        "finalizedAt" : "2025-01-07T01:00:00Z",
        "paymentMethod" : {
          "identifier" : "test-payment-method",
          "name" : "Test Payment Method",
          "amount" : 100,
          "expirationDate" : "2025-06-01T00:00:00Z"
        },
        "timeframe" : {
          "from" : "2024-12-01T00:00:00Z",
          "to" : "2025-01-01T00:00:00Z"
        },
        "tags" : {
          "env" : [ "prod" ],
          "costCenter" : [ "4058" ]
        },
        "lineItems" : [ {
          "netAmount" : {
            "amount" : 50.0,
            "currency" : "EUR",
            "baseAmount" : 40.0,
            "baseCurrency" : "USD",
            "exchangeRate" : 1.1
          },
          "sellerId" : "Platform Team",
          "sellerProductGroup" : "Azure"
        } ]
      },
      "_links" : {
        "self" : {
          "href" : "https://mesh-billing-url/api/meshobjects/meshtenantusagereports/720f8801-d500-4ff3-bdc2-aae5d6c1e2df"
        }
      }
    }, {
      "kind" : "meshTenantUsageReport",
      "apiVersion" : "v3",
      "metadata" : {
        "uuid" : "ec072338-4703-437b-8f9e-2f3d3b7b27b3",
        "ownedByWorkspace" : "test-workspace-2",
        "ownedByProject" : "test-project",
        "createdAt" : "2025-01-05T01:00:00Z"
      },
      "spec" : {
        "period" : "2024-12",
        "reportCategory" : "BILLING",
        "platformType" : "Azure",
        "platform" : "azure.prod",
        "platformTenantId" : "f557461f-78d5-4a50-8335-eb6ba39197bf",
        "version" : 1
      },
      "status" : {
        "generatedAt" : "2025-01-05T01:00:00Z",
        "finalizedAt" : "2025-01-05T01:00:00Z",
        "cancelledAt" : "2025-01-07T01:00:00Z",
        "paymentMethod" : {
          "identifier" : "test-payment-method",
          "name" : "Test Payment Method",
          "amount" : 100,
          "expirationDate" : "2025-06-01T00:00:00Z"
        },
        "timeframe" : {
          "from" : "2024-12-01T00:00:00Z",
          "to" : "2025-01-01T00:00:00Z"
        },
        "tags" : {
          "env" : [ "prod" ],
          "costCenter" : [ "4058" ]
        },
        "lineItems" : [ {
          "netAmount" : {
            "amount" : 40.0,
            "currency" : "EUR",
            "baseAmount" : 32.0,
            "baseCurrency" : "USD",
            "exchangeRate" : 1.1
          },
          "sellerId" : "Platform Team",
          "sellerProductGroup" : "Azure"
        } ]
      },
      "_links" : {
        "self" : {
          "href" : "https://mesh-billing-url/api/meshobjects/meshtenantusagereports/ec072338-4703-437b-8f9e-2f3d3b7b27b3"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://mesh-billing-url/api/meshobjects/meshtenantusagereports?ownedByWorkspace=test-workspace-2&showCancelled=true&page=0&size=10&sort=period,desc"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}
Get meshTenantUsageReport

Get a single meshTenantUsageReport.

Request Headers
Name Description

Accept

meshApi is versioned and you should use application/vnd.meshcloud.api.meshtenantusagereport.v3.hal+json as an Accept header to be guaranteed the V3 response format of this endpoint. New versions might be added in future.

Example Request
GET /api/meshobjects/meshtenantusagereports/720f8801-d500-4ff3-bdc2-aae5d6c1e2df HTTP/1.1
Authorization: Basic dmFsaWRfdXNlcm5hbWU6dmFsaWRfcGFzc3dvcmQ=
Accept: application/vnd.meshcloud.api.meshtenantusagereport.v3.hal+json
Host: mesh-billing-url
Example Curl Request
$ curl 'https://mesh-billing-url/api/meshobjects/meshtenantusagereports/720f8801-d500-4ff3-bdc2-aae5d6c1e2df' -i -u 'valid_username:valid_password' -X GET \
    -H 'Accept: application/vnd.meshcloud.api.meshtenantusagereport.v3.hal+json'
Response Fields
Path Type Description

apiVersion

String

Version of meshTenantUsageReport datatype. Matches the version provided in the Accept request header.

kind

String

As a common meshObject structure exists, every meshObject has a 'kind'. This is always 'meshTenantUsageReport' for this endpoint.

metadata

Object

Contains common attributes of a meshTenantUsageReport, that also exist on other meshObjects.

metadata.uuid

String

A uuid that identifies a meshTenantUsageReport uniquely.

metadata.ownedByWorkspace

String

The identifier of the workspace the meshTenantUsageReport belongs to or null if the tenant is not managed by meshStack. (optional)

metadata.ownedByProject

String

The identifier of the project the meshTenantUsageReport belongs to or null if the tenant is not managed by meshStack. (optional)

metadata.createdAt

String

The date the meshTenantUsageReport was created in the system that serves the API.

spec

Object

All fields in this section describe the meshTenantUsageReport.

spec.platformType

String

The platformType of the platform the meshTenantUsageReport belongs to. One of: Azure, Aws, Gcp, AzureResourceGroup, AzureKubernetesService, Kubernetes, OpenShift, OpenStack, CloudFoundry, MeshMarketplace, GitHub, Custom

spec.platform

String

The platformFullIdentifier of the platform the meshTenantUsageReport belongs to.

spec.period

String

The period of the meshTenantUsageReport, e.g. 2025-01.

spec.reportCategory

String

The reportCategory of the meshTenantUsageReport, possible options are BILLING or ENVIRONMENTAL.

spec.platformTenantId

String

The platformTenantId that the meshTenantUsageReport belongs to.

spec.version

Number

When a TenantUsageReport is updated after it was already finalized, the version is always increased by 1.

status

Object

All fields in this section provide detailed content of the meshTenantUsageReport.

status.generatedAt

String

Date when the meshTenantUsageReport was generated initially.

status.finalizedAt

String

Date when the meshTenantUsageReport was finalized.

status.cancelledAt

String

Date when the meshTenantUsageReport was cancelled and replaced by a new meshTenantUsageReport.

status.timeframe

Object

This provides details about the period the meshTenantUsageReport was generated for.

status.timeframe.from

String

At which point in time the period started (usually beginning of month).

status.timeframe.to

String

Before which point in time the period ended (usually beginning of next month).

status.tags

Object

The related tags, that were inherited for the given period to the related tenant. This includes workspace, project and payment method tags. The values are provided as an array,as multiple values can be set for some tags.

status.paymentMethod

Object

The payment method that was assigned to the project the related tenant belongs to in the given period.

status.paymentMethod.identifier

String

The identifier of the related payment method.

status.paymentMethod.name

String

The name of the related payment method.

status.paymentMethod.amount

Number

The amount of the related payment method, if set. (optional)

status.paymentMethod.expirationDate

String

The expiration date of the related payment method, if set. (optional)

status.lineItems[]

Array

Top-Level line items of the TenantUsageReport. Separate line items are created by sellerId, sellerProductGroup and currency.

status.lineItems[].sellerId

String

Seller information can be provided in the Product Catalog of meshStack. You can e.g. use the sellerId to separate costs coming from the cloud platform and additional fees that are applied by your company’s platform team.

status.lineItems[].sellerProductGroup

String

The sellerProductGroup can specify the seller information to a more detailed level. It is for example used to provide the service broker name in case of a meshMarketplace usage report. The sellerId is set to the workspace identifier in that case.

status.lineItems[].netAmount

Object

A list of total reported amounts separated by currency.

status.lineItems[].netAmount.amount

Number

The concrete amount of reported costs in the original currency.

status.lineItems[].netAmount.currency

String

The currency used for the corresponding amount.

status.lineItems[].netAmount.baseAmount

Number

The converted amount. For example, if currency is USD and baseCurrency is EUR, this will be the amount resulting from conversion from USD to EUR.

status.lineItems[].netAmount.baseCurrency

String

Currency for the baseAmount. This value is either null or EUR.

status.lineItems[].netAmount.exchangeRate

Number

The actual exchange rate that was used for conversion to the base currency.

_links

Object

meshTenantUsageReports currently only provide a self link.

Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/vnd.meshcloud.api.meshtenantusagereport.v3.hal+json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 1392

{
  "kind" : "meshTenantUsageReport",
  "apiVersion" : "v3",
  "metadata" : {
    "uuid" : "720f8801-d500-4ff3-bdc2-aae5d6c1e2df",
    "ownedByWorkspace" : "test-workspace-2",
    "ownedByProject" : "test-project",
    "createdAt" : "2025-01-07T01:00:00Z"
  },
  "spec" : {
    "period" : "2024-12",
    "reportCategory" : "BILLING",
    "platformType" : "Azure",
    "platform" : "azure.prod",
    "platformTenantId" : "02ad42b1-4030-487e-b4d8-4c6d68795461",
    "version" : 2
  },
  "status" : {
    "generatedAt" : "2025-01-07T01:00:00Z",
    "finalizedAt" : "2025-01-07T01:00:00Z",
    "paymentMethod" : {
      "identifier" : "test-payment-method",
      "name" : "Test Payment Method",
      "amount" : 100,
      "expirationDate" : "2025-06-01T00:00:00Z"
    },
    "timeframe" : {
      "from" : "2024-12-01T00:00:00Z",
      "to" : "2025-01-01T00:00:00Z"
    },
    "tags" : {
      "env" : [ "prod" ],
      "costCenter" : [ "4058" ]
    },
    "lineItems" : [ {
      "netAmount" : {
        "amount" : 50.0,
        "currency" : "EUR",
        "baseAmount" : 40.0,
        "baseCurrency" : "USD",
        "exchangeRate" : 1.1
      },
      "sellerId" : "Platform Team",
      "sellerProductGroup" : "Azure"
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://mesh-billing-url/api/meshobjects/meshtenantusagereports/720f8801-d500-4ff3-bdc2-aae5d6c1e2df"
    }
  }
}

meshChargebacks

All endpoints on meshChargebacks.

Info: The meshTenantUsageReport endpoints are the preferred endpoints to get cost data from meshStack. The meshTenantUsageReport endpoints provide more detailed information and more filter options than the chargeback statements. They contain basically the same information as a chargeback, but only per tenant, not per project.

For customers who export chargeback statements on a monthly basis, the following recommendation applies: chargeback statements of the previous month should be processed no earlier than one day after the configured finalization date, at 7 a.m. (German local time). By default, chargeback statements are finalized at the 6th of a month, therefore, they can be processed starting at the 7th of a month at 7 a.m. If you are unsure about the configuration of the finalization day of chargebacks in your meshStack, please contact our support team.

List meshChargebacks

Provides a paged list of meshChargebacks.

Note: If no request parameters for filtering are specified, all meshChargebacks are returned independently of these parameters. By default, meshChargebacks are sorted descending by period.

Request Headers
Name Description

Accept

meshApi is versioned and you should use application/vnd.meshcloud.api.meshchargeback.v3.hal+json as an Accept header to be guaranteed the V3 response format of this endpoint. New versions might be added in future.

Request Parameters
Parameter Description

workspaceIdentifier

Filter for meshChargebacks that belong to the meshWorkspace with given identifier. (optional)

projectIdentifier

Filter for meshChargebacks that belong to the meshProject with given identifier. (optional)

period

Filter for meshChargebacks that belong to the provided period, e.g. '2022-01-01Z' (optional)

finalized

Filter for finalized or preview meshChargebacks. Provide 'true' to get finalized meshChargebacks or provide 'false' to get preview meshChargebacks.

page

The page number (default=0). See Paging information.

size

The amount of elements in a single page (default=20). See Paging information.

sort

A custom order for sorting the results (optional). For meshChargebacks it is possible to filter by the following fields: name, customerIdentifier, projectIdentifier, period, partnerIdentifier. Possible directions are 'asc' or 'desc'. (e.g. sort=name,desc)

Example Request
GET /api/meshobjects/meshchargebacks?workspaceIdentifier=testWorkspace&page=0&size=10&sort=name,desc HTTP/1.1
Authorization: Basic dmFsaWRfdXNlcm5hbWU6dmFsaWRfcGFzc3dvcmQ=
Accept: application/vnd.meshcloud.api.meshchargeback.v3.hal+json
Host: mesh-billing-url
Example Curl Request
$ curl 'https://mesh-billing-url/api/meshobjects/meshchargebacks?workspaceIdentifier=testWorkspace&page=0&size=10&sort=name,desc' -i -u 'valid_username:valid_password' -X GET \
    -H 'Accept: application/vnd.meshcloud.api.meshchargeback.v3.hal+json'
Response Fields
Path Type Description

_embedded

Object

Contains the actual content of the paged response.

_embedded.meshChargebacks[]

Array

List of meshChargeback.

page

Object

See Paging information.

_links

Object

Currently only contains the self link and pagination links.

Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/vnd.meshcloud.api.meshchargeback.v3.hal+json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 3377

{
  "_embedded" : {
    "meshChargebacks" : [ {
      "kind" : "meshChargeback",
      "apiVersion" : "v3",
      "metadata" : {
        "name" : "2025-01-01Z/testPartner:testWorkspace:testProject",
        "createdOn" : "2025-01-15T14:01:55.062973900Z",
        "finalized" : true
      },
      "spec" : {
        "projectIdentifier" : "testProject",
        "period" : "2025-01-01Z",
        "tags" : {
          "paymentIdentifier" : [ "123" ]
        },
        "workspaceIdentifier" : "testWorkspace"
      },
      "status" : {
        "timeframe" : {
          "from" : "2025-01-01T00:00:00Z",
          "to" : "2025-02-01T00:00:00Z"
        },
        "lineItems" : [ {
          "reportCategory" : "BILLING",
          "platformTenantId" : "test1-localProjectId",
          "platformFullIdentifier" : "test1-instance.test1-location",
          "reportId" : "test1-reportId",
          "entryDate" : "2019-08-03T00:07:01.289Z",
          "period" : "2019-07-01Z",
          "netAmount" : 1.65,
          "baseNetAmount" : 1.65,
          "baseCurrency" : "EUR",
          "exchangeRate" : 1,
          "currency" : "EUR",
          "sellerId" : "Operations",
          "sellerProductGroup" : "Platform Team"
        }, {
          "reportCategory" : "BILLING",
          "platformTenantId" : "test2-localProjectId",
          "platformFullIdentifier" : "test2-instance.test2-location",
          "reportId" : "test2-reportId",
          "entryDate" : "2019-08-03T00:07:01.289Z",
          "period" : "2019-07-01Z",
          "netAmount" : 3.12,
          "baseNetAmount" : 3.12,
          "baseCurrency" : "EUR",
          "exchangeRate" : 1,
          "currency" : "EUR",
          "sellerId" : "Operations",
          "sellerProductGroup" : "Platform Team"
        } ],
        "netAmounts" : [ {
          "currency" : "EUR",
          "amount" : 4.77,
          "baseCurrency" : "EUR",
          "baseNetAmount" : 4.77
        } ]
      },
      "_links" : {
        "self" : {
          "href" : "https://mesh-billing-url/api/meshobjects/meshchargebacks/2025-01-01Z/testPartner%3AtestWorkspace%3AtestProject"
        }
      }
    }, {
      "kind" : "meshChargeback",
      "apiVersion" : "v3",
      "metadata" : {
        "name" : "2024-12-01Z/testPartner:testWorkspace:testProject",
        "createdOn" : "2025-01-15T14:01:55.064383800Z",
        "finalized" : true
      },
      "spec" : {
        "projectIdentifier" : "testProject",
        "period" : "2024-12-01Z",
        "tags" : { },
        "workspaceIdentifier" : "testWorkspace"
      },
      "status" : {
        "timeframe" : {
          "from" : "2024-12-01T00:00:00Z",
          "to" : "2025-01-01T00:00:00Z"
        },
        "lineItems" : [ ],
        "netAmounts" : [ {
          "currency" : "EUR",
          "amount" : 0,
          "baseCurrency" : "EUR",
          "baseNetAmount" : 0
        } ]
      },
      "_links" : {
        "self" : {
          "href" : "https://mesh-billing-url/api/meshobjects/meshchargebacks/2024-12-01Z/testPartner%3AtestWorkspace%3AtestProject"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://mesh-billing-url/api/meshobjects/meshchargebacks?workspaceIdentifier=testWorkspace&page=0&size=10&sort=name,desc"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}
Get meshChargeback

Get a single meshChargeback.

Request Headers
Name Description

Accept

meshApi is versioned and you should use application/vnd.meshcloud.api.meshchargeback.v3.hal+json as an Accept header to be guaranteed the V3 response format of this endpoint. New versions might be added in future.

Example Request
GET /api/meshobjects/meshchargebacks/2025-01-01Z/testPartner%253AtestWorkspace%253AtestProject HTTP/1.1
Authorization: Basic dmFsaWRfdXNlcm5hbWU6dmFsaWRfcGFzc3dvcmQ=
Accept: application/vnd.meshcloud.api.meshchargeback.v3.hal+json
Host: mesh-billing-url
Example Curl Request
$ curl 'https://mesh-billing-url/api/meshobjects/meshchargebacks/2025-01-01Z/testPartner%253AtestWorkspace%253AtestProject' -i -u 'valid_username:valid_password' -X GET \
    -H 'Accept: application/vnd.meshcloud.api.meshchargeback.v3.hal+json'
Response Fields
Path Type Description

apiVersion

String

Version of meshChargeback datatype. Matches the version provided in the Accept request header.

kind

String

As a common meshObject structure exists, every meshObject has a 'kind'. This is always 'meshChargeback' for this endpoint.

metadata

Object

Contains attributes to identify a meshChargeback.

metadata.name

String

A name a meshChargeback can be uniquely identified with.

metadata.createdOn

String

Creation Date of the meshChargeback.

metadata.finalized

Boolean

Finalization state of the meshChargeback. Value is 'true' for finalized and 'false' for preview meshChargebacks.

spec

Object

All fields in this section describe the meshChargeback.

spec.workspaceIdentifier

String

The meshWorkspace identifier this meshChargeback belongs to.

spec.projectIdentifier

String

The meshProject identifier this meshChargeback belongs to.

spec.period

String

The period of the meshChargeback, e.g. '2022-01-01Z'.

spec.tags

Object

Key/Value pairs associated with this meshChargeback. This includes meshWorkspace, meshProject & meshPaymentMethod tags. Additionally metadata like paymentMethod attributes are provided. Keep in mind, that values are represented as an array to be consistent with other meshObjects. But at themoment, if multiple values are set for a certain tag, only the first value is available on a meshChargeback.

status

Object

All fields in this section provide detailed content of the meshChargeback.

status.timeframe

Object

This provides actual details about the period the meshCHargeback was generated for.

status.timeframe.from

String

At which point in time the period started (usually beginning of month).

status.timeframe.to

String

Before which point in time the period ended (usually beginning of next month).

status.lineItems[]

Array

List of all tenant usage reports that have been booked on a meshChargeback. One lineItem is created per Tenant Usage Report and currency.

status.lineItems[].reportCategory

String

Tenant Usage Reports can either belong to category BILLING or ENVIRONMENTAL. This separation is needed as this kind of different data is provided in quite different time intervals.

status.lineItems[].platformTenantId

String

Id of the actual platform tenant in the cloud platform (e.g. AWS Account Id or OpenShift Project Id).

status.lineItems[].platformFullIdentifier

String

meshStack identifier of the platform the tenant belongs to.

status.lineItems[].reportId

String

Id of the Tenant Usage Report this lineItem relates to.

status.lineItems[].entryDate

String

Date when the usage report was actually finalized and not modified anymore afterwards.

status.lineItems[].period

String

Report Period in which the usage for this line item actually occurred. If for some reason a usage report was not finalized before the related chargeback period ended, it will beadded to a later meshChargeback. So meshChargebacks can contain line items from differentreporting periods.

status.lineItems[].netAmount

Number

Total cost associated with the given Tenant Usage Report for one currency.

status.lineItems[].baseNetAmount

Number

The converted amount. For example, if currency is USD and baseCurrency is EUR, this will be the amount resulting from conversion from USD to EUR.

status.lineItems[].currency

String

Currency for the netAmount listed in this lineItem. Multiple lineItems are created if a Tenant Usage Report has costs distributed across multiple currencies.

status.lineItems[].baseCurrency

String

Currency for the baseNetAmount listed in this lineItem. This value is either null or EUR.

status.lineItems[].sellerId

String

SellerId configured in meshStack for certain meshPlatforms or even specific products within a platform. This can be used to identify the department or group inside your company the netAmount will be charged to.

status.lineItems[].sellerProductGroup

String

With the sellerProductGroup the seller information can be further refined. This is for example used to identify the different service brokers used in the meshMarketplace.

status.netAmounts[]

Array

NetAmounts per currency are provided here.

status.netAmounts[].currency

String

Currency belonging to the netAmount.

status.netAmounts[].baseCurrency

String

The currency the amount was converted to. This value is either null or EUR.

status.netAmounts[].amount

Number

The actual cost associated with the given currency.

status.netAmounts[].baseNetAmount

Number

The converted amount. For example, if currency is USD and baseCurrency is EUR, this will be the amount resulting from conversion from USD to EUR.

_links

Object

Available links [links] on a meshChargeback.

Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/vnd.meshcloud.api.meshchargeback.v3.hal+json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 1852

{
  "kind" : "meshChargeback",
  "apiVersion" : "v3",
  "metadata" : {
    "name" : "2025-01-01Z/testPartner:testWorkspace:testProject",
    "createdOn" : "2025-01-15T14:01:55.062973900Z",
    "finalized" : true
  },
  "spec" : {
    "projectIdentifier" : "testProject",
    "period" : "2025-01-01Z",
    "tags" : {
      "paymentIdentifier" : [ "123" ]
    },
    "workspaceIdentifier" : "testWorkspace"
  },
  "status" : {
    "timeframe" : {
      "from" : "2025-01-01T00:00:00Z",
      "to" : "2025-02-01T00:00:00Z"
    },
    "lineItems" : [ {
      "reportCategory" : "BILLING",
      "platformTenantId" : "test1-localProjectId",
      "platformFullIdentifier" : "test1-instance.test1-location",
      "reportId" : "test1-reportId",
      "entryDate" : "2019-08-03T00:07:01.289Z",
      "period" : "2019-07-01Z",
      "netAmount" : 1.65,
      "baseNetAmount" : 1.65,
      "baseCurrency" : "EUR",
      "exchangeRate" : 1,
      "currency" : "EUR",
      "sellerId" : "Operations",
      "sellerProductGroup" : "Platform Team"
    }, {
      "reportCategory" : "BILLING",
      "platformTenantId" : "test2-localProjectId",
      "platformFullIdentifier" : "test2-instance.test2-location",
      "reportId" : "test2-reportId",
      "entryDate" : "2019-08-03T00:07:01.289Z",
      "period" : "2019-07-01Z",
      "netAmount" : 3.12,
      "baseNetAmount" : 3.12,
      "baseCurrency" : "EUR",
      "exchangeRate" : 1,
      "currency" : "EUR",
      "sellerId" : "Operations",
      "sellerProductGroup" : "Platform Team"
    } ],
    "netAmounts" : [ {
      "currency" : "EUR",
      "amount" : 4.77,
      "baseCurrency" : "EUR",
      "baseNetAmount" : 4.77
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://mesh-billing-url/api/meshobjects/meshchargebacks/2025-01-01Z/testPartner%3AtestWorkspace%3AtestProject"
    }
  }
}

meshResourceUsageReports

All endpoints on meshResourceUsageReports.

Put meshResourceUsageReports

Use this endpoint to provide cost data from external systems to meshStack. A meshResourceUsageReport will be picked up by the billing system of meshStack and subsequently included into regular meshTenantUsageReports.

/api/meshobjects/meshresourceusagereports/{platformTenantId}/{period}
Parameter Description

platformTenantId

The Platform Tenant ID of the tenant causing the costs.

period

The month during which the costs have occurred, e.g. 2023-05-01Z for May 2023.

Request Headers
Name Description

Content-Type

meshObject Import is versioned and application/vnd.meshcloud.api.meshobjects.v1+yaml or application/vnd.meshcloud.api.meshobjects.v1+json can be used as a Content-Type.

Accept

meshApi is versioned and you should use application/vnd.meshcloud.api.meshobjects.v1+json as an Accept header to be guaranteed the V1 response format of this endpoint. New versions will be added in future.

Request Fields
Path Type Description

apiVersion

String

Required for backwards compatibility. v1 is the only supported version at the moment.

kind

String

Always set this to meshResourceUsageReport.

fullPlatformIdentifier

String

An identifier in the format $platformInstance.$location, where $platformInstance refers to the identifier of the meshPlatform, and $location refers to the identifier of the meshLocation.

source

String

Name of the system where this ResourceUsageReport originates from.

lineItems[].productName

String

Name of the product.

lineItems[].usageQuantity

Number

The usage quantity, for example, 48 if a product was used for 48 hours.

lineItems[].usageType

String

To elaborate on the usageUnit, this field is used to describe what exactly is consumed and billed, for example, 'hours of CPU/RAM usage'.

lineItems[].usageCost

Number

The cost per consumed usageUnit. usageQuantity multiplied by usageCost should always equal totalCost.

lineItems[].currency

String

The ISO-4217 compliant currency code, e.g. EUR or USD.

lineItems[].usageUnit

String

The unit of the given usageQuantity, for example, h for hours or d for days.

lineItems[].totalCost

Number

totalCost equals usageQuantity multiplied by usageCost.

Example Request
PUT /api/meshobjects/meshresourceusagereports/12345/2023-01-01Z HTTP/1.1
Content-Type: application/vnd.meshcloud.api.meshobjects.v1+json;charset=UTF-8
Authorization: Basic dmFsaWRfdXNlcm5hbWU6dmFsaWRfcGFzc3dvcmQ=
Accept: application/vnd.meshcloud.api.meshobjects.v1+json
Content-Length: 755
Host: mesh-billing-url

{
    "apiVersion": "v1",
    "kind": "meshResourceUsageReport",
    "fullPlatformIdentifier": "my-platform-instance.my-location",
    "source": "Name of Source System",
    "lineItems": [
        {
            "productName": "Virtual Machine",
            "usageQuantity": 48,
            "usageType": "Hours of CPU/RAM usage",
            "usageCost": 1.2,
            "currency": "USD",
            "usageUnit": "h",
            "totalCost": 57.6
        },
        {
            "productName": "SSD storage",
            "usageQuantity": 480,
            "usageType": "Hours of usage multiplied by amounts of GB",
            "usageCost": 0.05,
            "currency": "USD",
            "usageUnit": "h",
            "totalCost": 24
        }
    ]
}
Example Curl Request
$ curl 'https://mesh-billing-url/api/meshobjects/meshresourceusagereports/12345/2023-01-01Z' -i -u 'valid_username:valid_password' -X PUT \
    -H 'Content-Type: application/vnd.meshcloud.api.meshobjects.v1+json;charset=UTF-8' \
    -H 'Accept: application/vnd.meshcloud.api.meshobjects.v1+json' \
    -d '{
    "apiVersion": "v1",
    "kind": "meshResourceUsageReport",
    "fullPlatformIdentifier": "my-platform-instance.my-location",
    "source": "Name of Source System",
    "lineItems": [
        {
            "productName": "Virtual Machine",
            "usageQuantity": 48,
            "usageType": "Hours of CPU/RAM usage",
            "usageCost": 1.2,
            "currency": "USD",
            "usageUnit": "h",
            "totalCost": 57.6
        },
        {
            "productName": "SSD storage",
            "usageQuantity": 480,
            "usageType": "Hours of usage multiplied by amounts of GB",
            "usageCost": 0.05,
            "currency": "USD",
            "usageUnit": "h",
            "totalCost": 24
        }
    ]
}'
Example Response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/vnd.meshcloud.api.meshobjects.v1+json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 133

{
  "meshObject" : "meshResourceUsageReport",
  "status" : "SUCCESS",
  "resultCode" : null,
  "message" : null,
  "remarks" : null
}
Response Fields
Path Type Description

meshObject

String

The name of the meshObject (this is always set to meshResourceUsageReport)

status

String

The import result status for this meshResourceUsageReport. (SUCCESS or FAILED)

resultCode

String?

Specific result code for this import result.

If no error has occurred, it’s set to null. Otherwise, it’s set to, SERVER_ERROR, as this is is the only possible error code at the moment.

message

String?

A user readable message with more details. (might be null)

remarks

List<String>?

User readable remarks on this import result. (might be null)