Skip to content

Preview deterministic template changes without modifying Workspace UI source.

POST
/api/workspace/admin/ui-project/source-templates/preview
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" }'
  • None
access_token
string

Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.

Generate a deterministic Workspace UI source-template preview.

object
TemplateId

Stable template identifier.

string
nullable
BaseRevisionId

Working revision on which generation is based.

string
nullable
BaseSourceChecksum

Expected checksum of the working revision.

string
nullable
Key

Lowercase kebab-case page, component, store, or client key.

string
nullable
DisplayName

Human-readable title used in generated locale resources.

string
nullable
Icon

Optional MDI icon for a generated page manifest entry.

string
nullable
Layout
integer format: int32
Allowed values: 0 1
RoutePath

Optional strict relative route pattern. Page starters default to and require the named parameters :entityId and :instanceId.

string
nullable
FunctionKey

Exact published C# function key used by command and background-function client templates.

string
nullable

OK

Media typeapplication/json
object
Data

A deterministic, server-generated template preview against one immutable base revision.

object
Template

One deterministic Workspace UI source template available to authoring clients.

object
Id

Stable template identifier.

string
nullable
NameKey

Localization key for the template name.

string
nullable
DescriptionKey

Localization key for the template description.

string
nullable
CreatesMultipleFiles

Whether the template may update multiple source files atomically.

boolean
BaseRevisionId

Revision against which the preview was generated.

string
nullable
BaseSourceChecksum

Canonical source checksum of that revision.

string
nullable
Changes

Ordered generated changes that will be applied atomically.

Array<object>
nullable

One generated source-file change in a template preview.

object
Operation
integer format: int32
Allowed values: 0 1 2
Path

Canonical source path.

string
nullable
ContentUtf8

Deterministically generated UTF-8 content.

string
nullable
ExpectedContentHash

Expected current hash for an updated file.

string
nullable
CreatesFile

Whether the change creates a new file.

boolean
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"Changes": [
{
"Operation": 0
}
]
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Bad Request

Media typeapplication/json
object
Data

A deterministic, server-generated template preview against one immutable base revision.

object
Template

One deterministic Workspace UI source template available to authoring clients.

object
Id

Stable template identifier.

string
nullable
NameKey

Localization key for the template name.

string
nullable
DescriptionKey

Localization key for the template description.

string
nullable
CreatesMultipleFiles

Whether the template may update multiple source files atomically.

boolean
BaseRevisionId

Revision against which the preview was generated.

string
nullable
BaseSourceChecksum

Canonical source checksum of that revision.

string
nullable
Changes

Ordered generated changes that will be applied atomically.

Array<object>
nullable

One generated source-file change in a template preview.

object
Operation
integer format: int32
Allowed values: 0 1 2
Path

Canonical source path.

string
nullable
ContentUtf8

Deterministically generated UTF-8 content.

string
nullable
ExpectedContentHash

Expected current hash for an updated file.

string
nullable
CreatesFile

Whether the change creates a new file.

boolean
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"Changes": [
{
"Operation": 0
}
]
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Forbidden

Media typeapplication/json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Conflict

Media typeapplication/json
object
Data

A deterministic, server-generated template preview against one immutable base revision.

object
Template

One deterministic Workspace UI source template available to authoring clients.

object
Id

Stable template identifier.

string
nullable
NameKey

Localization key for the template name.

string
nullable
DescriptionKey

Localization key for the template description.

string
nullable
CreatesMultipleFiles

Whether the template may update multiple source files atomically.

boolean
BaseRevisionId

Revision against which the preview was generated.

string
nullable
BaseSourceChecksum

Canonical source checksum of that revision.

string
nullable
Changes

Ordered generated changes that will be applied atomically.

Array<object>
nullable

One generated source-file change in a template preview.

object
Operation
integer format: int32
Allowed values: 0 1 2
Path

Canonical source path.

string
nullable
ContentUtf8

Deterministically generated UTF-8 content.

string
nullable
ExpectedContentHash

Expected current hash for an updated file.

string
nullable
CreatesFile

Whether the change creates a new file.

boolean
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"Changes": [
{
"Operation": 0
}
]
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}