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

Contents

AddressBook

Apply Label

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

URI: /comb/v1/d/adbk/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 AddressBook
    // * 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/adbk/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/adbk/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 AddressBook
    // * 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/adbk/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;
    }

Copy

Copy a single address book object into a different folder

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

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

destination

Query

The target address book where the element needs to be copied

conflict_resolution_mode

Query

Restricted to:

  • ABORT
  • CREATE_UNIQUE
  • OVERWRITE
  • VERSION_OVERWRITE

The mode to resolve conflicts during copy (ConflictResolutionMode.ABORT supported)

projection

Query

Restricted to:

  • BASIC
  • BASIC_WITH_SUBFOLDERS
  • EMPTY
  • EMPTY_WITH_SUBFOLDERS
  • FULL
  • META
  • META_WITH_SUBFOLDERS
  • META_WITH_SUB_ADDRESS_BOOKS
  • META_WITH_SUB_ADDRESS_BOOKS_ALL

Projection to be used for the snapshot returned

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: addressBook

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 copying a single AddressBook 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/adbk/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

Coies the given address book to the target address book.

URI: /comb/v1/d/adbk/copy

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

destination

Query

The target address book/workspace where the element needs to be copied

conflict_resolution_mode

Query

Restricted to:

  • ABORT
  • CREATE_UNIQUE
  • OVERWRITE
  • VERSION_OVERWRITE

The mode to resolve conflicts during copy (ConflictResolutionMode.ABORT supported)

projection

Query

Restricted to:

  • BASIC
  • BASIC_WITH_SUBFOLDERS
  • EMPTY
  • EMPTY_WITH_SUBFOLDERS
  • FULL
  • META
  • META_WITH_SUBFOLDERS
  • META_WITH_SUB_ADDRESS_BOOKS
  • META_WITH_SUB_ADDRESS_BOOKS_ALL

Projection to be used for the snapshot returned

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<addressBook>

Response Payload: list<addressBook>

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 copying several AddressBook 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/adbk/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

URI: /comb/v1/d/adbk

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

projection

Query

Restricted to:

  • BASIC
  • BASIC_WITH_SUBFOLDERS
  • EMPTY
  • EMPTY_WITH_SUBFOLDERS
  • FULL
  • META
  • META_WITH_SUBFOLDERS
  • META_WITH_SUB_ADDRESS_BOOKS
  • META_WITH_SUB_ADDRESS_BOOKS_ALL

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: addressBookCreator

Response Payload: addressBook

Fault: restFault

Details: (expand)

HTTP Status Description
400
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
500
Internal error occurred

Sample: (expand)

    // *
    // * This function demonstates creating a AddressBook item.
    // *
    // * @param "bhUtils" - Helper object
    // *
    // * @return The newly created item
    // *
    create: function(
        bhUtils,
        name,
        parent) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adbk?projection=META";

        var creator = {
            "beeType": "addressBookCreator",
            "name": name,
            "parent": parent
        }

        // 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(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 the specified AddressBook.

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

HTTP Method: DELETE

Request Parameters: (expand)

Name Style Required Description

snapshotid

Query

Delete mode

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

Sample: (expand)

    // *
    // * This function demonstates purging a single AddressBook 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/adbk/" + 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 AddressBook objects.

URI: /comb/v1/d/adbk/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<addressBook>

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

Sample: (expand)

    // *
    // * This function demonstates purging several AddressBook 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/adbk/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/adbk/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 Element Modifications

Returns the modifications to the elements of the AddressBook since a given anchor.

URI: /comb/v1/d/adbk/gem/{id}

HTTP Method: GET

Request Parameters: (expand)

Name Style Required Description

snapshotid

Query

The starting anchor from which the modifications are required

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: elementModifications

Fault: restFault

Details: (expand)

HTTP Status Description
400
Error processing "runas" value
400
Format of ID specified is incorrect
400
Given snapshotid is too old
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 invoking getElementModifications on a single
    // * AddressBook item.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId" - beeId of an item
    // * @param "snapshotId" - Snapshot id of the "myBeeId" item
    // *
    // * @return The item "ElementModifications" object
    // *
    getElementModifications: function(
        bhUtils,
        myBeeId,
        snapshotId) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adbk/gem/" + myBeeId.id;

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


        // 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;
    }

Move

Moves the given address book to the destination address book/workspace.

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

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

destination

Query

The target address book/workspace where the element needs to be moved.

conflict_resolution_mode

Query

Restricted to:

  • ABORT
  • CREATE_UNIQUE
  • OVERWRITE
  • VERSION_OVERWRITE

The mode to resolve conflicts during move. (ConflictResolutionMode.ABORT supported)

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

Sample: (expand)

    // *
    // * This function demonstates moving a single AddressBook 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/adbk/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

Moves the given address books to the destination address book/workspace.

