Oracle Beehive
  Oracle® Beehive RESTful Web Services API Reference
  Release 2 (2.0.1.7)
  E16658-04

Contents

Document

Apply Label

Applies a label to an entity. Note that the returned LabelApplication uses an EMPTY projection

URI: /comb/v1/d/adoc/label/apply/{id}

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

labelid

Query

LabelHandle of the Label to be applied

type

Query

Restricted to:

  • PRIVATE
  • PUBLIC

Label application type

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

Request Payload: No Request Payload

Response Payload: labelApplication

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid value specified for query parameter
400
Required header not specified
400
Required query parameter not specified
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates applying a label on a single Document item.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId1" - beeId of an item to be labelled
    // * @param "labelId" - beeId of the label to be applied
    // *
    // * @return The item "LabelApplication" object
    // *
    label: function(
        bhUtils,
        myBeeId1,
        labelId) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc/label/apply/" + myBeeId1.id;

        // Build-out query parameters. Note that this is a simple example
        // meant to highlight Beehive code, not javascript best practices.
        // ====
        // Parameter name: labelid
        // Description: null
        // Mandatory: true
        // ====
        // ====
        // Parameter name: type
        // Description: null
        // Mandatory: true
        // Values: PRIVATE, PUBLIC
        // ====
        resourceURI += "?labelid=" + labelId.id
            + "&type=PUBLIC";


        // Create the XMLHttpRequest object. For simplicity, the code within
        // "bhUtils" abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP POST method for this request
        xmlHttpRequest.open("POST",
            resourceURI,
            false);

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Send the request to the server
        xmlHttpRequest.send(null);

        // Check return code. Anything other than 200 is considered an error
        if (xmlHttpRequest.status != 200) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }

        // Deserialize the JSON return. Since this is a simple example, the
        // deserialization code has been moved into "bhUtils"
        var result = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

        return result;
    }

Apply Label Batch

Applies label to a collection of entities

URI: /comb/v1/d/adoc/label/apply

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

labelid

Query

LabelHandle of the Label to be applied

type

Query

Restricted to:

  • PRIVATE
  • PUBLIC

Label application type

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: beeIdList<entity>

Response Payload: listResult<labelApplication>

Fault: restFault

Details: (expand)

HTTP Status Description
400
Batch size exceeded
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates application of a label on several Document
    // * items.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId1" - beeId of an item to label
    // * @param "myBeeId2" - beeId of an item to label
    // * @param "myBeeId3" - beeId of an item to label
    // * @param "labelId" - beeId of the label to be applied
    // *
    // * @return An array containing "LabelApplication" objects
    // *
    labelBatch: function(
        bhUtils,
        myBeeId1,
        myBeeId2,
        myBeeId3,
        labelId) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc/label/apply";

        // Build-out query parameters. Note that this is a simple example
        // meant to highlight Beehive code, not javascript best practices.
        // ====
        // Parameter name: labelid
        // Description: null
        // Mandatory: true
        // ====
        // ====
        // Parameter name: type
        // Description: null
        // Mandatory: true
        // Values: PRIVATE, PUBLIC
        // ====
        resourceURI += "?labelid=" + labelId.id
            + "&type=PUBLIC";

        // Create list of IDs to label
        var myIDs = {
            beeType:"beeIdList",
            beeId: [
                {"beeType": "beeId", "id": myBeeId1.id},
                {"beeType": "beeId", "id": myBeeId2.id},
                {"beeType": "beeId", "id": myBeeId3.id}
            ]
        };


        // Create the XMLHttpRequest object. For simplicity, the code within
        // "bhUtils" abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP POST method for this request
        xmlHttpRequest.open("POST",
            resourceURI,
            false);

        // Set the content type indicating to the server the payload is JSON
        // format
        xmlHttpRequest.setRequestHeader("Content-type", "application/json");

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Serialize payload as JSON. To simplify these examples, JSON
        // serialization is maintained in bhUtils
        var payload = bhUtils.serializeJSON(myIDs);

        // Send the request to the server
        xmlHttpRequest.send(payload);

        // Check return code. Anything other than 200 is considered an error
        if (xmlHttpRequest.status != 200) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }

        // Deserialize the JSON return. Since this is a simple example, the
        // deserialization code has been moved into "bhUtils"
        var result = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

        return result;
    }

Cancel Check-out

Cancels the checkout of a checked-out Document.

URI: /comb/v1/d/adoc/checkout/cancel/{id}

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

snapshotid

Query

Used to enforce optimistic locking as the family's snapshot id is updated by this operation

projection

Query

Restricted to:

  • BASIC
  • EMPTY
  • FULL

Projection with which to load the returned family versionable

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

Request Payload: No Request Payload

Response Payload: Versionable

Fault: restFault

Details: (expand)

HTTP Status Description
400
Entity not checked-out
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid value specified for query parameter
400
Required header not specified
400
Required query parameter not specified
406
Unsupported value in Accept header
500
Internal error occurred

Check-in

Check-in a single Document.

URI: /comb/v1/d/adoc/checkin/{id}

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

version_name

Query

Name to assign to the new version

snapshotid

Query

Current snapshot id of the family (not of the Version) on the client to enforce optimistic locking.

projection

Query

Restricted to:

  • BASIC
  • EMPTY
  • FULL

Projection with which to load the updated family versionable snapshot

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: versionUpdater

