Argh. Ens.StreamContainer#StreamSet silently overwrites OriginalFilename property.

Filename (%f) is empty:

// in is a character stream

#dim exportRequest = ##class(Ens.StreamContainer).%New()
set exportRequest.OriginalFilename = "foo"
set status = exportRequest.StreamSet(in)


Filename (%f) is "foo":

// in is a character stream

#dim exportRequest = ##class(Ens.StreamContainer).%New()
set status = exportRequest.StreamSet(in)
set exportRequest.OriginalFilename = "foo"

Yes that works, but I don't think the documentation agrees. https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic.... says:

The %f specifier if present will be replaced with the name of the document's original source filename (stripped of certain characters in target filenames - see CharacterSetToRemove)

If I can't set "the name of the document's original source filename" then IMO the documentation is wrong.

Based on the hint from @Stephen Canzano I figured out the following examples that seems to do the job:

/// How to programmatically access External-Service Registry:
/// https://docs.intersystems.com/irisforhealth20221/csp/docbook/DocBook.UI.Page.cls?KEY=EESB_registry_admin#EESB_registry_admin_external
Class OSEX.Ex.ExternalServiceRegistry Extends %RegisteredObject
{

/// list services
ClassMethod Ex1()
{
	#dim services // md
	do ##class(Ens.ServiceRegistry.External.API).ListServices(.services)
	
	#dim id as %Integer = $order(services(""))
	while (id '= "" ) {
		#dim val as %DynamicObject = {}.%FromJSON($get(services(id)))
		
		write "--------------------",!
		write "#"_id_" Name: "_val.Name,!
		write "#"_id_" Domain: "_val.Domain,!
		write "#"_id_" Version: "_val.Version,!
		write "#"_id_" exists: "_##class(Ens.ServiceRegistry.External.API).ExistsService(val.Name,val.Domain,val.Version),!
		write "#"_id_" json: "_val.%ToJSON(),!
		
		set id = $order(services(id))
	}
	
	//zw services
}

/// add/modify service
ClassMethod Ex2()
{
	#dim service = ##class(%ZEN.proxyObject).%New()
	set service.Name = "Foo Service"
	set service.Domain = "OSEX"
	set service.Version = "1"
	set service.Endpoint = "http://localhost:8080/foo"
	set service.Protocol = "REST"
	set service.ResponseStyle = "Sync"
	set service.Stage = "Live"
	
	zw service
	
	#dim status as %Status = ##class(Ens.ServiceRegistry.External.API).SaveService(service)
	zw status
	
	set service.Name = "Bar Service"
	set service.Endpoint = "http://localhost:8080/bar"

	zw ##class(Ens.ServiceRegistry.External.API).SaveService(service)
}

/// delete service
ClassMethod Ex3()
{
	#dim pid as %String = "Foo Service||OSEX||1"
	#dim status as %String = ##class(Ens.ServiceRegistry.External.API).DeleteService(pid)
	zw status
}

}

Is UserErrors a magic string that somehow connects the message dictionary with $system.Status?
I don't see the string mentioned in https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls... nor anywhere in the documentation.

I was able to google https://community.intersystems.com/post/registering-new-error-code-and-e... that seems identical to this post.

About your second point: If you are new to git I recommend studying a git tutorial to get the basics and terminology right. When you know how git works most of those menu options will become self-evident as they match standard git operations. The internet  has plenty of git material but one "authoritative" source and a good starting point is https://git-scm.com/book/en/v2