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 |
---|---|
|
Used to retrieve a resource |
|
Used to create a new resource |
|
Used to update an existing resource, including partial updates |
|
Used to update an existing resource, full updates only |
|
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 |
---|---|
|
Standard response for successful HTTP requests. |
|
The request has been fulfilled and resulted in a new resource being created. |
|
The server successfully processed the request, but is not returning any content. |
|
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). |
|
The server cannot authorize the request. Check the Basic Auth credentials used for the request. |
|
The request is not allowed for the authorized user. |
|
The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible. |
|
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’s meshObject API uses custom media types in the Accept
and Content-Type
headers for versioning.
meshObject API versions each resource like meshWorkspace
or meshProject
individually. This means
you need to specify the specific media type corresponding to the endpoint you are calling.
For example, when meshStack introduces a new version of the meshWorkspace
resource, this has no effect on other
resources like the meshProject
. This allows the API to evolve in a granular way.
API clients must always set an Accept
header with the explicitly versioned resource media type.
meshObject API will reject requests without an Accept
header using a 406 Not Acceptable
status code.
The correct media type required for a resource is described in the corresponding Resource section in this documentation.
For example, this is the media type required to access the v1
version of a meshWorkspace
resource:
Accept: application/vnd.meshcloud.api.meshworkspace.v1.hal+json
Requests that need to send a body like POST
or PUT
must also set the Content-Type
header with the correct media
type. For example, this is the media type required to POST a meshProject
:
Content-Type: application/vnd.meshcloud.api.meshproject.v2.hal+json
If a request contains a body and you specify an unsupported or unversioned Content-Type
like application/json
,
the endpoint will return an error.
Endpoints that are documented as preview
endpoints in this documentation
are subject to change and we are planning to introduce a new version without support for backwards compatibility,
meaning, the preview version will disappear without prior notice!
These endpoints have a media type with a -preview
suffix (for example,
application/vnd.meshcloud.api.meshbuildingblock.v2-preview.hal+json
).
You are free to try those endpoints out, but we recommend to wait until the final (non-preview) endpoints are released before you integrate such endpoints with your infrastructure.
Deprecation Policy
As we introduce new features and enhance existing functionalities, some API endpoints may become obsolete or outdated. Deprecating old endpoints is important to ensure the health and maintainability of the API.
Explicit Versioning provides API clients time to transition to newer versions of endpoints in a controlled manner.
Deprecation follows a phased approach.
-
outdated: As soon as a new version of an endpoint becomes available, the old version is considered outdated but remains fully functional. API clients are advised to migrate to newer versions at their earliest convenience.
-
deprecated: We have announced an end of life (EoL) date when the endpoint will be removed from the API. API clients must migrate to newer versions before this date. Until this date, the endpoint remains fully functional.
-
retired: After the scheduled removal date, the endpoint is removed from the API and no longer available in meshStack. API clients using the old endpoint will receive an HTTP 406, HTTP 415 or HTTP 404 response as appropriate for the request.
Please refer to the Deprecated Resources section for a list of deprecated and outdated endpoints.
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 |
---|---|
|
The number of the page you want to retrieve (default=0). |
|
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.
Name | Description |
---|---|
|
meshApi is versioned and you should use |
GET /api HTTP/1.1
Authorization: Basic dmFsaWRfdXNlcm5hbWU6dmFsaWRfcGFzc3dvcmQ=
Accept: application/vnd.meshcloud.api.v1.hal+json
Host: mesh-billing-url
$ curl 'https://mesh-billing-url/api' -i -u 'valid_username:valid_password' -X GET \
-H 'Accept: application/vnd.meshcloud.api.v1.hal+json'
Path | Type | Description |
---|---|---|
|
|
All available Top-Level Links for the authenticated user. |
List of all top-level endpoints the authenticated user has access to. Depending on your rights, you will only get a subset of the links mentioned here.
Relation | Description |
---|---|
|
The MeshObjects API to get meshObjects. |
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.
Name | Description |
---|---|
|
meshApi is versioned and you should use |
GET /api/meshobjects HTTP/1.1
Authorization: Basic dmFsaWRfdXNlcm5hbWU6dmFsaWRfcGFzc3dvcmQ=
Accept: application/vnd.meshcloud.api.meshobjects.v1.hal+json
Host: mesh-billing-url
$ 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'
Path | Type | Description |
---|---|---|
|
|
All available meshObject Links for the authenticated user. |
List of all meshObject endpoints the authenticated user has access to. Depending on your rights, you will only get a subset of the links mentioned here.
Relation | Description |
---|---|
|
|
|
Get meshChargebacks. |
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: 666
{
"_links" : {
"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
},
"meshchargebacks" : {
"href" : "https://mesh-billing-url/api/meshobjects/meshchargebacks{?workspaceIdentifier,projectIdentifier,period,finalized,finalizedSince,cancelledSince}",
"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.
Name | Description |
---|---|
|
meshApi is versioned and you should use |
Parameter | Description |
---|---|
|
Filter for meshTenantUsageReports that belong to the meshWorkspace with given identifier. (optional) |
|
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) |
|
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 |
|
Filter for meshTenantUsageReports that belong to the provided platform in the format |
|
Filter for meshTenantUsageReports that belong to the provided platform type. Must be one of: |
|
Filter for meshTenantUsageReports that belong to a certain tenant that can be identified via platform tenant ID (optional) |
|
Filter for meshTenantUsageReports that belong to the provided period in format YYYY-MM, e.g. |
|
Filter for meshTenantUsageReports that belong to the provided reportCategory, |
|
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) |
|
Filter for meshTenantUsageReports that were finalized after the provided date (e.g. |
|
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) |
|
By default, cancelled meshTenantUsageReports are not included in the response. If you want to include them, you can set this parameter to |
|
Filter for meshTenantUsageReports that are in the given state |
|
The page number (default=0). See Paging information. |
|
The amount of elements in a single page (default=20). See Paging information. |
|
A custom order for sorting the results (optional). For meshTenantUsageReports it is possible to filter by the following fields: |
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
$ 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'
Path | Type | Description |
---|---|---|
|
|
Contains the actual content of the paged response. |
|
|
List of meshTenantUsageReport. |
|
|
See Paging information. |
|
|
Currently only contains the self link and pagination links. |
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" : "9a27ee1a-4add-41a1-b6ad-fec463fd6530",
"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" : "a8947d6f-837e-4870-8d8c-0718558a5031",
"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.
Name | Description |
---|---|
|
meshApi is versioned and you should use |
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
$ 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'
Path | Type | Description |
---|---|---|
|
|
Version of meshTenantUsageReport datatype. Matches the version provided in the |
|
|
As a common meshObject structure exists, every meshObject has a 'kind'. This is always 'meshTenantUsageReport' for this endpoint. |
|
|
Contains common attributes of a meshTenantUsageReport, that also exist on other meshObjects. |
|
|
A uuid that identifies a meshTenantUsageReport uniquely. |
|
|
The identifier of the workspace the meshTenantUsageReport belongs to or null if the tenant is not managed by meshStack. (optional) |
|
|
The identifier of the project the meshTenantUsageReport belongs to or null if the tenant is not managed by meshStack. (optional) |
|
|
The date the meshTenantUsageReport was created in the system that serves the API. |
|
|
All fields in this section describe the meshTenantUsageReport. |
|
|
The platformType of the platform the meshTenantUsageReport belongs to. One of: |
|
|
The platformFullIdentifier of the platform the meshTenantUsageReport belongs to. |
|
|
The period of the meshTenantUsageReport, e.g. |
|
|
The reportCategory of the meshTenantUsageReport, possible options are |
|
|
The platformTenantId that the meshTenantUsageReport belongs to. |
|
|
When a TenantUsageReport is updated after it was already finalized, the version is always increased by 1. |
|
|
All fields in this section provide detailed content of the meshTenantUsageReport. |
|
|
Date when the meshTenantUsageReport was generated initially. |
|
|
Date when the meshTenantUsageReport was finalized. |
|
|
Date when the meshTenantUsageReport was cancelled and replaced by a new meshTenantUsageReport. |
|
|
This provides details about the period the meshTenantUsageReport was generated for. |
|
|
At which point in time the period started (usually beginning of month). |
|
|
Before which point in time the period ended (usually beginning of next month). |
|
|
The related tags, that were inherited for the given period to the related tenant. This includes |
|
|
The payment method that was assigned to the project the related tenant belongs to in the given period. |
|
|
The identifier of the related payment method. |
|
|
The name of the related payment method. |
|
|
The amount of the related payment method, if set. (optional) |
|
|
The expiration date of the related payment method, if set. (optional) |
|
|
Top-Level line items of the TenantUsageReport. Separate line items are created by sellerId, sellerProductGroup and currency. |
|
|
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. |
|
|
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. |
|
|
A list of total reported amounts separated by currency. |
|
|
The concrete amount of reported costs in the original currency. |
|
|
The currency used for the corresponding amount. |
|
|
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. |
|
|
Currency for the baseAmount. This value is either null or EUR. |
|
|
The actual exchange rate that was used for conversion to the base currency. |
|
|
meshTenantUsageReports currently only provide a self link. |
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" : "9a27ee1a-4add-41a1-b6ad-fec463fd6530",
"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.
Name | Description |
---|---|
|
meshApi is versioned and you should use |
Parameter | Description |
---|---|
|
Filter for meshChargebacks that belong to the meshWorkspace with given identifier. (optional) |
|
Filter for meshChargebacks that belong to the meshProject with given identifier. (optional) |
|
Filter for meshChargebacks that belong to the provided period, e.g. '2022-01-01Z' (optional) |
|
Filter for finalized or preview meshChargebacks. Provide 'true' to get finalized meshChargebacks or provide 'false' to get preview meshChargebacks. |
|
The page number (default=0). See Paging information. |
|
The amount of elements in a single page (default=20). See Paging information. |
|
A custom order for sorting the results (optional). For meshChargebacks it is possible to filter by the following fields: |
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
$ 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'
Path | Type | Description |
---|---|---|
|
|
Contains the actual content of the paged response. |
|
|
List of meshChargeback. |
|
|
See Paging information. |
|
|
Currently only contains the self link and pagination links. |
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: 1984
{
"_embedded" : {
"meshChargebacks" : [ {
"kind" : "meshChargeback",
"apiVersion" : "v3",
"metadata" : {
"name" : "2025-02-01Z/testPartner:testWorkspace:testProject",
"createdOn" : "2025-03-02T00:00:00Z",
"finalized" : true,
"finalizationDate" : "2025-03-02T00:00:00Z",
"version" : 1
},
"spec" : {
"projectIdentifier" : "testProject",
"period" : "2025-02-01Z",
"tags" : {
"paymentIdentifier" : [ "123" ]
},
"workspaceIdentifier" : "testWorkspace"
},
"status" : {
"timeframe" : {
"from" : "2025-02-01T00:00:00Z",
"to" : "2025-03-01T00:00:00Z"
},
"lineItems" : [ {
"reportCategory" : "BILLING",
"platformTenantId" : "test1-id",
"platformFullIdentifier" : "test1-platform.location",
"reportId" : "TenantUsageReports/test1-platform.location:test1-id:2025-02-01Z:1",
"entryDate" : "2025-03-02T00:00:00Z",
"period" : "2025-02-01Z",
"netAmount" : 1.65,
"baseNetAmount" : 1.815,
"baseCurrency" : "EUR",
"exchangeRate" : 1.1,
"currency" : "USD",
"sellerId" : "Operations",
"sellerProductGroup" : "Platform Team"
} ],
"netAmounts" : [ {
"currency" : "USD",
"amount" : 1.65,
"baseCurrency" : "EUR",
"baseNetAmount" : 1.815
} ]
},
"_links" : {
"self" : {
"href" : "https://mesh-billing-url/api/meshobjects/meshchargebacks/2025-02-01Z/testPartner%3AtestWorkspace%3AtestProject%3A1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://mesh-billing-url/api/meshobjects/meshchargebacks?workspaceIdentifier=testWorkspace&page=0&size=10&sort=name,desc"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
Get meshChargeback
Get a single meshChargeback.
Name | Description |
---|---|
|
meshApi is versioned and you should use |
GET /api/meshobjects/meshchargebacks/2025-02-01Z/testPartner%253AtestWorkspace%253AtestProject%253A1 HTTP/1.1
Authorization: Basic dmFsaWRfdXNlcm5hbWU6dmFsaWRfcGFzc3dvcmQ=
Accept: application/vnd.meshcloud.api.meshchargeback.v3.hal+json
Host: mesh-billing-url
$ curl 'https://mesh-billing-url/api/meshobjects/meshchargebacks/2025-02-01Z/testPartner%253AtestWorkspace%253AtestProject%253A1' -i -u 'valid_username:valid_password' -X GET \
-H 'Accept: application/vnd.meshcloud.api.meshchargeback.v3.hal+json'
Path | Type | Description |
---|---|---|
|
|
Version of meshChargeback datatype. Matches the version provided in the |
|
|
As a common meshObject structure exists, every meshObject has a 'kind'. This is always 'meshChargeback' for this endpoint. |
|
|
Contains attributes to identify a meshChargeback. |
|
|
A name a meshChargeback can be uniquely identified with. |
|
|
Creation Date of the meshChargeback. |
|
|
Finalization state of the meshChargeback. Value is 'true' for finalized and 'false' for preview meshChargebacks. |
|
|
The date when the meshChargeback was finalized. Can be null in case of preview meshChargebacks. |
|
|
If an update to an already finalized meshChargeback comes in, the old meshChargeback gets cancelled. The cancellationDate provides the date at which this cancellation happened. |
|
|
If an update to an already finalized meshChargeback comes in, the old meshChargeback gets cancelled and a new meshChargeback is created. The version is incremented in that case. For an initial or a preview meshChargeback, the version is 1. |
|
|
All fields in this section describe the meshChargeback. |
|
|
The meshWorkspace identifier this meshChargeback belongs to. |
|
|
The meshProject identifier this meshChargeback belongs to. |
|
|
The period of the meshChargeback, e.g. '2022-01-01Z'. |
|
|
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 the moment, if multiple values are set for a certain tag, only the first value is available on a meshChargeback. |
|
|
All fields in this section provide detailed content of the meshChargeback. |
|
|
This provides actual details about the period the meshChargeback was generated for. |
|
|
At which point in time the period started (usually beginning of month). |
|
|
Before which point in time the period ended (usually beginning of next month). |
|
|
List of all tenant usage reports that have been booked on a meshChargeback. One lineItem is created per Tenant Usage Report and currency. |
|
|
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. |
|
|
Id of the actual platform tenant in the cloud platform (e.g. AWS Account Id or OpenShift Project Id). |
|
|
meshStack identifier of the platform the tenant belongs to. |
|
|
Id of the Tenant Usage Report this lineItem relates to. |
|
|
Date when the usage report was actually finalized and not modified anymore afterwards. |
|
|
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 be added to a later meshChargeback. So meshChargebacks can contain line items from different reporting periods. |
|
|
Total cost associated with the given Tenant Usage Report for one currency. |
|
|
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. |
|
|
Currency for the netAmount listed in this lineItem. Multiple lineItems are created if a Tenant Usage Report has costs distributed across multiple currencies. |
|
|
Currency for the baseNetAmount listed in this lineItem. This value is either null or EUR. |
|
|
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. |
|
|
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. |
|
|
NetAmounts per currency are provided here. |
|
|
Currency belonging to the netAmount. |
|
|
The currency the amount was converted to. This value is either null or EUR. |
|
|
The actual cost associated with the given currency. |
|
|
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. |
|
|
Available links [links] on a meshChargeback. |
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: 1452
{
"kind" : "meshChargeback",
"apiVersion" : "v3",
"metadata" : {
"name" : "2025-02-01Z/testPartner:testWorkspace:testProject",
"createdOn" : "2025-03-02T00:00:00Z",
"finalized" : true,
"finalizationDate" : "2025-03-02T00:00:00Z",
"version" : 1
},
"spec" : {
"projectIdentifier" : "testProject",
"period" : "2025-02-01Z",
"tags" : {
"paymentIdentifier" : [ "123" ]
},
"workspaceIdentifier" : "testWorkspace"
},
"status" : {
"timeframe" : {
"from" : "2025-02-01T00:00:00Z",
"to" : "2025-03-01T00:00:00Z"
},
"lineItems" : [ {
"reportCategory" : "BILLING",
"platformTenantId" : "test1-id",
"platformFullIdentifier" : "test1-platform.location",
"reportId" : "TenantUsageReports/test1-platform.location:test1-id:2025-02-01Z:1",
"entryDate" : "2025-03-02T00:00:00Z",
"period" : "2025-02-01Z",
"netAmount" : 1.65,
"baseNetAmount" : 1.815,
"baseCurrency" : "EUR",
"exchangeRate" : 1.1,
"currency" : "USD",
"sellerId" : "Operations",
"sellerProductGroup" : "Platform Team"
} ],
"netAmounts" : [ {
"currency" : "USD",
"amount" : 1.65,
"baseCurrency" : "EUR",
"baseNetAmount" : 1.815
} ]
},
"_links" : {
"self" : {
"href" : "https://mesh-billing-url/api/meshobjects/meshchargebacks/2025-02-01Z/testPartner%3AtestWorkspace%3AtestProject%3A1"
}
}
}
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.
Parameter | Description |
---|---|
|
The Platform Tenant ID of the tenant causing the costs. |
|
The month during which the costs have occurred, e.g. 2023-05-01Z for May 2023. |
Name | Description |
---|---|
|
meshObject Import is versioned and |
|
meshApi is versioned and you should use |
Path | Type | Description |
---|---|---|
|
|
Required for backwards compatibility. v1 is the only supported version at the moment. |
|
|
Always set this to meshResourceUsageReport. |
|
|
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. |
|
|
Name of the system where this ResourceUsageReport originates from. |
|
|
Name of the product. |
|
|
The usage quantity, for example, 48 if a product was used for 48 hours. |
|
|
To elaborate on the usageUnit, this field is used to describe what exactly is consumed and billed, for example, 'hours of CPU/RAM usage'. |
|
|
The cost per consumed usageUnit. usageQuantity multiplied by usageCost should always equal totalCost. |
|
|
The ISO-4217 compliant currency code, e.g. EUR or USD. |
|
|
The unit of the given usageQuantity, for example, h for hours or d for days. |
|
|
totalCost equals usageQuantity multiplied by usageCost. |
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
}
]
}
$ 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
}
]
}'
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
}
Path | Type | Description |
---|---|---|
|
|
The name of the meshObject (this is always set to meshResourceUsageReport) |
|
|
The import result status for this meshResourceUsageReport. (SUCCESS or FAILED) |
|
|
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. |
|
|
A user readable message with more details. (might be null) |
|
|
User readable remarks on this import result. (might be null) |