Skip to content

Commit

Permalink
Merge pull request #23387 from microsoftgraph/abhis/usagev1_011701
Browse files Browse the repository at this point in the history
pc billing added doc for v1.0 release of usage APIs
Lauragra authored Feb 1, 2024
2 parents 547884b + 6c3ee18 commit fe4cc61
Showing 30 changed files with 1,446 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -7,5 +7,5 @@ ms.topic: include

<!-- markdownlint-disable MD041-->
> [!NOTE]
> This API is available for Cloud Solution Provider (CSP) partners only to access their billed and unbilled data for a tenant. For information about the CSP program, see the [Microsoft Cloud Solution Provider](https://learn.microsoft.com/en-us/partner-center/csp-overview) page.
> This API is available for Cloud Solution Provider (CSP) partners only to access their billed and unbilled reconciliation data for a tenant. To learn more about the CSP program, see [Microsoft Cloud Solution Provider](/partner-center/csp-overview).
4 changes: 2 additions & 2 deletions api-reference/beta/resources/partners-billing-api-overview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Use the Microsoft Graph API to export partner billing data (preview)"
title: "Use the Microsoft Graph API to export partner billing data"
description: "The partner billing API in Microsoft Graph offers Microsoft direct partners a faster, more efficient way to export their high-volume billed and unbilled Azure usage data."
author: "abhishek-singh-ms"
ms.localizationpriority: medium
@@ -8,7 +8,7 @@ doc_type: resourcePageType
ms.custom: zt-include
---

# Use the Microsoft Graph API to export partner billing data (preview)
# Use the Microsoft Graph API to export partner billing data

[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]

2 changes: 1 addition & 1 deletion api-reference/beta/toc.yml
Original file line number Diff line number Diff line change
@@ -16357,7 +16357,7 @@ items:
href: resources/attacksimulationtrainingusercoverage.md
- name: Get training coverage for users
href: api/securityreportsroot-getattacksimulationtrainingusercoverage.md
- name: Partner billing reports (preview)
- name: Partner billing reports
items:
- name: Overview
href: resources/partners-billing-api-overview.md
94 changes: 94 additions & 0 deletions api-reference/v1.0/api/partners-billing-billedusage-export.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: "billedUsage: export"
description: "Export the billed Azure usage data."
author: "sourishdeb"
ms.localizationpriority: medium
ms.prod: "reports"
doc_type: apiPageType
---

# billedUsage: export

Namespace: microsoft.graph.partners.billing

[!INCLUDE [alerts-callout-csp-partner-only](../includes/alerts-callout-csp-partner-only.md)]

Export the billed Azure usage data.

## Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see [Permissions](/graph/permissions-reference).

<!-- {
"blockType": "permissions",
"name": "partners-permissions"
}
-->
[!INCLUDE [permissions-table](../includes/permissions/partners-permissions.md)]

## HTTP request

<!-- {
"blockType": "ignored"
}
-->
``` http
POST /reports/partners/billing/usage/billed/export
```

## Request headers

|Name|Description|
|:---|:---|
|Authorization|Bearer {token}. Required.|
|Content-Type|application/json. Required.|

## Request body

In the request body, supply a JSON representation of the parameters.

The following table shows the parameters that you can use with this action.

|Parameter|Type|Description|
|:---|:---|:---|
|attributeSet|[microsoft.graph.partners.billing.attributeSet](../resources/partners-billing-attributeset.md)|Attributes that should be exported. Possible values are: `full`, `basic`, `unknownFutureValue`. The default value is `full`. Choose `full` for a complete response or `basic` for a subset of attributes. Optional.|
|invoiceId|String|The invoice ID for which the partner requested to export data. Required.|

## Response

If successful, this method returns a `202 Accepted` response code and a `Location` header that contains the URL to the long-running operation. You can check the status of the long-running operation by making a GET request to this URL that returns one of the following objects in the response body: [microsoft.graph.partners.billing.runningOperation](../resources/partners-billing-runningoperation.md), [microsoft.graph.partners.billing.exportSuccessOperation](../resources/partners-billing-exportsuccessoperation.md), or [microsoft.graph.partners.billing.failedOperation](../resources/partners-billing-failedoperation.md).

## Examples

### Request

The following example shows a request.

<!-- {
"blockType": "request",
"name": "billedusagethis.export"
}
-->
``` http
POST https://graph.microsoft.com/v1.0/reports/partners/billing/usage/billed/export
Content-Type: application/json
{
"invoiceId" : "G016907411",
"attributeSet" : "full"
}
```

### Response

The following example shows the response.

<!-- {
"blockType": "response",
"truncated": true
}
-->
``` http
HTTP/1.1 202 OK
Location: https://graph.microsoft.com/v1.0/reports/partners/billing/operations/9ab9cb54-d07f-4f52-9ea6-a09d7de52c14
```
106 changes: 106 additions & 0 deletions api-reference/v1.0/api/partners-billing-manifest-get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
title: "Get manifest"
description: "Read the properties and relationships of a manifest object."
author: "sourishdeb"
ms.localizationpriority: medium
ms.prod: "reports"
doc_type: apiPageType
---

# Get manifest

Namespace: microsoft.graph.partners.billing

[!INCLUDE [alerts-callout-csp-partner-only](../includes/alerts-callout-csp-partner-only.md)]


Read the properties and relationships of a [manifest](../resources/partners-billing-manifest.md) object.

## Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see [Permissions](/graph/permissions-reference).

<!-- {
"blockType": "permissions",
"name": "partners-permissions"
}
-->
[!INCLUDE [permissions-table](../includes/permissions/partners-permissions.md)]

## HTTP request

<!-- {
"blockType": "ignored"
}
-->
``` http
GET /reports/partners/billing/manifests/{id}
```

## Optional query parameters

This method doesn't support any OData query parameters to help customize the response. For general information, see [OData query parameters](/graph/query-parameters).

## Request headers

|Name|Description|
|:---|:---|
|Authorization|Bearer {token}. Required.|

## Request body

Don't supply a request body for this method.

## Response

If successful, this method returns a `200 OK` response code and a [microsoft.graph.partners.billing.manifest](../resources/partners-billing-manifest.md) object in the response body.

## Examples

### Request

The following example shows a request.
<!-- {
"blockType": "request",
"name": "get_manifest"
}
-->
``` http
GET https://graph.microsoft.com/v1.0/reports/partners/billing/manifests/6fe687d7-1e0f-4bd6-9091-4672691f64bc
```

### Response

The following example shows the response.

>**Note:** The response object shown here might be shortened for readability.
<!-- {
"blockType": "response",
"truncated": true,
"@odata.type": "microsoft.graph.partners.billing.manifest"
}
-->
``` http
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "6fe687d7-1e0f-4bd6-9091-4672691f64bc",
"schemaVersion": "1",
"dataFormat": "compressedJSON",
"createdDateTime": "2023-03-09T06:34:34.87Z",
"eTag": "WYjLro78HdMg6vUWR",
"partnerTenantId": "0e195b37-4574-4539-bc42-0e539b9684c0",
"rootDirectory": "https://adlsreconbuprodeastus201.blob.core.windows.net/billedusagefastpath/v1/PartnerTenantId=0e195b37-4574-4539-bc42-0e539b9684c0/BillingMonth=202310/InvoiceId=G031809528/InvoiceVersion=202311/Fragment=basic/PartitionType=default",
"sasToken": "skoid=0c414a25-fd23-4785-815f-1258467f9ab7&sktid=975f013f-7f24-47e8-a7d3-abc4752bf346&skt=2023-12-13T00%3A37%3A17Z&ske=2023-12-14T00%3A37%3A17Z&sks=b&skv=2021-08-06&sv=2021-08-06&se=2023-12-13T12%3A37%3A17Z&sr=d&sp=rl&sdd=7&sig=RpVY0WBGUHJ2APB3N76jtMak8loAWY4oiA0%2FaoJX1bM%3D",
"partitionType": "Default",
"blobCount": 1,
"blobs": [
{
"name": "part-00049-b016029b-a7a7-4c46-9b5e-c925ac317ac6.c000.json.gz",
"partitionValue": "default"
}
]
}
```
Loading

0 comments on commit fe4cc61

Please sign in to comment.