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 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 |
---|---|
|
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: 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.
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" : "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.
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" : "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.
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: 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.
Name | Description |
---|---|
|
meshApi is versioned and you should use |
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
$ 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'
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. |
|
|
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 themoment, 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 beadded to a later meshChargeback. So meshChargebacks can contain line items from differentreporting 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: 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.
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) |