Response Payload: Versionable

Fault: restFault

Details: (expand)

HTTP Status Description
400
Entity not checked-out
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates checking-in a single Document item.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId" - beeId of an item to check-in
    // *
    // * @return TODO - Fill this up
    // *
    checkin: function(
        bhUtils,
        myBeeId) {
        // TODO - This has to be implemented manually
    }

Check-out

Check-out a single Document.

URI: /comb/v1/d/adoc/checkout/{id}

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

checkout_comments

Query

Comments describing the nature of the checkout

snapshotid

Query

projection

Query

Restricted to:

  • BASIC
  • EMPTY
  • FULL

Projection to use when loading the resultant family snapshot

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

Request Payload: No Request Payload

Response Payload: Versionable

Fault: restFault

Details: (expand)

HTTP Status Description
400
Configuration on a scope of folder is not defined
400
Entity is checked-out
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid value specified for query parameter
400
Required header not specified
400
Required query parameter not specified
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates checking-out a single Document item.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId" - beeId of an item to check-out
    // *
    // * @return TODO - Fill this up
    // *
    checkout: function(
        bhUtils,
        myBeeId) {
        // TODO - This has to be implemented manually
    }

Copy

Copy a single Document object into a different folder

URI: /comb/v1/d/adoc/copy/{id}

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

destination

Query

The destination folder

conflict_resolution_mode

Query

Restricted to:

  • ABORT
  • CREATE_UNIQUE
  • OVERWRITE
  • VERSION_OVERWRITE

How to resolve name clash on the copy

projection

Query

Restricted to:

  • BASIC
  • BASIC_WITH_CONTENT
  • DAV_BASIC
  • EMPTY
  • EMPTY_WITH_PATH
  • FULL
  • FULL_WITH_LOCK_SNAPSHOTS
  • FULL_WITH_REPR_VERSION
  • META

Projection to use when loading the copy

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

Request Payload: No Request Payload

Response Payload: document

Fault: restFault

Details: (expand)

HTTP Status Description
400
Entity is checked-out
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid value specified for query parameter
400
Missing attributes
400
Name conflict occurred
400
Required header not specified
400
Required query parameter not specified
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates copying a single Document item.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId" - beeId of an item to copy
    // * @param "copyTarget" - Destination of the copy
    // *
    // * @return The item created by the copy
    // *
    copy: function(
        bhUtils,
        myBeeId,
        copyTarget) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc/copy/" + myBeeId.id;

        // Build-out query parameters. Note that this is a simple example
        // meant to highlight Beehive code, not javascript best practices.
        // ====
        // Parameter name: conflictresolutionmode
        // Description: null
        // Mandatory: true
        // Values: OVERWRITE, ABORT, CREATE_UNIQUE, VERSION_OVERWRITE
        // ====
        // ====
        // Parameter name: target
        // Description: null
        // Mandatory: true
        // ====
        resourceURI += "?" +
            "target=" + copyTarget.id +
            "&conflictresolutionmode=ABORT";


        // Create the XMLHttpRequest object. For simplicity, the code within
        // "bhUtils" abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP POST method for this request
        xmlHttpRequest.open("POST",
            resourceURI,
            false);

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Send the request to the server
        xmlHttpRequest.send(null);

        // Check return code. Anything other than 200 is considered an error
        if (xmlHttpRequest.status != 200) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }

        // Deserialize the JSON return. Since this is a simple example, the
        // deserialization code has been moved into "bhUtils"
        var result = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

        return result;
    }

Copy Batch

Copy one or more Document objects into another HeterogeneousFolder

URI: /comb/v1/d/adoc/copy

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

destination

Query

The destination folder

conflict_resolution_mode

Query

Restricted to:

  • ABORT
  • CREATE_UNIQUE
  • OVERWRITE
  • VERSION_OVERWRITE

How to resolve name clashes on the copies

projection

Query

Restricted to:

  • BASIC
  • BASIC_WITH_CONTENT
  • DAV_BASIC
  • EMPTY
  • EMPTY_WITH_PATH
  • FULL
  • FULL_WITH_LOCK_SNAPSHOTS
  • FULL_WITH_REPR_VERSION
  • META

The projection to use for loading the snapshots

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: beeIdList<document>

Response Payload: list<document>

Fault: restFault

Details: (expand)

