Package co.cloudcraft.api
Class BlueprintApi
java.lang.Object
co.cloudcraft.api.ApiBase
co.cloudcraft.api.BlueprintApi
-
Nested Class Summary
Nested classes/interfaces inherited from class co.cloudcraft.api.ApiBase
ApiBase.BlueprintExportFormat, ApiBase.BudgetExportFormat -
Field Summary
Fields inherited from class co.cloudcraft.api.ApiBase
CONTENT_TYPE_HEADER_MAP, restClient -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(@NonNull BlueprintRequest blueprintRequest) Create a new blueprint.voidDelete an existing blueprint by IDexportBlueprint(@NonNull String blueprintId, ApiBase.BlueprintExportFormat format, ExportBlueprintQueryParams requestParams) Render blueprint for export in SVG, PNG, PDF or MxGraph format.Retrieve one blueprint by IDlist()List all of your saved blueprints.voidupdate(@NonNull String blueprintId, @NonNull BlueprintRequest blueprintRequest) Update an existing blueprint by IDvoidupdateWithEtag(@NonNull String blueprintId, @NonNull BlueprintRequest blueprintRequest, String eTag) Update an existing blueprint by ID and the same ETag value as provided by the "Retrieve blueprint" API.
-
Constructor Details
-
BlueprintApi
-
-
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
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
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 inCloudcraftResponseeither inStringorbyte[]orJSONformat.- Parameters:
blueprintId- blueprint identifierformat- export formatrequestParams- optional parameters that- Returns:
- CloudcraftResponse object
- Throws:
CloudcraftException- when any error occurs exercising this API
-