Class BlueprintApi

java.lang.Object
co.cloudcraft.api.ApiBase
co.cloudcraft.api.BlueprintApi

public class BlueprintApi extends ApiBase
  • Constructor Details

    • BlueprintApi

      public BlueprintApi(RestClient restClient)
  • Method Details

    • list

      List all of your saved blueprints.

      The response is an array of blueprint entries without the diagram data. Each entry includes the blueprint ID and name, access control and user information.

      Returns:
      List of blueprint entries without the diagram data
      Throws:
      CloudcraftException - when any error occurs exercising this API
    • create

      public Blueprint create(@NonNull @NonNull BlueprintRequest blueprintRequest) throws CloudcraftException
      Create a new blueprint. The response will contain the created blueprint, including the newly assigned ID
      Parameters:
      blueprintRequest - Blueprint document to be created.
      Returns:
      Created blueprint with additional metadata.
      Throws:
      CloudcraftException - when any error occurs exercising this API
    • get

      public Blueprint get(@NonNull @NonNull String blueprintId) throws CloudcraftException
      Retrieve one blueprint by ID
      Throws:
      CloudcraftException - when any error occurs exercising this API
    • update

      public void update(@NonNull @NonNull String blueprintId, @NonNull @NonNull BlueprintRequest blueprintRequest) throws CloudcraftException
      Update an existing blueprint by ID
      Throws:
      CloudcraftException - when any error occurs exercising this API
    • updateWithEtag

      public void updateWithEtag(@NonNull @NonNull String blueprintId, @NonNull @NonNull BlueprintRequest blueprintRequest, String eTag) throws CloudcraftException
      Update an existing blueprint by ID and the same ETag value as provided by the "Retrieve blueprint" API. If the blueprint has been modified since the retrieval, the update will be rejected with a 412 Resource out of date response.
      Throws:
      CloudcraftException - when any error occurs exercising this API
    • delete

      public void delete(@NonNull @NonNull String blueprintId) throws CloudcraftException
      Delete an existing blueprint by ID
      Throws:
      CloudcraftException - when any error occurs exercising this API
    • exportBlueprint

      public CloudcraftResponse exportBlueprint(@NonNull @NonNull String blueprintId, @NonNull ApiBase.BlueprintExportFormat format, ExportBlueprintQueryParams requestParams) throws CloudcraftException
      Render blueprint for export in SVG, PNG, PDF or MxGraph format. Consumer of this API can extract the response using the convenience APIs in CloudcraftResponse either in String or byte[] or JSON format.
      Parameters:
      blueprintId - blueprint identifier
      format - export format
      requestParams - optional parameters that
      Returns:
      CloudcraftResponse object
      Throws:
      CloudcraftException - when any error occurs exercising this API