HTTP Status Description
400
Batch size exceeded
400
Entity is checked-out
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
Missing attributes
400
Name conflict occurred
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
404
No entity exists with the specified ID
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates copying several Document items.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId1" - beeId of an item to copy
    // * @param "myBeeId2" - beeId of an item to copy
    // * @param "myBeeId3" - beeId of an item to copy
    // * @param "copyTarget" - Destination of the copy
    // *
    // * @return An array containing the items created by the copy
    // *
    copyBatch: function(
        bhUtils,
        myBeeId1,
        myBeeId2,
        myBeeId3,
        copyTarget) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc/copy";

        // Build-out query parameters. Note that this is a simple example
        // meant to highlight Beehive code, not javascript best practices.
        // ====
        // Parameter name: conflictresolutionmode
        // Description: null
        // Mandatory: true
        // Values: OVERWRITE, ABORT, CREATE_UNIQUE, VERSION_OVERWRITE
        // ====
        // ====
        // Parameter name: target
        // Description: null
        // Mandatory: true
        // ====
        resourceURI += "?" +
            "target=" + copyTarget.id +
            "&conflictresolutionmode=ABORT";

        // Create list of IDs to copy
        var myIDs = {
            beeType:"beeIdList",
            beeId: [
                {"beeType": "beeId", "id": myBeeId1.id},
                {"beeType": "beeId", "id": myBeeId2.id},
                {"beeType": "beeId", "id": myBeeId3.id}
            ]
        };


        // Create the XMLHttpRequest object. For simplicity, the code within
        // "bhUtils" abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP POST method for this request
        xmlHttpRequest.open("POST",
            resourceURI,
            false);

        // Set the content type indicating to the server the payload is JSON
        // format
        xmlHttpRequest.setRequestHeader("Content-type", "application/json");

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Serialize payload as JSON. To simplify these examples, JSON
        // serialization is maintained in bhUtils
        var payload = bhUtils.serializeJSON(myIDs);

        // Send the request to the server
        xmlHttpRequest.send(payload);

        // Check return code. Anything other than 200 is considered an error
        if (xmlHttpRequest.status != 200) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }

        // Deserialize the JSON return. Since this is a simple example, the
        // deserialization code has been moved into "bhUtils"
        var result = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

        return result;
    }

Create

Create a new Document. Note there are two components to a Document: its metadata and its content. Metadata is represented by the argument payload. The content must have been previously uploaded to the server.

URI: /comb/v1/d/adoc

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

uploadscope

Query

The upload scope string used while uploading the associated content and/or attachment(s)

projection

Query

Restricted to:

  • BASIC
  • BASIC_WITH_CONTENT
  • DAV_BASIC
  • EMPTY
  • EMPTY_WITH_PATH
  • FULL
  • FULL_WITH_LOCK_SNAPSHOTS
  • FULL_WITH_REPR_VERSION
  • META

The projection to use for loading the entity

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: documentCreator

Response Payload: document

Fault: restFault

Details: (expand)

HTTP Status Description
400
Entity already exists
400
Entity not checked-out
400
Error processing "runas" value
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
Name conflict occurred
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
406
Unsupported value in Accept header
409
Operation conflicts with another pending operation
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates creating a Document item.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "name" - Name of the item to be created
    // * @param "parent" - Parent container in which item is to be created
    // * @param "content" - Content of the document
    // *
    // * @return The newly created item
    // *
    create: function(
        bhUtils,
        name,
        parent,
        content) {
        // First upload the content
        // All uploads require a scope
        var scope = bhUtils.makeRandomName("uploadscope");

        // The URI for the upload
        var resourceURI = "/comb/v1/d/upload?uploadscope=" + scope;

        // Create the XMLHttpRequest object. For simplicity, the code within
        // bhUtils abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        xmlHttpRequest.open("POST",
            resourceURI,
            false);

        // All uploaded content needs a Content-Id header
        var contentId = bhUtils.makeRandomName("cid");
        xmlHttpRequest.setRequestHeader("Content-Id", contentId);

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Send the request to the server
        xmlHttpRequest.send(content);

        // Validate that the upload succeeded
        if (xmlHttpRequest.status != 201) {
            // An error occurred and a failure object will be returned.
            // Deserialize the JSON return. Since this is a simple example,
            // the deserialization code has been moved into bhUtils
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }

        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc";

        // Build-out query parameters. Note that this is a simple example
        // meant to highlight Beehive code, not javascript best practices.
        // ====
        // Parameter name: uploadscope
        // Description: null
        // Mandatory: true
        // ====
        resourceURI += "?uploadscope=" + scope;

        var creator = {
            "beeType": "documentCreator",
            "name": name,
            "conflictResolutionMode": "OVERWRITE",
            "parent": parent,
            "updater":{
                "beeType": "documentUpdater",
                "description": "Sample document",
                "contentUpdater": {
                    "beeType": "identifiableSimpleContentUpdater",
                    "piecewiseUpdate": "false",
                    "mediaType": "image/gif"
                }
            }
        };

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP POST method for this request
        xmlHttpRequest.open("POST",
            resourceURI,
            false);

        // Set the content type indicating to the server the payload is JSON
        // format
        xmlHttpRequest.setRequestHeader("Content-type", "application/json");

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Serialize payload as JSON. To simplify these examples, JSON
        // serialization is maintained in bhUtils
        var payload = bhUtils.serializeJSON(creator);

        // Send the request to the server
        xmlHttpRequest.send(payload);

        // Check return code. Anything other than 201 is considered an error
        if (xmlHttpRequest.status != 201) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }

        // Deserialize the JSON return. Since this is a simple example, the
        // deserialization code has been moved into "bhUtils"
        var result = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

        return result;
    }

Delete

Permanently delete a single Document.

URI: /comb/v1/d/adoc/{id}

HTTP Method: DELETE

Request Parameters: (expand)

Name Style Required Description

snapshotid

Query

The DeleteMode to use when purging the document.

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

Request Payload: No Request Payload

Response Payload: pendingWorkflowStatus

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid value specified for query parameter
400
Required header not specified
400
Required query parameter not specified
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates purging a single Document item.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId" - beeId of an item to delete
    // *
    // * @return This function does not return anything
    // *
    deleteMethod: function(
        bhUtils,
        myBeeId) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc/" + myBeeId.id;


        // Create the XMLHttpRequest object. For simplicity, the code within
        // "bhUtils" abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP DELETE method for this request
        xmlHttpRequest.open("DELETE",
            resourceURI,
            false);

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Send the request to the server
        xmlHttpRequest.send(null);

        // Check return code. Anything other than 204 is considered an error
        if (xmlHttpRequest.status != 204) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }
        return;
    }