URI: /comb/v1/d/adbk/move

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

destination

Query

The target address book/workspace where the element needs to be moved.

conflict_resolution_mode

Query

Restricted to:

  • ABORT
  • CREATE_UNIQUE
  • OVERWRITE
  • VERSION_OVERWRITE

The mode to resolve conflicts during move. (ConflictResolutionMode.ABORT supported)

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<addressBook>

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

Sample: (expand)

    // *
    // * This function demonstates moving several AddressBook 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/adbk/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 address book objects from their current location into the Beehive Trash. Returns the IDs of the Trash Items resulting from the operation

URI: /comb/v1/d/adbk/trash

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

projection

Query

Restricted to:

  • BASIC
  • EMPTY
  • EMPTY_WITH_DELETEDENTITY
  • FULL
  • META

Projection with which trash items are loaded

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<addressBook>

Response Payload: list<trashItem>

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 deleting several AddressBook 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/adbk/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 address book object into the Trash.

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

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

snapshotid

Query

Delete mode

projection

Query

Restricted to:

  • BASIC
  • EMPTY
  • EMPTY_WITH_DELETEDENTITY
  • FULL
  • META

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
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 AddressBook.

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

HTTP Method: GET

Request Parameters: (expand)

Name Style Required Description

projection

Query

Restricted to:

  • BASIC
  • BASIC_WITH_SUBFOLDERS
  • EMPTY
  • EMPTY_WITH_SUBFOLDERS
  • FULL
  • META
  • META_WITH_SUBFOLDERS
  • META_WITH_SUB_ADDRESS_BOOKS
  • META_WITH_SUB_ADDRESS_BOOKS_ALL

The projection specifying the attributes to be loaded for the address book.

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: addressBook

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 AddressBook 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/adbk/" + 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/adbk/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 AddressBook objects from the server

URI: /comb/v1/d/adbk/read

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

projection

Query

Restricted to:

  • BASIC
  • BASIC_WITH_SUBFOLDERS
  • EMPTY
  • EMPTY_WITH_SUBFOLDERS
  • FULL
  • META
  • META_WITH_SUBFOLDERS
  • META_WITH_SUB_ADDRESS_BOOKS
  • META_WITH_SUB_ADDRESS_BOOKS_ALL

The projection specifying the attributes to be loaded for the address books.

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<addressBook>

Response Payload: list<addressBook>

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 AddressBook 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/adbk/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;
    }

Remove Label

Remove the label applied from an entity

URI: /comb/v1/d/adbk/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

Sample: (expand)

    // *
    // * This function demonstates applying a label on a single AddressBook
    // * item.
    // *
    // * @param "bhUtils" - Helper object
    // * @param "myBeeId1" - beeId of an item to remove label from
    // * @param "labelId" - beeId of the label to be removed
    // *
    // * @return null
    // *
    removeLabel: function(
        bhUtils,
        myBeeId1,
        labelId) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adbk/label/remove/" + 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;
        }

    }

Remove Label Batch

Removes the label applied from a collection of entities

URI: /comb/v1/d/adbk/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

Sample: (expand)

    // *
    // * This function demonstates removing a label from several AddressBook
    // * 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
    // *
    removeLabelBatch: function(
        bhUtils,
        myBeeId1,
        myBeeId2,
        myBeeId3,
        labelId) {
        // The URI for this resource
        var resourceURI = "/comb/v1/d/adbk/label/remove";

        // 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;
        }

    }

Undelete

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

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

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

new_name

Query

Undelete mode

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

Sample: (expand)

    // *
    // * This function demonstates undeleting a single AddressBook 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/adbk/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 address book objects which were previously moved to Trash

URI: /comb/v1/d/adbk/undelete

HTTP Method: POST

Request Parameters: (expand)

Name Style Required Description

new_name

Query

Undelete mode

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<addressBook>

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

Sample: (expand)

    // *
    // * This function demonstates undeleting several AddressBook 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/adbk/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;
    }

Update

Update a single Address book

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

HTTP Method: PUT

Request Parameters: (expand)

Name Style Required Description

snapshotid

Query

Update mode.

projection

Query

Restricted to:

  • BASIC
  • BASIC_WITH_SUBFOLDERS
  • EMPTY
  • EMPTY_WITH_SUBFOLDERS
  • FULL
  • META
  • META_WITH_SUBFOLDERS
  • META_WITH_SUB_ADDRESS_BOOKS
  • META_WITH_SUB_ADDRESS_BOOKS_ALL

The projection specifying the attributes to be loaded for the addressbook.

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: addressBookUpdater

Response Payload: addressBook

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

Sample: (expand)

    // *
    // * This function demonstates updating the description of a single
    // * AddressBook 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/adbk/" + myBeeId.id;

        var updater = {
            "beeType": "addressBookUpdater",
            "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/adbk/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