Preview deterministic template changes without modifying Workspace UI source.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/admin/ui-project/source-templates/preview"), Content = new StringContent("{ \"TemplateId\": \"example\", \"BaseRevisionId\": \"example\", \"BaseSourceChecksum\": \"example\", \"Key\": \"example\", \"DisplayName\": \"example\", \"Icon\": \"example\", \"Layout\": 0, \"RoutePath\": \"example\", \"FunctionKey\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/admin/ui-project/source-templates/preview';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"TemplateId":"example","BaseRevisionId":"example","BaseSourceChecksum":"example","Key":"example","DisplayName":"example","Icon":"example","Layout":0,"RoutePath":"example","FunctionKey":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workspace/admin/ui-project/source-templates/preview \ --header 'Content-Type: application/json' \ --data '{ "TemplateId": "example", "BaseRevisionId": "example", "BaseSourceChecksum": "example", "Key": "example", "DisplayName": "example", "Icon": "example", "Layout": 0, "RoutePath": "example", "FunctionKey": "example" }'Authorizations
Section titled “Authorizations”- None
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Body
Section titled “Request Body”Generate a deterministic Workspace UI source-template preview.
object
Stable template identifier.
Working revision on which generation is based.
Expected checksum of the working revision.
Lowercase kebab-case page, component, store, or client key.
Human-readable title used in generated locale resources.
Optional MDI icon for a generated page manifest entry.
Optional strict relative route pattern. Page starters default to and require the named parameters :entityId and :instanceId.
Exact published C# function key used by command and background-function client templates.
Generate a deterministic Workspace UI source-template preview.
object
Stable template identifier.
Working revision on which generation is based.
Expected checksum of the working revision.
Lowercase kebab-case page, component, store, or client key.
Human-readable title used in generated locale resources.
Optional MDI icon for a generated page manifest entry.
Optional strict relative route pattern. Page starters default to and require the named parameters :entityId and :instanceId.
Exact published C# function key used by command and background-function client templates.
Generate a deterministic Workspace UI source-template preview.
object
Stable template identifier.
Working revision on which generation is based.
Expected checksum of the working revision.
Lowercase kebab-case page, component, store, or client key.
Human-readable title used in generated locale resources.
Optional MDI icon for a generated page manifest entry.
Optional strict relative route pattern. Page starters default to and require the named parameters :entityId and :instanceId.
Exact published C# function key used by command and background-function client templates.
Responses
Section titled “Responses”OK
object
A deterministic, server-generated template preview against one immutable base revision.
object
One deterministic Workspace UI source template available to authoring clients.
object
Stable template identifier.
Localization key for the template name.
Localization key for the template description.
Whether the template may update multiple source files atomically.
Revision against which the preview was generated.
Canonical source checksum of that revision.
Ordered generated changes that will be applied atomically.
One generated source-file change in a template preview.
object
Canonical source path.
Deterministically generated UTF-8 content.
Expected current hash for an updated file.
Whether the change creates a new file.
object
object
object
object
Example
{ "Data": { "Changes": [ { "Operation": 0 } ] }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
A deterministic, server-generated template preview against one immutable base revision.
object
One deterministic Workspace UI source template available to authoring clients.
object
Stable template identifier.
Localization key for the template name.
Localization key for the template description.
Whether the template may update multiple source files atomically.
Revision against which the preview was generated.
Canonical source checksum of that revision.
Ordered generated changes that will be applied atomically.
One generated source-file change in a template preview.
object
Canonical source path.
Deterministically generated UTF-8 content.
Expected current hash for an updated file.
Whether the change creates a new file.
object
object
object
object
Example
{ "Data": { "Changes": [ { "Operation": 0 } ] }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Forbidden
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Conflict
object
A deterministic, server-generated template preview against one immutable base revision.
object
One deterministic Workspace UI source template available to authoring clients.
object
Stable template identifier.
Localization key for the template name.
Localization key for the template description.
Whether the template may update multiple source files atomically.
Revision against which the preview was generated.
Canonical source checksum of that revision.
Ordered generated changes that will be applied atomically.
One generated source-file change in a template preview.
object
Canonical source path.
Deterministically generated UTF-8 content.
Expected current hash for an updated file.
Whether the change creates a new file.
object
object
object
object
Example
{ "Data": { "Changes": [ { "Operation": 0 } ] }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}