Delete Batch

Permanently delete one or more Document objects.

URI: /comb/v1/d/adoc/delete

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: beeIdList<document>

Response Payload: No Response Payload

Fault: restFault

Details: (expand)

HTTP Status Description
200
Partial failure of operation on a batch of entities
400
Batch size exceeded
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
404
No entity exists with the specified ID
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates purging several Document items.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId1" - beeId of an item to delete
    // * @param "myBeeId2" - beeId of an item to delete
    // * @param "myBeeId3" - beeId of an item to delete
    // *
    // * @return This function does not return anything
    // *
    deleteBatch: function(
        bhUtils,
        myBeeId1,
        myBeeId2,
        myBeeId3) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc/delete";

        // Create list of IDs to delete
        var myIDs = {
            beeType:"beeIdList",
            beeId: [
                {"beeType": "beeId", "id": myBeeId1.id},
                {"beeType": "beeId", "id": myBeeId2.id},
                {"beeType": "beeId", "id": myBeeId3.id}
            ]
        };


        // Create the XMLHttpRequest object. For simplicity, the code within
        // "bhUtils" abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP POST method for this request
        xmlHttpRequest.open("POST",
            resourceURI,
            false);

        // Set the content type indicating to the server the payload is JSON
        // format
        xmlHttpRequest.setRequestHeader("Content-type", "application/json");

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Serialize payload as JSON. To simplify these examples, JSON
        // serialization is maintained in bhUtils
        var payload = bhUtils.serializeJSON(myIDs);

        // Send the request to the server
        xmlHttpRequest.send(payload);

        // Check return code. Anything other than 204 is considered an error
        if (xmlHttpRequest.status != 204) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }
        return;
    }

Discuss

Discuss an Artifact

URI: /comb/v1/d/adoc/discuss/{id}

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

subject

Query

The subject of the first message in the new Topic

projection

Query

Restricted to:

  • BASIC
  • BASIC_WITH_DISC_CHANGE_STATUS
  • EMPTY
  • FULL
  • FULL_WITH_LOCK_SNAPSHOTS
  • META
  • META_WITH_DISC_CHANGE_STATUS

The projection specifying the details that should be returned in the Topic snapshot. Projection.EMPTY is the base case.

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: topicUpdater

Response Payload: topic

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
406
Unsupported value in Accept header
500
Internal error occurred

Get Team Collaboration URL

Return the URL for the specified Document.

URI: /comb/v1/d/adoc/teamcollab/{id}

HTTP Method: GET

Request Parameters: (expand)

Name Style Required Description

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

Request Payload: No Request Payload

Response Payload: teamCollaborationURL

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid value specified for query parameter
400
Required header not specified
406
Unsupported value in Accept header
500
Internal error occurred

List

List the Document objects in a HeterogeneousFolder.

URI: /comb/v1/d/adoc/list

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

parent

Query

Handle of the parent heterogeneous folder.

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: predicateAndSortListParameters

Predicates Supported: (expand)

Sort Criteria Supported: (expand)

Response Payload: listResult<document>

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
406
Unsupported value in Accept header
500
Internal error occurred

List Activity Stream

List activities related to given entity

URI: /comb/v1/d/adoc/activity/{id}

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: predicateListParameters

Response Payload: listResult<entityActivity>

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
406
Unsupported value in Accept header
500
Internal error occurred

Lock

Lock an entity

URI: /comb/v1/d/adoc/lock/{id}

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

lock_type

Query

Restricted to:

  • ALL
  • DAV
  • USER_REQUEST
  • VERSION
  • WORKFLOW

The type of lock to acquire.

snapshotid

Query

Can be used to check for optimistic locking on the Lockable entity.

projection

Query

Restricted to:

  • EMPTY
  • FULL_WITH_LOCK_SNAPSHOTS

Projection specifying the attributes to load in the returned Lockable. Whenever Projection.BASIC or higher is passed in, the Lock snapshots for the getLocks() attribute of the Lockable will be loaded with Projection.BASIC, such that the caller can tell the ID of the newly-acquired lock based on its lock type.

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: lockUpdater

Response Payload: Lockable

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
406
Unsupported value in Accept header
409
Entity state has changed
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates locking a single Document item.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId" - beeId of an item to lock
    // *
    // * @return TODO - Fill this up
    // *
    lock: function(
        bhUtils,
        myBeeId) {
        // TODO - This has to be implemented manually
    }

Move

Move a Document to another HeterogeneousFolder

URI: /comb/v1/d/adoc/move/{id}

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

destination

Query

The destination folder

conflict_resolution_mode

Query

Restricted to:

  • ABORT
  • CREATE_UNIQUE
  • OVERWRITE
  • VERSION_OVERWRITE

How to resolve name clash on the move

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

Request Payload: No Request Payload

Response Payload: pendingWorkflowStatus

Fault: restFault

Details: (expand)

