Interface XLDAsCodeService
@Path("/xld-as-code/v1")
@Consumes({"application/xml","application/json"})
@Produces({"application/xml","application/json"})
public interface XLDAsCodeService
XLDAsCode service interface matching XLDAsCodeResource functionality.
Provides REST endpoints for DevOps-as-Code operations.
Similar to TaskBlockService, this interface can be accessed by:
- In-process workers: ServiceHolder.getXLDAsCodeService()
- External workers: via HTTP proxy from Proxies.getXLDAsCodeService()
-
Method Summary
Modifier and TypeMethodDescriptionApplies DevOps-as-Code YAML definition to create/update CIs.applyWithScm(String yamlContent, String scmType, String scmCommit, String scmAuthor, String scmDate, String scmMessage, String scmRemote, String scmFileName) Applies DevOps-as-Code YAML definition with SCM traceability data.generate(String path, boolean globalPermissions, boolean roles, boolean users, boolean includeSecrets, boolean includeDefaults) Generates YAML definitions from existing XL Deploy repository structure.
-
Method Details
-
apply
@POST @Path("/apply") @Consumes("text/plain") @Produces("application/xml") XLDAsCodeResult apply(String yamlContent) Applies DevOps-as-Code YAML definition to create/update CIs. Equivalent to XLDAsCodeResource.interpret()- Parameters:
yamlContent- The YAML definition content- Returns:
- XLDAsCodeResult indicating success/failure and details
-
applyWithScm
@POST @Path("/apply-with-scm") @Consumes("text/plain") @Produces("application/xml") XLDAsCodeResult applyWithScm(String yamlContent, @HeaderParam("X-Xebialabs-Scm-Type") String scmType, @HeaderParam("X-Xebialabs-Scm-Commit") String scmCommit, @HeaderParam("X-Xebialabs-Scm-Author") String scmAuthor, @HeaderParam("X-Xebialabs-Scm-Date") String scmDate, @HeaderParam("X-Xebialabs-Scm-Message") String scmMessage, @HeaderParam("X-Xebialabs-Scm-Remote") String scmRemote, @HeaderParam("X-Xebialabs-Scm-Filename") String scmFileName) Applies DevOps-as-Code YAML definition with SCM traceability data. This method allows passing source control information for Chain of Custody tracking. The SCMTraceabilityData is constructed internally from the individual parameters.- Parameters:
yamlContent- The YAML definition contentscmType- The type of SCM (e.g., "git")scmCommit- The commit hashscmAuthor- The commit author (e.g., "Name") scmDate- The commit date in ISO-8601 formatscmMessage- The commit messagescmRemote- The remote repository URLscmFileName- The YAML file name being applied- Returns:
- XLDAsCodeResult indicating success/failure and details
-
generate
@GET @Path("/generate") @Produces("application/xml") XLDAsCodeResult generate(@QueryParam("path") String path, @DefaultValue("false") @QueryParam("globalPermissions") boolean globalPermissions, @DefaultValue("false") @QueryParam("roles") boolean roles, @DefaultValue("false") @QueryParam("users") boolean users, @DefaultValue("false") @QueryParam("secrets") boolean includeSecrets, @DefaultValue("false") @QueryParam("defaults") boolean includeDefaults) Generates YAML definitions from existing XL Deploy repository structure. Equivalent to XLDAsCodeResource.generate()- Parameters:
path- Repository path to generate from (optional)globalPermissions- Include global permissions in generationroles- Include roles in generationusers- Include users in generationincludeSecrets- Include secrets in generationincludeDefaults- Include default values in generation- Returns:
- XLDAsCodeResult containing generated YAML content
-