名前空間: microsoft.graph
重要
Microsoft Graph の /beta バージョンの API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 v1.0 で API を使用できるかどうかを確認するには、Version セレクターを使用します。
Viva Goals organizationで新しい goalsExportJob オブジェクトを作成します。
この API は、次の国内クラウド展開で使用できます。
| グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
| ✅ |
❌ |
❌ |
❌ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
| アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
| 委任 (職場または学校のアカウント) |
Goals-Export.ReadWrite.All |
注意事項なし。 |
| 委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
| アプリケーション |
サポートされていません。 |
サポートされていません。 |
HTTP 要求
POST /employeeExperience/goals/exportJobs
| 名前 |
説明 |
| Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
| Content-type |
application/json. 必須です。 |
要求本文
要求本文で、 goalsExportJob オブジェクトの JSON 表現を指定します。
goalsExportJob オブジェクトを作成するときに、次のプロパティを指定できます。
エクスプローラー ビューの URL から goalsOrganizationId と explorerViewId の値を取得できます。
https://goals.microsoft.com/org_uuid/94a356ab-53d5-40e7-8a85-053d6d3b9eb3/objective-explorer?viewId=e5e7a3c1-8cdf-409d-9ce9-ff730d65d95e
- URL の
org_uuid は、この例では 94a356ab-53d5-40e7-8a85-053d6d3b9eb3、 goalsOrganizationId を表します。
- URL の
viewId (この例では e5e7a3c1-8cdf-409d-9ce9-ff730d65d95e)は explorerViewId を表します。
応答
成功した場合、このメソッドは応答コード 201 Created と、応答本文に goalsExportJob オブジェクトを返します。
このメソッドは、完了が保留中の既存の goalsExportJob オブジェクトと同じ値 (goalsOrganizationId と explorerViewId) を使用して goalsExportJob オブジェクトを作成しようとすると、409 Conflictも返します。
保留中のジョブが完了したら、新しい goalsExportJob オブジェクトを作成できます。
| 名前 |
説明 |
| 場所 |
操作の状態をチェックするために呼び出す URL。 必須です。 |
例
例 1: 状態は notStarted
要求
次の例は要求を示しています。
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)
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
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"
}
例 2: 状態は conflicting
要求
次の例は要求を示しています。
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)
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
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"
}
}
}
例 3: 指定された目標OrganizationId が存在しない
要求
次の例は要求を示しています。
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)
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
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"
}
}
}
例 4: 無効な goalsOrganizationId が渡される
要求
次の例は要求を示しています。
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)
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
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"
}
}
}