HTTP Status Description
400
Entity is checked-out
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid value specified for query parameter
400
Missing attributes
400
Name conflict occurred
400
Required header not specified
400
Required query parameter not specified
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates moving a single Document item.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId" - beeId of an item to move
    // * @param "moveTarget" - Destination of the move
    // *
    // * @return This function does not return anything
    // *
    move: function(
        bhUtils,
        myBeeId,
        moveTarget) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc/move/" + myBeeId.id;

        // Build-out query parameters. Note that this is a simple example
        // meant to highlight Beehive code, not javascript best practices.
        // ====
        // Parameter name: conflictresolutionmode
        // Description: null
        // Mandatory: true
        // Values: OVERWRITE, ABORT, CREATE_UNIQUE, VERSION_OVERWRITE
        // ====
        // ====
        // Parameter name: target
        // Description: null
        // Mandatory: true
        // ====
        resourceURI += "?" +
            "target=" + moveTarget.id +
            "&conflictresolutionmode=ABORT";


        // Create the XMLHttpRequest object. For simplicity, the code within
        // "bhUtils" abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP POST method for this request
        xmlHttpRequest.open("POST",
            resourceURI,
            false);

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Send the request to the server
        xmlHttpRequest.send(null);

        // Check return code. Anything other than 204 is considered an error
        if (xmlHttpRequest.status != 204) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }
        return;
    }

Move Batch

Move one or more Document objects into another HeterogeneousFolder.

URI: /comb/v1/d/adoc/move

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

destination

Query

The destination folder

conflict_resolution_mode

Query

Restricted to:

  • ABORT
  • CREATE_UNIQUE
  • OVERWRITE
  • VERSION_OVERWRITE

How to resolve name clash on the move

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: beeIdList<document>

Response Payload: list<pendingWorkflowStatus>

Fault: restFault

Details: (expand)

HTTP Status Description
400
Batch size exceeded
400
Entity is checked-out
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
Missing attributes
400
Name conflict occurred
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
404
No entity exists with the specified ID
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates moving several Document items.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId1" - beeId of an item to move
    // * @param "myBeeId2" - beeId of an item to move
    // * @param "myBeeId3" - beeId of an item to move
    // * @param "moveTarget" - Destination of the move
    // *
    // * @return This function does not return anything
    // *
    moveBatch: function(
        bhUtils,
        myBeeId1,
        myBeeId2,
        myBeeId3,
        moveTarget) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc/move";

        // Build-out query parameters. Note that this is a simple example
        // meant to highlight Beehive code, not javascript best practices.
        // ====
        // Parameter name: conflictresolutionmode
        // Description: null
        // Mandatory: true
        // Values: OVERWRITE, ABORT, CREATE_UNIQUE, VERSION_OVERWRITE
        // ====
        // ====
        // Parameter name: target
        // Description: null
        // Mandatory: true
        // ====
        resourceURI += "?" +
            "target=" + moveTarget.id +
            "&conflictresolutionmode=ABORT";

        // Create list of IDs to move
        var myIDs = {
            beeType:"beeIdList",
            beeId: [
                {"beeType": "beeId", "id": myBeeId1.id},
                {"beeType": "beeId", "id": myBeeId2.id},
                {"beeType": "beeId", "id": myBeeId3.id}
            ]
        };


        // Create the XMLHttpRequest object. For simplicity, the code within
        // "bhUtils" abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP POST method for this request
        xmlHttpRequest.open("POST",
            resourceURI,
            false);

        // Set the content type indicating to the server the payload is JSON
        // format
        xmlHttpRequest.setRequestHeader("Content-type", "application/json");

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Serialize payload as JSON. To simplify these examples, JSON
        // serialization is maintained in bhUtils
        var payload = bhUtils.serializeJSON(myIDs);

        // Send the request to the server
        xmlHttpRequest.send(payload);

        // Check return code. Anything other than 204 is considered an error
        if (xmlHttpRequest.status != 204) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }
        return;
    }

Move Batch to Trash

Move one or more Document objects from their current location into the Beehive Trash. Returns the IDs of the Trash Items resulting from the operation

URI: /comb/v1/d/adoc/trash

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

projection

Query

Restricted to:

  • BASIC
  • EMPTY
  • EMPTY_WITH_DELETEDENTITY
  • FULL
  • META

Projection to use for the trash items.

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: beeIdList<document>

Response Payload: list<trashItem>

Fault: restFault

Details: (expand)

HTTP Status Description
200
Partial failure of operation on a batch of entities
400
Batch size exceeded
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
404
No entity exists with the specified ID
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates deleting several Document items.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId1" - beeId of an item to trash
    // * @param "myBeeId2" - beeId of an item to trash
    // * @param "myBeeId3" - beeId of an item to trash
    // *
    // *
    trashBatch: function(
        bhUtils,
        myBeeId1,
        myBeeId2,
        myBeeId3) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc/trash";

        // Create list of IDs to trash
        var myIDs = {
            beeType:"beeIdList",
            beeId: [
                {"beeType": "beeId", "id": myBeeId1.id},
                {"beeType": "beeId", "id": myBeeId2.id},
                {"beeType": "beeId", "id": myBeeId3.id}
            ]
        };


        // Create the XMLHttpRequest object. For simplicity, the code within
        // "bhUtils" abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP POST method for this request
        xmlHttpRequest.open("POST",
            resourceURI,
            false);

        // Set the content type indicating to the server the payload is JSON
        // format
        xmlHttpRequest.setRequestHeader("Content-type", "application/json");

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Serialize payload as JSON. To simplify these examples, JSON
        // serialization is maintained in bhUtils
        var payload = bhUtils.serializeJSON(myIDs);

        // Send the request to the server
        xmlHttpRequest.send(payload);

        // Check return code. Anything other than 200 is considered an error
        if (xmlHttpRequest.status != 200) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }

        // Deserialize the JSON return. Since this is a simple example, the
        // deserialization code has been moved into "bhUtils"
        var result = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

        return result;
    }

