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 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 content
      scmType - The type of SCM (e.g., "git")
      scmCommit - The commit hash
      scmAuthor - The commit author (e.g., "Name ")
      scmDate - The commit date in ISO-8601 format
      scmMessage - The commit message
      scmRemote - The remote repository URL
      scmFileName - 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 generation
      roles - Include roles in generation
      users - Include users in generation
      includeSecrets - Include secrets in generation
      includeDefaults - Include default values in generation
      Returns:
      XLDAsCodeResult containing generated YAML content
    • applyWithArtifactResolutions

      @POST @Path("/apply-with-artifacts") @Consumes("text/plain") @Produces("application/xml") XLDAsCodeResult applyWithArtifactResolutions(String yamlContent, @HeaderParam("X-Xebialabs-Artifact-Resolutions") String artifactFileUrisJson)
      Applies DevOps-as-Code YAML with pre-resolved artifact URIs. For GitOps import: YAML contains !file artifacts/<ciPath>/<filename> references. The caller provides a JSON-encoded map of file paths to internal URIs via header. After parsing, matching SourceArtifact CIs get their fileUri set from this map.
      Parameters:
      yamlContent - The YAML definition content (unchanged, with !file references)
      artifactFileUrisJson - JSON-encoded map of file path (e.g. "artifacts/Apps/myApp/1.0/war/file.war") to internal URI (e.g. "internal:<sha256>/file.war")
      Returns:
      XLDAsCodeResult indicating success/failure and details