Namespace: microsoft.graph
Wichtig
Die APIs unter der /beta Version in Microsoft Graph können sich ändern. Die Verwendung dieser APIs in Produktionsanwendungen wird nicht unterstützt. Um festzustellen, ob eine API in v1.0 verfügbar ist, verwenden Sie die Version Selektor.
Erstellen Sie ein neues goalsExportJob-Objekt in einem Viva Goals organization.
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
| Weltweiter Service |
US Government L4 |
US Government L5 (DOD) |
China, betrieben von 21Vianet |
| ✅ |
❌ |
❌ |
❌ |
Berechtigungen
Wählen Sie die Berechtigungen aus, die für diese API als am wenigsten privilegiert markiert sind. Verwenden Sie eine höhere Berechtigung oder Berechtigungen nur, wenn Ihre App dies erfordert. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.
| Berechtigungstyp |
Berechtigungen mit den geringsten Berechtigungen |
Berechtigungen mit höheren Berechtigungen |
| Delegiert (Geschäfts-, Schul- oder Unikonto) |
Goals-Export.ReadWrite.All |
Nicht verfügbar. |
| Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
| Application |
Nicht unterstützt |
Nicht unterstützt |
HTTP-Anforderung
POST /employeeExperience/goals/exportJobs
Anforderungstext
Geben Sie im Anforderungstext eine JSON-Darstellung des Objekts goalsExportJob an.
Sie können die folgenden Eigenschaften angeben, wenn Sie ein goalsExportJob-Objekt erstellen.
| Eigenschaft |
Typ |
Beschreibung |
| goalsOrganizationId |
Zeichenfolge |
Der eindeutige Bezeichner des Viva Goals organization. |
| explorerViewId |
Zeichenfolge |
Der eindeutige Bezeichner der zu exportierenden Exploreransicht. |
Sie können die Werte für goalsOrganizationId und explorerViewId aus der URL einer Explorer Ansicht abrufen.
https://goals.microsoft.com/org_uuid/94a356ab-53d5-40e7-8a85-053d6d3b9eb3/objective-explorer?viewId=e5e7a3c1-8cdf-409d-9ce9-ff730d65d95e
- Das
org_uuid in der URL in diesem Beispiel 94a356ab-53d5-40e7-8a85-053d6d3b9eb3stellt die goalsOrganizationId dar.
- Die
viewId in der URL stellt in diesem Beispiel e5e7a3c1-8cdf-409d-9ce9-ff730d65d95edie explorerViewId dar.
Antwort
Bei erfolgreicher Ausführung gibt die Methode den 201 Created Antwortcode und ein goalsExportJob-Objekt im Antworttext zurück.
Diese Methode gibt auch zurück 409 Conflict , wenn Sie versuchen, ein goalsExportJob-Objekt mit denselben Werten (goalsOrganizationId und explorerViewId) wie ein vorhandenes goalsExportJob-Objekt zu erstellen, das aussteht.
Wenn der ausstehende Auftrag abgeschlossen ist, können Sie das neue objekt goalsExportJob erstellen.
| Name |
Beschreibung |
| Location |
Url, die aufgerufen werden soll, um die status des Vorgangs zu überprüfen. Erforderlich. |
Beispiele
Beispiel 1: Status ist notStarted
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
POST https://graph.microsoft.com/beta/employeeExperience/goals/exportJobs
Content-Type: application/json
{
"goalsOrganizationId": "String",
"explorerViewId": "String"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new GoalsExportJob
{
GoalsOrganizationId = "String",
ExplorerViewId = "String",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.EmployeeExperience.Goals.ExportJobs.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewGoalsExportJob()
goalsOrganizationId := "String"
requestBody.SetGoalsOrganizationId(&goalsOrganizationId)
explorerViewId := "String"
requestBody.SetExplorerViewId(&explorerViewId)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
exportJobs, err := graphClient.EmployeeExperience().Goals().ExportJobs().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
GoalsExportJob goalsExportJob = new GoalsExportJob();
goalsExportJob.setGoalsOrganizationId("String");
goalsExportJob.setExplorerViewId("String");
GoalsExportJob result = graphClient.employeeExperience().goals().exportJobs().post(goalsExportJob);
const options = {
authProvider,
};
const client = Client.init(options);
const goalsExportJob = {
goalsOrganizationId: 'String',
explorerViewId: 'String'
};
await client.api('/employeeExperience/goals/exportJobs')
.version('beta')
.post(goalsExportJob);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\GoalsExportJob;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new GoalsExportJob();
$requestBody->setGoalsOrganizationId('String');
$requestBody->setExplorerViewId('String');
$result = $graphServiceClient->employeeExperience()->goals()->exportJobs()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.goals_export_job import GoalsExportJob
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = GoalsExportJob(
goals_organization_id = "String",
explorer_view_id = "String",
)
result = await graph_client.employee_experience.goals.export_jobs.post(request_body)
Antwort
Das folgende Beispiel zeigt die Antwort.
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 201 Created
Content-Type: application/json
Location: "https://graph.microsoft.com/beta/employeeexperience/goals/exportJobs/j!uJJZyGd87hGFgvZV8bl-GlCBmj39kL1Cl3clung9SgU"
{
"@odata.type": "#microsoft.graph.goalsExportJob",
"id": "9eb0bfa0-eaa1-b225-1f83-54ae3e711753",
"createdDateTime": "String (timestamp)",
"status": "String"
}
Beispiel 2: Status ist conflicting
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
POST https://graph.microsoft.com/beta/employeeExperience/goals/exportJobs
Content-Type: application/json
{
"goalsOrganizationId": "String",
"explorerViewId": "String"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new GoalsExportJob
{
GoalsOrganizationId = "String",
ExplorerViewId = "String",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.EmployeeExperience.Goals.ExportJobs.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewGoalsExportJob()
goalsOrganizationId := "String"
requestBody.SetGoalsOrganizationId(&goalsOrganizationId)
explorerViewId := "String"
requestBody.SetExplorerViewId(&explorerViewId)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
exportJobs, err := graphClient.EmployeeExperience().Goals().ExportJobs().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
GoalsExportJob goalsExportJob = new GoalsExportJob();
goalsExportJob.setGoalsOrganizationId("String");
goalsExportJob.setExplorerViewId("String");
GoalsExportJob result = graphClient.employeeExperience().goals().exportJobs().post(goalsExportJob);
const options = {
authProvider,
};
const client = Client.init(options);
const goalsExportJob = {
goalsOrganizationId: 'String',
explorerViewId: 'String'
};
await client.api('/employeeExperience/goals/exportJobs')
.version('beta')
.post(goalsExportJob);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\GoalsExportJob;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new GoalsExportJob();
$requestBody->setGoalsOrganizationId('String');
$requestBody->setExplorerViewId('String');
$result = $graphServiceClient->employeeExperience()->goals()->exportJobs()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.goals_export_job import GoalsExportJob
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = GoalsExportJob(
goals_organization_id = "String",
explorer_view_id = "String",
)
result = await graph_client.employee_experience.goals.export_jobs.post(request_body)
Antwort
Das folgende Beispiel zeigt die Antwort.
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 409 Conflict
Content-type: application/json
Location: "https://graph.microsoft.com/beta/employeeexperience/goals/exportJobs/j!uJJZyGd87hGFgvZV8bl-GlCBmj39kL1Cl3clung9SgU"
{
"error":
{
"code": "notAllowed",
"message": "Another export job is still active or waiting to be executed",
"target": "j!uJJZyGd87hGFgvZV8bl-GlCBmj39kL1Cl3clung9SgU",
"innererror":
{
"code": "exportJobAlreadyExists",
"date": "String (timestamp)",
"request-id": "String",
"client-request-id": "String"
}
}
}
Beispiel 3: Angegebene goalsOrganizationId ist nicht vorhanden
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
POST https://graph.microsoft.com/beta/employeeExperience/goals/exportJobs
Content-Type: application/json
{
"goalsOrganizationId": "String",
"explorerViewId": "String"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new GoalsExportJob
{
GoalsOrganizationId = "String",
ExplorerViewId = "String",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.EmployeeExperience.Goals.ExportJobs.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewGoalsExportJob()
goalsOrganizationId := "String"
requestBody.SetGoalsOrganizationId(&goalsOrganizationId)
explorerViewId := "String"
requestBody.SetExplorerViewId(&explorerViewId)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
exportJobs, err := graphClient.EmployeeExperience().Goals().ExportJobs().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
GoalsExportJob goalsExportJob = new GoalsExportJob();
goalsExportJob.setGoalsOrganizationId("String");
goalsExportJob.setExplorerViewId("String");
GoalsExportJob result = graphClient.employeeExperience().goals().exportJobs().post(goalsExportJob);
const options = {
authProvider,
};
const client = Client.init(options);
const goalsExportJob = {
goalsOrganizationId: 'String',
explorerViewId: 'String'
};
await client.api('/employeeExperience/goals/exportJobs')
.version('beta')
.post(goalsExportJob);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\GoalsExportJob;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new GoalsExportJob();
$requestBody->setGoalsOrganizationId('String');
$requestBody->setExplorerViewId('String');
$result = $graphServiceClient->employeeExperience()->goals()->exportJobs()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.goals_export_job import GoalsExportJob
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = GoalsExportJob(
goals_organization_id = "String",
explorer_view_id = "String",
)
result = await graph_client.employee_experience.goals.export_jobs.post(request_body)
Antwort
Das folgende Beispiel zeigt die Antwort.
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 404 Not Found
Content-type: application/json
{
"error": {
"code": "notFound",
"message": "Goals organization not found",
"innerError": {
"code": "goalsOrganizationIdNotFound",
"date": "String (timestamp)",
"request-id": "String",
"client-request-id": "String"
}
}
}
Beispiel 4: Ungültige goalsOrganizationId wird übergeben
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
POST https://graph.microsoft.com/beta/employeeExperience/goals/exportJobs
Content-Type: application/json
{
"goalsOrganizationId": "String",
"explorerViewId": "String"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new GoalsExportJob
{
GoalsOrganizationId = "String",
ExplorerViewId = "String",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.EmployeeExperience.Goals.ExportJobs.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewGoalsExportJob()
goalsOrganizationId := "String"
requestBody.SetGoalsOrganizationId(&goalsOrganizationId)
explorerViewId := "String"
requestBody.SetExplorerViewId(&explorerViewId)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
exportJobs, err := graphClient.EmployeeExperience().Goals().ExportJobs().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
GoalsExportJob goalsExportJob = new GoalsExportJob();
goalsExportJob.setGoalsOrganizationId("String");
goalsExportJob.setExplorerViewId("String");
GoalsExportJob result = graphClient.employeeExperience().goals().exportJobs().post(goalsExportJob);
const options = {
authProvider,
};
const client = Client.init(options);
const goalsExportJob = {
goalsOrganizationId: 'String',
explorerViewId: 'String'
};
await client.api('/employeeExperience/goals/exportJobs')
.version('beta')
.post(goalsExportJob);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\GoalsExportJob;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new GoalsExportJob();
$requestBody->setGoalsOrganizationId('String');
$requestBody->setExplorerViewId('String');
$result = $graphServiceClient->employeeExperience()->goals()->exportJobs()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.goals_export_job import GoalsExportJob
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = GoalsExportJob(
goals_organization_id = "String",
explorer_view_id = "String",
)
result = await graph_client.employee_experience.goals.export_jobs.post(request_body)
Antwort
Das folgende Beispiel zeigt die Antwort.
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 400 Bad Request
Content-type: application/json
{
"error": {
"code": "badRequest",
"message": "'GoalsOrganizationId' must be specified in 'Export Job', and it should be a valid GUID.",
"innerError": {
"code": "invalidGoalsOrganizationId",
"date": "String (timestamp)",
"request-id": "String",
"client-request-id": "String"
}
}
}