Move to Trash

Move a single Document object into the Trash.

URI: /comb/v1/d/adoc/trash/{id}

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

snapshotid

Query

determine if the entity should always be deleted or if optimistic locking should be used.

projection

Query

Restricted to:

  • BASIC
  • EMPTY
  • EMPTY_WITH_DELETEDENTITY
  • FULL
  • META

Projection to use when loading the TrashItem.

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

Request Payload: No Request Payload

Response Payload: trashItem

Fault: restFault

Details: (expand)

HTTP Status Description
200
Partial failure of operation on a batch of entities
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid value specified for query parameter
400
Required header not specified
400
Required query parameter not specified
406
Unsupported value in Accept header
500
Internal error occurred

Read

Retreive a single Document.

URI: /comb/v1/d/adoc/{id}

HTTP Method: GET

Request Parameters: (expand)

Name Style Required Description

projection

Query

Restricted to:

  • BASIC
  • BASIC_WITH_CONTENT
  • DAV_BASIC
  • EMPTY
  • EMPTY_WITH_PATH
  • FULL
  • FULL_WITH_LOCK_SNAPSHOTS
  • FULL_WITH_REPR_VERSION
  • META

Projection specifying the attributes to load in the returned Document. See document for complete semantics of the attributes loaded with each projection.

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

Request Payload: No Request Payload

Response Payload: document

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid value specified for query parameter
400
Required header not specified
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates reading a single Document item.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId" - beeId of an item to read
    // *
    // * @return The item read
    // *
    read: function(
        bhUtils,
        myBeeId) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc/" + myBeeId.id;


        // Create the XMLHttpRequest object. For simplicity, the code within
        // "bhUtils" abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP GET method for this request
        xmlHttpRequest.open("GET",
            resourceURI,
            false);

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Send the request to the server
        xmlHttpRequest.send(null);

        // Check return code. Anything other than 200 is considered an error
        if (xmlHttpRequest.status != 200) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }

        // Deserialize the JSON return. Since this is a simple example, the
        // deserialization code has been moved into "bhUtils"
        var result = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

        return result;
    }

Read Access Control

Reads entity access control fields

URI: /comb/v1/d/adoc/ac/{id}

HTTP Method: GET

Request Parameters: (expand)

Name Style Required Description

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

Request Payload: No Request Payload

Response Payload: accessControlFields

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid value specified for query parameter
400
Required header not specified
406
Unsupported value in Accept header
500
Internal error occurred

Read Batch

Retrieves one or more Document objects from the server

URI: /comb/v1/d/adoc/read

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

projection

Query

Restricted to:

  • BASIC
  • BASIC_WITH_CONTENT
  • DAV_BASIC
  • EMPTY
  • EMPTY_WITH_PATH
  • FULL
  • FULL_WITH_LOCK_SNAPSHOTS
  • FULL_WITH_REPR_VERSION
  • META

Projection specifying the attributes to load in the returned Document. See document for complete semantics of the attributes loaded with each projection.

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: beeIdList<document>

Response Payload: list<document>

Fault: restFault

Details: (expand)

HTTP Status Description
400
Batch size exceeded
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates reading several Document items.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId1" - beeId of an item to read
    // * @param "myBeeId2" - beeId of an item to read
    // * @param "myBeeId3" - beeId of an item to read
    // *
    // * @return An array containing the items read
    // *
    readBatch: function(
        bhUtils,
        myBeeId1,
        myBeeId2,
        myBeeId3) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc/read";

        // Create list of IDs to read
        var myIDs = {
            beeType:"beeIdList",
            beeId: [
                {"beeType": "beeId", "id": myBeeId1.id},
                {"beeType": "beeId", "id": myBeeId2.id},
                {"beeType": "beeId", "id": myBeeId3.id}
            ]
        };


        // Create the XMLHttpRequest object. For simplicity, the code within
        // "bhUtils" abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP POST method for this request
        xmlHttpRequest.open("POST",
            resourceURI,
            false);

        // Set the content type indicating to the server the payload is JSON
        // format
        xmlHttpRequest.setRequestHeader("Content-type", "application/json");

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Serialize payload as JSON. To simplify these examples, JSON
        // serialization is maintained in bhUtils
        var payload = bhUtils.serializeJSON(myIDs);

        // Send the request to the server
        xmlHttpRequest.send(payload);

        // Check return code. Anything other than 200 is considered an error
        if (xmlHttpRequest.status != 200) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }

        // Deserialize the JSON return. Since this is a simple example, the
        // deserialization code has been moved into "bhUtils"
        var result = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

        return result;
    }

Read Content

Read a Document content. Unlike many other access points in the API, the return is not structured data in XML/JSON, etc format. The return is the streamed contents of a Document, unencoded.

URI: /comb/v1/d/adoc/content/{id}

HTTP Method: GET

Request Parameters: (expand)

Name Style Required Description

