- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fabric API environment item publish state issue
I am looking at the Fabric API to get information about a custom environment item. After automatic code deployment (git sync) using DevOps, I want to check if an environment is not published and needs to be published.
I have a workspace with a custom environment that shows me that I have unpublished changes and the environment needs to be published. Using the API all states that are returned show a Success state (see code below). I don't see any other API which is able to get the publish state. Is it me or is the API result not correct?
We don't have a support contract yet, so I can't report this directly to MS.
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"type": "Environment",
"displayName": "custom_environment",
"description": "Environment",
"workspaceId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"properties": {
"$type": "EnvironmentArtifactPublicContent",
"publishDetails": {
"state": "Success",
"targetVersion": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"startTime": "2024-12-11T21:38:22.8400654Z",
"endTime": "2024-12-11T21:38:22.8400654Z",
"componentPublishInfo": {
"sparkLibraries": {
"state": "Success"
},
"sparkSettings": {
"state": "Success"
}
}
}
}
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So to actually detect if an environment needs to be published after updating the workspace from Git, is to compare the results of the API's for the staged and published Spark libraries and Spark settings. If there are difference in the libraries or settings, the environment needs to be published for the changes to apply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @nielsvdc
The API is reporting that your last publish operation completed successfully, which is technically correct.
The “List staging libraries” API includes information about both published and pending libraries. This could help identify if there are pending changes
Get Environment Definition API: This newly added API might provide more comprehensive information about the current definition state compared to what’s published
https://learn.microsoft.com/en-us/fabric/data-engineering/environment-public-api
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So to actually detect if an environment needs to be published after updating the workspace from Git, is to compare the results of the API's for the staged and published Spark libraries and Spark settings. If there are difference in the libraries or settings, the environment needs to be published for the changes to apply.

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
03-12-2025 07:03 AM | |||
03-11-2025 08:00 AM | |||
12-19-2024 11:57 AM | |||
02-05-2025 01:55 AM | |||
04-03-2024 06:38 AM |
User | Count |
---|---|
22 | |
18 | |
11 | |
8 | |
3 |
User | Count |
---|---|
31 | |
24 | |
21 | |
17 | |
12 |