Espacio de nombres: microsoft.graph.partners.billing
Nota:
Esta API está disponible para los partners proveedores de soluciones en la nube (CSP) solo para acceder a sus datos de conciliación facturados y no facturados de un inquilino. Para obtener más información sobre el programa CSP, consulte Proveedor de soluciones en la nube de Microsoft.
Lea las propiedades y relaciones de un objeto de operación .
Disponibilidad de API
Esta API está disponible en las siguientes implementaciones en la nube nacional.
| Servicio global |
Administración pública de EE. UU. |
Gobierno de EE. UU. L5 (DOD) |
China operado por 21Vianet |
| ✅ |
❌ |
❌ |
❌ |
Permisos
Se requiere uno de los siguientes permisos para llamar a esta API. Para obtener más información, incluido cómo elegir permisos, vea Permisos.
| Tipo de permiso |
Permisos con privilegios mínimos |
Permisos con privilegios más altos |
| Delegado (cuenta profesional o educativa) |
PartnerBilling.Read.All |
No disponible. |
| Delegado (cuenta personal de Microsoft) |
No admitida. |
No admitida. |
| Aplicación |
PartnerBilling.Read.All |
No disponible. |
Solicitud HTTP
GET /reports/partners/billing/operations/{id}
Parámetros de consulta opcionales
Este método no admite ningún parámetro de consulta OData para ayudar a personalizar la respuesta. Para obtener información general, vea Parámetros de consulta OData.
Cuerpo de la solicitud
No proporcione un cuerpo de solicitud para este método.
Respuesta
Si una operación se completa correctamente, este método devuelve un 200 OK código de respuesta y un objeto microsoft.graph.partners.billing.exportSuccessOperation en el cuerpo de la respuesta. La propiedad de navegación resourceLocation del cuerpo de la respuesta representa el recurso microsoft.graph.partners.billing.manifest para la operación.
Si se produce un error en una operación, este método devuelve un 200 OK código de respuesta y un objeto microsoft.graph.partners.billing.failedOperation en el cuerpo de la respuesta.
Si una operación sigue ejecutándose, este método devuelve un 200 OK código de respuesta y un objeto microsoft.graph.partners.billing.runningOperation en el cuerpo de la respuesta.
Ejemplos
Ejemplo 1: Operación realizada correctamente
Solicitud
En el ejemplo siguiente se muestra una solicitud que devuelve un objeto microsoft.graph.partners.billing.exportSuccessOperation .
GET https://graph.microsoft.com/v1.0/reports/partners/billing/operations/6fe687d7-1e0f-4bd6-9091-4672691f64bc
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Reports.Partners.Billing.Operations["{operation-id}"].GetAsync();
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
operations, err := graphClient.Reports().Partners().Billing().Operations().ByOperationId("operation-id").Get(context.Background(), nil)
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.partners.billing.Operation result = graphClient.reports().partners().billing().operations().byOperationId("{operation-id}").get();
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->reports()->partners()->billing()->operations()->byOperationId('operation-id')->get()->wait();
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.reports.partners.billing.operations.by_operation_id('operation-id').get()
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
Respuesta
En el ejemplo siguiente se muestra la respuesta de una operación que se completó correctamente.
Nota: Se puede acortar el objeto de respuesta que se muestra aquí para mejorar la legibilidad.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.partners.billing.exportSuccessOperation",
"id": "6fe687d7-1e0f-4bd6-9091-4672691f64bc",
"status": "succeeded",
"createdDateTime": "2023-03-09T08:12:53",
"lastActionDateTime": "2023-03-09T08:37:48.5046691Z",
"resourceLocation@odata.navigationLink": "https://graph.microsoft.com/v1.0/reports/partners/billing/manifests/8fe347d7-1e0f-4bd6-9091-4672691f32db"
}
Ejemplo 2: Error en la operación Get
Solicitud
En el ejemplo siguiente se muestra una solicitud que devuelve un objeto microsoft.graph.partners.billing.failedOperation .
GET https://graph.microsoft.com/v1.0/reports/partners/billing/operations/6fe687d7-1e0f-4bd6-9091-4672691f64bc
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Reports.Partners.Billing.Operations["{operation-id}"].GetAsync();
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
operations, err := graphClient.Reports().Partners().Billing().Operations().ByOperationId("operation-id").Get(context.Background(), nil)
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.partners.billing.Operation result = graphClient.reports().partners().billing().operations().byOperationId("{operation-id}").get();
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->reports()->partners()->billing()->operations()->byOperationId('operation-id')->get()->wait();
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.reports.partners.billing.operations.by_operation_id('operation-id').get()
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
Respuesta
En el ejemplo siguiente se muestra la respuesta de una operación con errores.
Nota: Se puede acortar el objeto de respuesta que se muestra aquí para mejorar la legibilidad.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.partners.billing.failedOperation",
"id": "6fe687d7-1e0f-4bd6-9091-4672691f64bc",
"status": "failed",
"createdDateTime": "2023-03-09T08:12:53",
"lastActionDateTime": "2023-03-09T08:37:48.5046691Z",
"error": {
"message": "No data available",
"code": "5000"
}
}
Ejemplo 3: La operación Get sigue en ejecución
Solicitud
En el ejemplo siguiente se muestra una solicitud que devuelve un objeto microsoft.graph.partners.billing.runningOperation .
GET https://graph.microsoft.com/v1.0/reports/partners/billing/operations/6fe687d7-1e0f-4bd6-9091-4672691f64bc
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Reports.Partners.Billing.Operations["{operation-id}"].GetAsync();
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
operations, err := graphClient.Reports().Partners().Billing().Operations().ByOperationId("operation-id").Get(context.Background(), nil)
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.models.partners.billing.Operation result = graphClient.reports().partners().billing().operations().byOperationId("{operation-id}").get();
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->reports()->partners()->billing()->operations()->byOperationId('operation-id')->get()->wait();
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.reports.partners.billing.operations.by_operation_id('operation-id').get()
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
Respuesta
En el ejemplo siguiente se muestra la respuesta de una operación que aún se está ejecutando.
Nota: Se puede acortar el objeto de respuesta que se muestra aquí para mejorar la legibilidad.
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.partners.billing.runningOperation",
"id": "6fe687d7-1e0f-4bd6-9091-4672691f64bc",
"status": "running",
"createdDateTime": "2023-03-09T08:12:53",
"lastActionDateTime": "2023-03-09T08:37:48.5046691Z"
}