preferred_content_type

Query

Use this parameter to specify a Content-Type header in the response headers. If unspecified, the default Content-Type of "application/octet-stream" is used.

preferred_filename

Query

Use this parameter to specify a filename in the Content-Disposition header in the response headers. If unspecified, then no Content-Disposition header is included in the response.

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

Request Payload: No Request Payload

Response Payload: Raw Data

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid value specified for query parameter
400
Required header not specified
406
Unsupported value in Accept header
500
Internal error occurred

Remove Label

Remove the label applied from an entity

URI: /comb/v1/d/adoc/label/remove/{id}

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

labelid

Query

LabelHandle of the Label to be removed

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

Request Payload: No Request Payload

Response Payload: No Response Payload

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid value specified for query parameter
400
Required header not specified
400
Required query parameter not specified
406
Unsupported value in Accept header
500
Internal error occurred

Remove Label Batch

Removes the label applied from a collection of entities

URI: /comb/v1/d/adoc/label/remove

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

labelid

Query

LabelHandle of the Label to be removed

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: beeIdList<entity>

Response Payload: No Response Payload

Fault: restFault

Details: (expand)

HTTP Status Description
400
Batch size exceeded
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
406
Unsupported value in Accept header
500
Internal error occurred

Undelete

Restore a single Document by moving from the Trash into either its previous location or a new container.

URI: /comb/v1/d/adoc/undelete/{id}

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

new_name

Query

determine if the entity should be recovered with a new name or parent folder

projection

Query

Restricted to:

  • BASIC
  • BASIC_WITH_CONTENT
  • DAV_BASIC
  • EMPTY
  • EMPTY_WITH_PATH
  • FULL
  • FULL_WITH_LOCK_SNAPSHOTS
  • FULL_WITH_REPR_VERSION
  • META

Projection to use when loading the returned document

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

Request Payload: No Request Payload

Response Payload: document

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid value specified for query parameter
400
Required header not specified
400
Required query parameter not specified
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates undeleting a single Document item.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId" - beeId of an item to undelete
    // * @param "newlocation" - Location where undeleted item is to be restored
    // *
    // * @return The undeleted item
    // *
    undelete: function(
        bhUtils,
        myBeeId,
        newlocation) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc/undelete/" + myBeeId.id;

        // Build-out query parameters. Note that this is a simple example
        // meant to highlight Beehive code, not javascript best practices.
        // ====
        // Parameter name: newlocation
        // Description: null
        // Mandatory: false
        // ====
        // ====
        // Parameter name: newname
        // Description: null
        // Mandatory: false
        // ====
        resourceURI += "?newlocation=" +
            newlocation.id;

        // Create the XMLHttpRequest object. For simplicity, the code within
        // "bhUtils" abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP POST method for this request
        xmlHttpRequest.open("POST",
            resourceURI,
            false);

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Send the request to the server
        xmlHttpRequest.send(null);

        // Check return code. Anything other than 200 is considered an error
        if (xmlHttpRequest.status != 200) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }

        // Deserialize the JSON return. Since this is a simple example, the
        // deserialization code has been moved into "bhUtils"
        var result = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

        return result;
    }

Undelete Batch

Restore one or more Document objects which were previously moved to Trash

URI: /comb/v1/d/adoc/undelete

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

new_name

Query

determine if the entities should be recovered with a new name or parent folder Note that if the new name option is specified, all entities will be renamed to this name, with an appendage to keep name uniqueness.

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: beeIdList<document>

Response Payload: No Response Payload

Fault: restFault

Details: (expand)

HTTP Status Description
400
Batch size exceeded
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
404
No entity exists with the specified ID
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates undeleting several Document items.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId1" - beeId of an item to undelete
    // * @param "myBeeId2" - beeId of an item to undelete
    // * @param "myBeeId3" - beeId of an item to undelete
    // * @param "newlocation" - Location where the undelete items to be restored
    // *
    // * @return An array containing the undeleted items
    // *
    undeleteBatch: function(
        bhUtils,
        myBeeId1,
        myBeeId2,
        myBeeId3,
        newlocation) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc/undelete";

        // Build-out query parameters. Note that this is a simple example
        // meant to highlight Beehive code, not javascript best practices.
        // ====
        // Parameter name: newlocation
        // Description: null
        // Mandatory: false
        // ====
        // ====
        // Parameter name: newname
        // Description: null
        // Mandatory: false
        // ====
        resourceURI += "?newlocation=" +
            newlocation.id;

        // Create list of IDs to undelete
        var myIDs = {
            beeType:"beeIdList",
            beeId: [
                {"beeType": "beeId", "id": myBeeId1.id},
                {"beeType": "beeId", "id": myBeeId2.id},
                {"beeType": "beeId", "id": myBeeId3.id}
            ]
        };


        // Create the XMLHttpRequest object. For simplicity, the code within
        // "bhUtils" abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP POST method for this request
        xmlHttpRequest.open("POST",
            resourceURI,
            false);

        // Set the content type indicating to the server the payload is JSON
        // format
        xmlHttpRequest.setRequestHeader("Content-type", "application/json");

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Serialize payload as JSON. To simplify these examples, JSON
        // serialization is maintained in bhUtils
        var payload = bhUtils.serializeJSON(myIDs);

        // Send the request to the server
        xmlHttpRequest.send(payload);

        // Check return code. Anything other than 200 is considered an error
        if (xmlHttpRequest.status != 200) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }

        // Deserialize the JSON return. Since this is a simple example, the
        // deserialization code has been moved into "bhUtils"
        var result = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

        return result;
    }

