Interface VersionsApi

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit createVersionRendition(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId, @Body() RenditionBodyCreate renditionBodyCreate) Create rendition for a file version Note: this endpoint is available in Alfresco 7.0.0 and newer versions.
      abstract Unit deleteVersion(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId) Delete a version Note: this endpoint is available in Alfresco 5.2 and newer versions.
      abstract VersionEntry getVersion(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId) Get version information Note: this endpoint is available in Alfresco 5.2 and newer versions.
      abstract ResponseBody getVersionContent(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId, @Query(value = "attachment") Boolean attachment, @Header(value = "If-Modified-Since") ZonedDateTime ifModifiedSince, @Header(value = "Range") String range) Get version content Note: this endpoint is available in Alfresco 5.2 and newer versions.
      abstract RenditionEntry getVersionRendition(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId, @Path(value = "renditionId") String renditionId) Get rendition information for a file version Note: this endpoint is available in Alfresco 7.0.0 and newer versions.
      abstract ResponseBody getVersionRenditionContent(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId, @Path(value = "renditionId") String renditionId, @Query(value = "attachment") Boolean attachment, @Header(value = "If-Modified-Since") ZonedDateTime ifModifiedSince, @Header(value = "Range") String range, @Query(value = "placeholder") Boolean placeholder) Get rendition content for a file version Note: this endpoint is available in Alfresco 7.0.0 and newer versions.
      abstract VersionPaging listVersionHistory(@Path(value = "nodeId") String nodeId, @Query(value = "include") List<String> include, @Query(value = "fields") List<String> fields, @Query(value = "skipCount") Integer skipCount, @Query(value = "maxItems") Integer maxItems) List version history Note: this endpoint is available in Alfresco 5.2 and newer versions.
      abstract RenditionPaging listVersionRenditions(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId, @Query(value = "where") String where) List renditions for a file version Note: this endpoint is available in Alfresco 7.0.0 and newer versions.
      abstract VersionEntry revertVersion(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId, @Body() RevertBody revertBody, @Query(value = "fields") List<String> fields) Revert a version Note: this endpoint is available in Alfresco 5.2 and newer versions.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • createVersionRendition

        @Headers(value = {"Content-Type: application/json"})@POST(value = "alfresco/versions/1/nodes/{nodeId}/versions/{versionId}/renditions") abstract Unit createVersionRendition(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId, @Body() RenditionBodyCreate renditionBodyCreate)

        Create rendition for a file version Note: this endpoint is available in Alfresco 7.0.0 and newer versions. An asynchronous request to create a rendition for version of file nodeId and versionId. The version rendition is specified by name id in the request body: ``JSON { \"id\":\"doclib\" } `` Multiple names may be specified as a comma separated list or using a list format: ``JSON [ { \"id\": \"doclib\" }, { \"id\": \"avatar\" } ] `` The endpoint is owned by defaultname service owner @param nodeId The identifier of a node. (required) @param versionId The identifier of a version, ie. version label, within the version history of a node. (required) @param renditionBodyCreate The rendition \"id\". (required)

      • deleteVersion

        @Headers(value = {"Content-Type: application/json"})@DELETE(value = "alfresco/versions/1/nodes/{nodeId}/versions/{versionId}") abstract Unit deleteVersion(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId)

        Delete a version Note: this endpoint is available in Alfresco 5.2 and newer versions. Delete the version identified by versionId and *nodeId. If the version is successfully deleted then the content and metadata for that versioned node will be deleted and will no longer appear in the version history. This operation cannot be undone. If the most recent version is deleted the live node will revert to the next most recent version. We currently do not allow the last version to be deleted. If you wish to clear the history then you can remove the \"cm:versionable\" aspect (via update node) which will also disable versioning. In this case, you can re-enable versioning by adding back the \"cm:versionable\" aspect or using the version params (majorVersion and comment) on a subsequent file content update. The endpoint is owned by defaultname service owner

        Parameters:
        nodeId - The identifier of a node.
        versionId - The identifier of a version, ie.
      • getVersion

        @Headers(value = {"Content-Type: application/json"})@GET(value = "alfresco/versions/1/nodes/{nodeId}/versions/{versionId}") abstract VersionEntry getVersion(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId)

        Get version information Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the version information for versionId of file node nodeId. The endpoint is owned by defaultname service owner

        Parameters:
        nodeId - The identifier of a node.
        versionId - The identifier of a version, ie.
      • getVersionContent

        @Headers(value = {"Content-Type: application/json"})@GET(value = "alfresco/versions/1/nodes/{nodeId}/versions/{versionId}/content") abstract ResponseBody getVersionContent(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId, @Query(value = "attachment") Boolean attachment, @Header(value = "If-Modified-Since") ZonedDateTime ifModifiedSince, @Header(value = "Range") String range)

        Get version content Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the version content for versionId of file node nodeId. The endpoint is owned by defaultname service owner

        Parameters:
        nodeId - The identifier of a node.
        versionId - The identifier of a version, ie.
        attachment - true enables a web browser to download the file as an attachment.
        ifModifiedSince - Only returns the content if it has been modified since the date provided.
        range - The Range header indicates the part of a document that the server should return.
      • getVersionRendition

        @Headers(value = {"Content-Type: application/json"})@GET(value = "alfresco/versions/1/nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}") abstract RenditionEntry getVersionRendition(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId, @Path(value = "renditionId") String renditionId)

        Get rendition information for a file version Note: this endpoint is available in Alfresco 7.0.0 and newer versions. Gets the rendition information for renditionId of version of file nodeId and versionId. The endpoint is owned by defaultname service owner

        Parameters:
        nodeId - The identifier of a node.
        versionId - The identifier of a version, ie.
        renditionId - The name of a thumbnail rendition, for example doclib, or pdf.
      • getVersionRenditionContent

        @Headers(value = {"Content-Type: application/json"})@GET(value = "alfresco/versions/1/nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content") abstract ResponseBody getVersionRenditionContent(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId, @Path(value = "renditionId") String renditionId, @Query(value = "attachment") Boolean attachment, @Header(value = "If-Modified-Since") ZonedDateTime ifModifiedSince, @Header(value = "Range") String range, @Query(value = "placeholder") Boolean placeholder)

        Get rendition content for a file version Note: this endpoint is available in Alfresco 7.0.0 and newer versions. Gets the rendition content for renditionId of version of file nodeId and versionId. The endpoint is owned by defaultname service owner

        Parameters:
        nodeId - The identifier of a node.
        versionId - The identifier of a version, ie.
        renditionId - The name of a thumbnail rendition, for example doclib, or pdf.
        attachment - true enables a web browser to download the file as an attachment.
        ifModifiedSince - Only returns the content if it has been modified since the date provided.
        range - The Range header indicates the part of a document that the server should return.
        placeholder - If true and there is no rendition for this nodeId and renditionId, then the placeholder image for the mime type of this rendition is returned, rather than a 404 response.
      • listVersionHistory

        @Headers(value = {"Content-Type: application/json"})@GET(value = "alfresco/versions/1/nodes/{nodeId}/versions") abstract VersionPaging listVersionHistory(@Path(value = "nodeId") String nodeId, @Query(value = "include") List<String> include, @Query(value = "fields") List<String> fields, @Query(value = "skipCount") Integer skipCount, @Query(value = "maxItems") Integer maxItems)

        List version history Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets the version history as an ordered list of versions for the specified nodeId. The list is ordered in descending modified order. So the most recent version is first and the original version is last in the list. The endpoint is owned by defaultname service owner

        Parameters:
        nodeId - The identifier of a node.
        include - Returns additional information about the version node.
        fields - A list of field names.
        skipCount - The number of entities that exist in the collection before those included in this list.
        maxItems - The maximum number of items to return in the list.
      • listVersionRenditions

        @Headers(value = {"Content-Type: application/json"})@GET(value = "alfresco/versions/1/nodes/{nodeId}/versions/{versionId}/renditions") abstract RenditionPaging listVersionRenditions(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId, @Query(value = "where") String where)

        List renditions for a file version Note: this endpoint is available in Alfresco 7.0.0 and newer versions. Gets a list of the rendition information for each rendition of the version of file nodeId and versionId, including the rendition id. Each rendition returned has a status: CREATED means it is available to view or download, NOT_CREATED means the rendition can be requested. You can use the where parameter to filter the returned renditions by status. For example, the following where clause will return just the CREATED renditions: `` (status='CREATED') `` The endpoint is owned by defaultname service owner @param nodeId The identifier of a node. (required) @param versionId The identifier of a version, ie. version label, within the version history of a node. (required) @param where A string to restrict the returned objects by using a predicate. (optional)

      • revertVersion

        @Headers(value = {"Content-Type: application/json"})@POST(value = "alfresco/versions/1/nodes/{nodeId}/versions/{versionId}/revert") abstract VersionEntry revertVersion(@Path(value = "nodeId") String nodeId, @Path(value = "versionId") String versionId, @Body() RevertBody revertBody, @Query(value = "fields") List<String> fields)

        Revert a version Note: this endpoint is available in Alfresco 5.2 and newer versions. Attempts to revert the version identified by versionId and nodeId to the live node. If the node is successfully reverted then the content and metadata for that versioned node will be promoted to the live node and a new version will appear in the version history. The endpoint is owned by defaultname service owner

        Parameters:
        nodeId - The identifier of a node.
        versionId - The identifier of a version, ie.
        revertBody - Optionally, specify a version comment and whether this should be a major version, or not.
        fields - A list of field names.