Namespace: microsoft.graph
Important
APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Get the properties of a goalsExportJob object in a Viva Goals organization.
This API is available in the following national cloud deployments.
Global service |
US Government L4 |
US Government L5 (DOD) |
China operated by 21Vianet |
✅ |
❌ |
❌ |
❌ |
Permissions
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type |
Least privileged permissions |
Higher privileged permissions |
Delegated (work or school account) |
Goals-Export.Read.All |
Not available. |
Delegated (personal Microsoft account) |
Not supported. |
Not supported. |
Application |
Not supported. |
Not supported. |
HTTP request
GET /employeeExperience/goals/exportJobs/{goalsExportJobId}
Optional query parameters
This method supports the $select
OData query parameter to help customize the response. For example, to select the specific properties (columns), add $select=id,goalsOrganizationId
.
For general information, see OData query parameters.
Request body
Don't supply a request body for this method.
Response
If successful, this method returns a 200 OK
response code and a goalsExportJob object in the response body.
The content of the resource downloads only when the status of the goalsExportJob object is succeeded
.
Name |
Description |
Retry-after |
Duration in seconds. Optional. |
Examples
The following examples show how to poll a goalsExportJob for a Viva Goals Explorer view and the different responses that are returned.
Example 1: Status is running
The initial request returns a 200 OK
response code along with Retry-After headers.
Request
The following example shows a request.
GET https://graph.microsoft.com/beta/employeeExperience/goals/exportJobs/j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In0
// 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.EmployeeExperience.Goals.ExportJobs["{goalsExportJob-id}"].GetAsync();
mgc-beta employee-experience goals export-jobs get --goals-export-job-id {goalsExportJob-id}
// 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"
//other-imports
)
// 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().ByGoalsExportJobId("goalsExportJob-id").Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
GoalsExportJob result = graphClient.employeeExperience().goals().exportJobs().byGoalsExportJobId("{goalsExportJob-id}").get();
const options = {
authProvider,
};
const client = Client.init(options);
let goalsExportJob = await client.api('/employeeExperience/goals/exportJobs/j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In0')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->employeeExperience()->goals()->exportJobs()->byGoalsExportJobId('goalsExportJob-id')->get()->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta 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.employee_experience.goals.export_jobs.by_goals_export_job_id('goalsExportJob-id').get()
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Retry-After: 60
Content-Type: application/json
{
"value": {
"@odata.type": "#microsoft.graph.goalsExportJob",
"id": "j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In0",
"status": "running",
"goalsOrganizationId": "9ab0fcab-c1d4-4b26-963b-a3c33155f853",
"explorerViewId": "2c8b5fd3-67c3-4677-8eb3-e0066c4d2fd7",
"createdDateTime": "2023-06-19T12-06-03.0024Z",
"expirationDateTime": "2023-07-29T12-06-03.0024Z"
}
}
Example 2: Status is succeeded
Request
The following example shows a request.
GET https://graph.microsoft.com/beta/employeeExperience/goals/exportJobs/j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In0
// 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.EmployeeExperience.Goals.ExportJobs["{goalsExportJob-id}"].GetAsync();
mgc-beta employee-experience goals export-jobs get --goals-export-job-id {goalsExportJob-id}
// 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"
//other-imports
)
// 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().ByGoalsExportJobId("goalsExportJob-id").Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
GoalsExportJob result = graphClient.employeeExperience().goals().exportJobs().byGoalsExportJobId("{goalsExportJob-id}").get();
const options = {
authProvider,
};
const client = Client.init(options);
let goalsExportJob = await client.api('/employeeExperience/goals/exportJobs/j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In0')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->employeeExperience()->goals()->exportJobs()->byGoalsExportJobId('goalsExportJob-id')->get()->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta 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.employee_experience.goals.export_jobs.by_goals_export_job_id('goalsExportJob-id').get()
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": {
"@odata.type": "#microsoft.graph.goalsExportJob",
"id": "j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In0",
"status": "succeeded",
"resourceLocation": "https://graph.microsoft.com/beta/employeeexperience/goals/exportJobs/j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In0/content",
"goalsOrganizationId": "9ab0fcab-c1d4-4b26-963b-a3c33155f853",
"explorerViewId": "2c8b5fd3-67c3-4677-8eb3-e0066c4d2fd7",
"createdDateTime": "2023-06-19T12-06-03.0024Z",
"expirationDateTime": "2023-07-29T12-06-03.0024Z"
}
}
Example 3: Status is notStarted
Request
The following example shows a request.
GET https://graph.microsoft.com/beta/employeeExperience/goals/exportJobs/j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In0
// 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.EmployeeExperience.Goals.ExportJobs["{goalsExportJob-id}"].GetAsync();
mgc-beta employee-experience goals export-jobs get --goals-export-job-id {goalsExportJob-id}
// 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"
//other-imports
)
// 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().ByGoalsExportJobId("goalsExportJob-id").Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
GoalsExportJob result = graphClient.employeeExperience().goals().exportJobs().byGoalsExportJobId("{goalsExportJob-id}").get();
const options = {
authProvider,
};
const client = Client.init(options);
let goalsExportJob = await client.api('/employeeExperience/goals/exportJobs/j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In0')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->employeeExperience()->goals()->exportJobs()->byGoalsExportJobId('goalsExportJob-id')->get()->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta 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.employee_experience.goals.export_jobs.by_goals_export_job_id('goalsExportJob-id').get()
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": {
"@odata.type": "#microsoft.graph.goalsExportJob",
"id": "j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In0",
"status": "notStarted",
"goalsOrganizationId": "9ab0fcab-c1d4-4b26-963b-a3c33155f853",
"explorerViewId": "2c8b5fd3-67c3-4677-8eb3-e0066c4d2fd7",
"createdDateTime": "2023-06-19T12-06-03.0024Z",
"expirationDateTime": "2023-07-29T12-06-03.0024Z"
}
}
Example 4: Specified goalsExportJobId isn't found
Request
The following example shows a request.
GET https://graph.microsoft.com/beta/employeeExperience/goals/exportJobs/j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In1
// 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.EmployeeExperience.Goals.ExportJobs["{goalsExportJob-id}"].GetAsync();
mgc-beta employee-experience goals export-jobs get --goals-export-job-id {goalsExportJob-id}
// 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"
//other-imports
)
// 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().ByGoalsExportJobId("goalsExportJob-id").Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
GoalsExportJob result = graphClient.employeeExperience().goals().exportJobs().byGoalsExportJobId("{goalsExportJob-id}").get();
const options = {
authProvider,
};
const client = Client.init(options);
let goalsExportJob = await client.api('/employeeExperience/goals/exportJobs/j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In1')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->employeeExperience()->goals()->exportJobs()->byGoalsExportJobId('goalsExportJob-id')->get()->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta 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.employee_experience.goals.export_jobs.by_goals_export_job_id('goalsExportJob-id').get()
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 404 Not Found
Content-type: application/json
{
"error": {
"code": "notFound",
"message": "Specified export job not found",
"innerError": {
"code": "exportJobNotFound",
"date": "String (Timestamp)",
"request-id": "String",
"client-request-id": "String"
}
}
}
Example 5: Invalid exportJobId is specified
Request
The following example shows a request.
GET https://graph.microsoft.com/beta/employeeExperience/goals/exportJobs/j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMj
// 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.EmployeeExperience.Goals.ExportJobs["{goalsExportJob-id}"].GetAsync();
mgc-beta employee-experience goals export-jobs get --goals-export-job-id {goalsExportJob-id}
// 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"
//other-imports
)
// 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().ByGoalsExportJobId("goalsExportJob-id").Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
GoalsExportJob result = graphClient.employeeExperience().goals().exportJobs().byGoalsExportJobId("{goalsExportJob-id}").get();
const options = {
authProvider,
};
const client = Client.init(options);
let goalsExportJob = await client.api('/employeeExperience/goals/exportJobs/j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMj')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->employeeExperience()->goals()->exportJobs()->byGoalsExportJobId('goalsExportJob-id')->get()->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta 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.employee_experience.goals.export_jobs.by_goals_export_job_id('goalsExportJob-id').get()
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 400 Bad Request
Content-type: application/json
{
"error": {
"code": "badRequest",
"message": "Invalid JobKey specified",
"innerError": {
"code": "unknown",
"date": "String (Timestamp)",
"request-id": "String",
"client-request-id": "String"
}
}
}
Example 6: Get the content of a successfully completed goalsExportJob resource
Request
The following example shows a request.
GET https://graph.microsoft.com/beta/employeeExperience/goals/exportJobs/j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In0/content
// 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
await graphClient.EmployeeExperience.Goals.ExportJobs["{goalsExportJob-id}"].Content.GetAsync();
mgc-beta employee-experience goals export-jobs content get --goals-export-job-id {goalsExportJob-id}
// 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"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.EmployeeExperience().Goals().ExportJobs().ByGoalsExportJobId("goalsExportJob-id").Content().Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
graphClient.employeeExperience().goals().exportJobs().byGoalsExportJobId("{goalsExportJob-id}").content().get();
const options = {
authProvider,
};
const client = Client.init(options);
let stream = await client.api('/employeeExperience/goals/exportJobs/j!eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI4MzIxMjc1In0/content')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$graphServiceClient->employeeExperience()->goals()->exportJobs()->byGoalsExportJobId('goalsExportJob-id')->content()->get()->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
await graph_client.employee_experience.goals.export_jobs.by_goals_export_job_id('goalsExportJob-id').content.get()
Response
The following example shows the response.
HTTP/1.1 200 OK
Content-type: text/csv
{
Model as EDM.Stream
}