Unlock

Remove a user-requested lock from an entity

URI: /comb/v1/d/adoc/unlock/{id}

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

lock_type

Query

Restricted to:

  • ALL
  • DAV
  • USER_REQUEST
  • VERSION
  • WORKFLOW

The type of lock to remove from the specified entity.

projection

Query

Restricted to:

  • EMPTY
  • FULL_WITH_LOCK_SNAPSHOTS

Projection specifying the attributes to load in the returned Lockable. The getLocks() attribute will always load the remaining locks with Projection.EMPTY.

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

Request Payload: No Request Payload

Response Payload: Lockable

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid value specified for query parameter
400
Required header not specified
400
Required query parameter not specified
406
Unsupported value in Accept header
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates unlocking a single Document item.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId" - beeId of an item to unlock
    // *
    // * @return TODO - Fill this up
    // *
    unlock: function(
        bhUtils,
        myBeeId) {
        // TODO - This has to be implemented manually
    }

Update

Update a Document and optionally, its content. Note there are two components to a document: its metadata and its content. Metadata is represented by the argument payload. The content must have been previously uploaded to the server.

URI: /comb/v1/d/adoc/{id}

HTTP Method: PUT

Request Parameters: (expand)

Name Style Required Description

snapshotid

Query

determine if the entity should always be updated or if optimistic locking should be used.

uploadscope

Query

The upload scope string used while uploading the associated content and/or attachment(s)

projection

Query

Restricted to:

  • BASIC
  • BASIC_WITH_CONTENT
  • DAV_BASIC
  • EMPTY
  • EMPTY_WITH_PATH
  • FULL
  • FULL_WITH_LOCK_SNAPSHOTS
  • FULL_WITH_REPR_VERSION
  • META

The projection to use for loading the entity

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: documentUpdater

Response Payload: document

Fault: restFault

Details: (expand)

HTTP Status Description
400
Entity not checked-out
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
Name conflict occurred
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
406
Unsupported value in Accept header
409
Entity state has changed
409
Operation conflicts with another pending operation
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates updating the description of a single Document
    // * item.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId" - beeId of an item to update
    // * @param "description" - New description to be udpated
    // *
    // * @return The updated item
    // *
    update: function(
        bhUtils,
        myBeeId,
        description) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adoc/" + myBeeId.id;

        var updater = {
            "beeType": "documentUpdater",
            "description": description
        };

        // Create the XMLHttpRequest object. For simplicity, the code within
        // "bhUtils" abstracts the cross-platform differences in creating the
        // XMLHttpRequest object
        var xmlHttpRequest = bhUtils.getXMLHttpRequest();

        // Setup the XMLHttpRequest object for the action required
        // Note that you must use the HTTP PUT method for this request
        xmlHttpRequest.open("PUT",
            resourceURI,
            false);

        // Set the content type indicating to the server the payload is JSON
        // format
        xmlHttpRequest.setRequestHeader("Content-type", "application/json");

        // Tell the server we want the returned object to be in JSON format
        // via the HTTP "Accept" header
        xmlHttpRequest.setRequestHeader("Accept", "application/json");

        // Serialize payload as JSON. To simplify these examples, JSON
        // serialization is maintained in bhUtils
        var payload = bhUtils.serializeJSON(updater);

        // Send the request to the server
        xmlHttpRequest.send(payload);

        // Check return code. Anything other than 200 is considered an error
        if (xmlHttpRequest.status != 200) {
            // An error occurred and an object of type "Failure" will be
            // returned. The object will be in JSON format. Deserialize the
            // JSON. Since this is a simple example, the deserialization code
            // has been moved into "bhUtils"
            var failure = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

            // In this simple example, we just throw the failure object
            throw failure;
        }

        // Deserialize the JSON return. Since this is a simple example, the
        // deserialization code has been moved into "bhUtils"
        var result = bhUtils.deserializeJSON(xmlHttpRequest.responseText);

        return result;
    }

Update Access Control

Updates entity access control fields

URI: /comb/v1/d/adoc/ac/{id}

HTTP Method: PUT

Request Parameters: (expand)

Name Style Required Description

accept

Header

Restricted to:

  • application/json
  • application/xml

Directive to the server, indicating the format of the returned payload (or error class)

runas

Query

Identity under-which to execute this operation. Callers require permission to run as a different identity.

suppress_20x_code

Query

Restricted to:

  • false
  • true

Indicates if HTTP status codes in the 200-299 range are suppressed and always returned as 200. Required when client technology assumes that any return code other than 200 is a fault.

anticsrf

Query

Specifies the anti-CSRF token

content-type

Header

Restricted to:

  • application/json
  • application/xml

The standard HTTP Content-Type Header, indicating the MIME type of the payload

Request Payload: accessControlFieldsUpdater

Response Payload: No Response Payload

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Id type is incorrect
400
Invalid header specified
400
Invalid payload specified
400
Invalid value specified for query parameter
400
JSON payload received with a wrong data member type
400
No payload specified
400
Required header not specified
400
Required query parameter not specified
400
Type of payload specified does not match what is expected
406
Unsupported value in Accept header
500
Internal error occurred