vocabulary management apis - cisco - global home page › c › en › us › td › docs ›...

62
CHAPTER 10-1 Cisco Pulse API Reference Guide OL-21500-02 10 Vocabulary Management APIs The information in this chapter enables you to use the Cisco OpenSocial JavaScript APIs to manage the Pulse and Restricted Vocabularies in an OpenSocial gadget. Cisco Pulse Vocabulary Management JavaScript APIs Pulse and Restricted Vocabulary APIs, page 10-1 User-Suggested Tag APIs, page 10-50 Pulse and Restricted Vocabulary APIs Add Requests, page 10-1 Modify Requests, page 10-5 Delete Requests, page 10-9 Get Requests, page 10-13 Add Requests Add Pulse Vocabulary Term Request, page 10-2 Add Restricted Vocabulary Term Request, page 10-4

Upload: others

Post on 09-Jun-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

OL-21500-02

C H A P T E R 10

Vocabulary Management APIs

The information in this chapter enables you to use the Cisco OpenSocial JavaScript APIs to manage the Pulse and Restricted Vocabularies in an OpenSocial gadget.

Cisco Pulse Vocabulary Management JavaScript APIs• Pulse and Restricted Vocabulary APIs, page 10-1

• User-Suggested Tag APIs, page 10-50

Pulse and Restricted Vocabulary APIs• Add Requests, page 10-1

• Modify Requests, page 10-5

• Delete Requests, page 10-9

• Get Requests, page 10-13

Add Requests

• Add Pulse Vocabulary Term Request, page 10-2

• Add Restricted Vocabulary Term Request, page 10-4

10-1Cisco Pulse API Reference Guide

Page 2: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Add Pulse Vocabulary Term Request

This API enables you to implement the addition of a term to the Pulse Vocabulary.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

add

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

var options = {};var mainTerm = 'collaboration' + (new Date()).getTime() % 100000;options[cisco.pulse.osapi.vocab.options.MAIN_TERM] = mainTerm;options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'PWL'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.create(options).execute(function(result) {...});

Parameter Description Type Expected Value Status

userId Specify the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specify the Pulse Vocabulary. You must specify the expected value.

String PWL Required

mainTerm Specify a term to add to the Pulse Vocabulary String term Required

syn1 Specify a synonym for the main term. String synonym1 Optional

syn2 Specify a synonym for the main term. String synonym2 Optional

syn3 Specify a synonym for the main term. String synonym3 Optional

syn4 Specify a synonym for the main term. String synonym4 Optional

syn5 Specify a synonym for the main term. String synonym5 Optional

10-2Cisco Pulse API Reference Guide

OL-21500-02

Page 3: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-3Cisco Pulse API Reference Guide

OL-21500-02

Page 4: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Add Restricted Vocabulary Term Request

This API enables you to implement the addition of a term to the Restricted Vocabulary.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

add

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

var options = {};var mainTerm = 'salary' + (new Date()).getTime() % 100000;options[cisco.pulse.osapi.vocab.options.MAIN_TERM] = mainTerm;options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'BL'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.create(options).execute(function(result) {...});

Parameter Description Type Expected Value Status

userId Specify the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specify the Restricted Vocabulary. You must specify the expected value.

String BL Required

mainTerm Specify a term to add to the Restricted Vocabulary

String term Required

syn1 Specify a synonym for the main term. String synonym1 Optional

syn2 Specify a synonym for the main term. String synonym2 Optional

syn3 Specify a synonym for the main term. String synonym3 Optional

syn4 Specify a synonym for the main term. String synonym4 Optional

syn5 Specify a synonym for the main term. String synonym5 Optional

10-4Cisco Pulse API Reference Guide

OL-21500-02

Page 5: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

Modify Requests

• Modify Pulse Vocabulary Term Request, page 10-6

• Modify Restricted Vocabulary Term Request, page 10-8

10-5Cisco Pulse API Reference Guide

OL-21500-02

Page 6: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Modify Pulse Vocabulary Term Request

This API enables you to implement the modification of a Pulse Vocabulary term.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

update

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[

Parameter Description Type Expected Value Status

userId Specify the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the Pulse Vocabulary. You must specify the expected value.

String PWL Required

idValue Specifies the ID of the entry that you are modifying. You can determine the entry ID using pgAdmin, which is a database tool. For information on this tool, go to this URL:

http://www.pgadmin.org/

You cannot specify a null value.

Integer integer Required

mainTerm Specifies the term that you are modifying. String term Optional

syn1 Specifies the synonym that you are modifying. String synonym1 Optional

syn2 Specifies the synonym that you are modifying. String synonym2 Optional

syn3 Specifies the synonym that you are modifying. String synonym3 Optional

syn4 Specifies the synonym that you are modifying. String synonym4 Optional

syn5 Specifies the synonym that you are modifying. String synonym5 Optional

10-6Cisco Pulse API Reference Guide

OL-21500-02

Page 7: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

<script type="text/javascript">options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'PWL';options[cisco.pulse.osapi.vocab.options.ID_VALUE] = 2;options[cisco.pulse.osapi.vocab.options.SYN1] = 'collaboration'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.update(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{}}]

• Failures:

[{"error":{"message":"badRequest: No such PendingWhiteListterm as 132235 exists in the table","code":400}}]

[{"error":{"message":"badRequest: message","code":number}}]

10-7Cisco Pulse API Reference Guide

OL-21500-02

Page 8: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Modify Restricted Vocabulary Term Request

This API enables you to implement the modification of a Restricted Vocabulary term.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

update

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the Restricted Vocabulary. You must specify the expected value.

String BL Required

idValue Specifies the ID of the entry that you are modifying. You can determine the entry ID using pgAdmin, which is a database tool. For information on this tool, go to this URL:

http://www.pgadmin.org/

You cannot specify a null value.

Integer integer Required

mainTerm Specifies the term that you are modifying. String term Optional

syn1 Specifies the synonym that you are modifying. String synonym1 Optional

syn2 Specifies the synonym that you are modifying. String synonym2 Optional

syn3 Specifies the synonym that you are modifying. String synonym3 Optional

syn4 Specifies the synonym that you are modifying. String synonym4 Optional

syn5 Specifies the synonym that you are modifying. String synonym5 Optional

10-8Cisco Pulse API Reference Guide

OL-21500-02

Page 9: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

<script type="text/javascript">options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'BL';options[cisco.pulse.osapi.vocab.options.ID_VALUE] = 2;options[cisco.pulse.osapi.vocab.options.SYN1] = 'salary'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.update(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

Delete Requests

• Delete Pulse Vocabulary Term Request, page 10-10

• Delete Restricted Vocabulary Term Request, page 10-12

10-9Cisco Pulse API Reference Guide

OL-21500-02

Page 10: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Delete Pulse Vocabulary Term Request

This API enables you to implement the deletion of a Pulse Vocabulary term.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

delete

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

function deleteNewlyAddedVocab(mainTerm, vocabType) {var options = {};options[cisco.pulse.osapi.vocab.options.MAIN_TERM] = mainTerm;options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = vocabType; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.del(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the Pulse Vocabulary. You must specify the expected value.

String PWL Required

mainTerm Specifies a term to delete from the Pulse Vocabulary. The specified term, as well as all synonyms associated with the term, are deleted.

String term Required

10-10Cisco Pulse API Reference Guide

OL-21500-02

Page 11: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Expected Results

• Success:

[{"data":{}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-11Cisco Pulse API Reference Guide

OL-21500-02

Page 12: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Delete Restricted Vocabulary Term Request

This API enables you to implement the deletion of a Restricted Vocabulary term.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

delete

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

function deleteNewlyAddedVocab(mainTerm, vocabType) {var options = {};options[cisco.pulse.osapi.vocab.options.MAIN_TERM] = mainTerm;options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = vocabType; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.del(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the Restricted Vocabulary. You must specify the expected value.

String BL Required

mainTerm Specifies a term to delete from the Pulse Vocabulary. The specified term, as well as all synonyms associated with the term, are deleted.

String term Required

10-12Cisco Pulse API Reference Guide

OL-21500-02

Page 13: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Expected Results

• Success:

[{"data":{}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

Get Requests

• Get Active Pulse Vocabulary Table Information, page 10-14

• Get Pending Pulse Vocabulary Table Information, page 10-16

• Get Number of Active Pulse Vocabulary Terms, page 10-18

• Get Number of Restricted Vocabulary Terms, page 10-20

• Get Number of Pending Pulse Vocabulary Terms, page 10-22

• Get All Terms, page 10-24

• Get a Pending Pulse Vocabulary Term by Specifying an ID Number, page 10-27

• Get an Active Pulse Vocabulary Term by Specifying an ID Number, page 10-29

• Get a Restricted Vocabulary Term by Specifying an ID Number, page 10-31

• Get a Pending Pulse Vocabulary Term by Specifying the Term, page 10-33

• Get an Active Pulse Vocabulary Term by Specifying the Term, page 10-35

• Get a Restricted Vocabulary Term by Specifying the Term, page 10-37

• Search All Fields for a Pending Pulse Vocabulary Term (Receive Boolean Response), page 10-39

• Search All Fields for an Active Pulse Vocabulary Term (Receive Boolean Response), page 10-41

• Search All Fields for a Restricted Vocabulary Term (Receive Boolean Response), page 10-43

• Search Term Field for a Pending Pulse Vocabulary Term (Receive Boolean Response), page 10-45

• Search Term Field for an Active Pulse Vocabulary Term (Receive Boolean Response), page 10-47

• Search Term Field for a Restricted Vocabulary Term (Receive Boolean Response), page 10-49

10-13Cisco Pulse API Reference Guide

OL-21500-02

Page 14: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get Active Pulse Vocabulary Table Information

This API enables you to get the number of terms and the last updated time for the active vocabulary table, which includes active Pulse Vocabulary terms as well as Restricted Vocabulary terms.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'WL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.GET_INFO; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the active Pulse Vocabulary. String WL Required

operation Specifies the operation, which is to get the latest active Pulse Vocabulary information. You should not specify a null value.

String getInfo Required

10-14Cisco Pulse API Reference Guide

OL-21500-02

Page 15: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Expected Results

• Success:

[{"data":{"blackListLastUpdatedTime":"2009-03-04T19:47:13.537Z","totalPendingWhiteListRecords":3831,"pendingWhiteListLastUpdatedTime":"2009-10-08T22:17:16.969Z","totalBlackListRecords":3,"totalWhiteListRecords":0}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-15Cisco Pulse API Reference Guide

OL-21500-02

Page 16: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get Pending Pulse Vocabulary Table Information

This API enables you to get this information:

• The number of Pulse Vocabulary terms and the last time they were updated. This information is retrieved from the pending Pulse Vocabulary table.

• The number of Restricted Vocabulary terms and the last time they were updated. This information is retrieved from the active vocabulary table.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'PWL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.GET_INFO; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the pending Pulse Vocabulary. String PWL Required

operation Specifies the operation, which is to get the latest pending Pulse Vocabulary information. You should not specify a null value.

String getInfo Required

10-16Cisco Pulse API Reference Guide

OL-21500-02

Page 17: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"blackListLastUpdatedTime":"2009-03-04T19:47:13.537Z","totalPendingWhiteListRecords":3831,"pendingWhiteListLastUpdatedTime":"2009-10-08T22:17:16.969Z","totalBlackListRecords":3,"totalWhiteListRecords":0}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-17Cisco Pulse API Reference Guide

OL-21500-02

Page 18: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get Number of Active Pulse Vocabulary Terms

This API enables you to get the number of terms in the active Pulse Vocabulary table that match the specified parameters.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'WL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.GET_COUNT; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the active Pulse Vocabulary table. String WL Required

operation Specifies the operation, which is to get the number of terms in the latest active Pulse Vocabulary table. You should not specify a null value.

String getCount Required

filterOp Specifies a filter, which narrows the number of terms counted to those that start with the specified letter(s). You can specify a null value.

String startsWith Optional

filterValue Narrows the count to terms that start with the specified letter(s), for example, a, b, ca, and so on. You can specify a null value.

String letter(s) Optional

10-18Cisco Pulse API Reference Guide

OL-21500-02

Page 19: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"count":7055,"vocabType":"WL"}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-19Cisco Pulse API Reference Guide

OL-21500-02

Page 20: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get Number of Restricted Vocabulary Terms

This API enables you to get the number of terms in the Restricted Vocabulary table that match the specified parameters.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'BL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.GET_COUNT; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the Restricted Vocabulary table. String BL Required

operation Specifies the operation, which is to get the number of terms in the latest Restricted Vocabulary table. You should not specify a null value.

String getCount Required

filterOp Specifies a filter, which narrows the number of terms counted to those that start with the specified letter(s). You can specify a null value.

String startsWith Optional

filterValue Narrows the count to terms that start with the specified letter(s), for example, a, b, ca, and so on. You can specify a null value.

String letter(s) Optional

10-20Cisco Pulse API Reference Guide

OL-21500-02

Page 21: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"count":79,"vocabType":"BL"}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-21Cisco Pulse API Reference Guide

OL-21500-02

Page 22: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get Number of Pending Pulse Vocabulary Terms

This API enables you to get the number of terms in the pending Pulse Vocabulary table that match the specified parameters.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'PWL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.GET_COUNT; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the pending Pulse Vocabulary table. String PWL Required

operation Specifies the operation, which is to get the number of terms in the latest pending Pulse Vocabulary table. You should not specify a null value.

String getCount Required

filterOp Specifies a filter, which narrows the number of terms counted to those that start with the specified letter(s). You can specify a null value.

String startsWith Optional

filterValue Narrows the count to terms that start with the specified letter(s), for example, a, b, ca, and so on. You can specify a null value.

String letter(s) Optional

10-22Cisco Pulse API Reference Guide

OL-21500-02

Page 23: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"count":7777,"vocabType":"PWL"}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-23Cisco Pulse API Reference Guide

OL-21500-02

Page 24: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get All Terms

This API enables you to get all terms in the active Pulse Vocabulary table, the pending Pulse Vocabulary table, or the Restricted Vocabulary table that match the specified parameters.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the active Pulse Vocabulary table, the pending Pulse Vocabulary table, or the Restricted Vocabulary table.

String WLPWLBL

Required

operation Specifies the operation, which is to get and list all terms in the latest table. You should not specify a null value.

String getAll Required

count Specifies the number of terms to get. If you do not specify this parameter, 20 terms are retrieved and listed.

Integer number Optional

startIndex Specifies that results starting from the provided index (position) are returned.

Integer number Optional

sortOrder Specifies that the terms are listed in the descending or ascending order in which they are listed in the table.

String DescendingAscending

Optional

sortBy Specifies the field upon which the table is sorted. Options include a specified term or an update time.

If you specify updatedTime, you must also set the sortOrder parameter to descending.

If you do not specify this parameter, the table is sorted by the mainTerm.

String mainTermupdatedTime

Optional

filterOp Specifies a filter, which narrows the terms retrieved to those that start with the specified letter(s). You can specify a null value.

String startsWith Optional

filterValue Narrows the retrieved terms to those that start with the specified letter(s), for example, a, b, ca, and so on. You can specify a null value.

String letter(s) Optional

10-24Cisco Pulse API Reference Guide

OL-21500-02

Page 25: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Field Values

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'BL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.GET_ALL; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

filterBy Specifies a filter, which narrows the terms retrieved to those specified by the expected value. You can specify a null value.

String Term syn1 syn2 syn3 syn4 syn5

Optional

fields Gets only the specified table field(s). If you do not specify a value for this parameter, the system displays all fields.

See Field Values Optional

Parameter Description Type Expected Value Status

Field Description Type

cat This field is not currently supported. String

desc This field is not currently supported. String

createdTime Displays the date and time that the term grouping was created. Date and time

createdBy Displays the user ID of the person who created the term grouping. String

updatedTime Displays the date and time that the term grouping was last updated. Date and time

updatedBy Displays the user ID of the person who last updated the term grouping.

String

grp This field is not currently supported. String

brd This field is not currently supported. String

term Displays a term. String

syn1 Displays the first synonym in the term grouping. String

syn2 Displays the second synonym in the term grouping. String

syn3 Displays the third synonym in the term grouping. String

syn4 Displays the fourth synonym in the term grouping. String

syn5 Displays the fifth synonym in the term grouping. String

10-25Cisco Pulse API Reference Guide

OL-21500-02

Page 26: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"startIndex":0,"totalResults":2,"list":[{"cat":"","desc":"","createdTime":"2009-09-08 17:51:12.565948","syn1":"JVM","syn2":"J2SE","syn3":"","syn4":"","nrw":"","syn5":"","updatedBy":"stacy","grp":"","createdBy":"george","term":"java","updatedTime":"2009-09-08 17:51:12.565948","brd":""},{"cat":"","desc":"","createdTime":"2009-09-08 17:51:12.565948","syn1":"","syn2":"","syn3":"","syn4":"","nrw":"","syn5":"","updatedBy":"chris","grp":"","createdBy":"dennis","term":"javabeans","updatedTime":"2009-09-08 17:51:12.565948","brd":""}]}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-26Cisco Pulse API Reference Guide

OL-21500-02

Page 27: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get a Pending Pulse Vocabulary Term by Specifying an ID Number

This API enables you to get the term in the pending Pulse Vocabulary table that matches the specified ID number.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Field Values

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the pending Pulse Vocabulary table. String PWL Required

searchField Specifies that you want to get a term with a particular ID number. You should not specify a null value.

String id Required

searchValue Specifies the ID number of the term you want to get. You can determine the ID number using pgAdmin, which is a database tool. For information on this tool, go to this URL:

http://www.pgadmin.org/

You should not specify a null value.

Integer id-number Required

operation Specifies the operation, which is to get and list a term in the pending Pulse Vocabulary table. You should not specify a null value.

String get Required

fields Gets only the specified pending Pulse Vocabulary table field(s). If you do not specify a value for this parameter, the system displays all fields.

See Field Values table Optional

Field Description Type

cat This field is not currently supported. String

desc This field is not currently supported. String

createdTime Displays the date and time that the term grouping was created. Date and time

createdBy Displays the user ID of the person who created the term grouping. String

10-27Cisco Pulse API Reference Guide

OL-21500-02

Page 28: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'PWL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.GET;options[cisco.pulse.osapi.vocab.options.SEARCH_FIELD] = 'id';options[cisco.pulse.osapi.vocab.options.SEARCH_VALUE] = '222'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"cat":"","desc":"","createdTime":"2009-09-08 17:51:12.565948","syn1":"collaborate","syn2":"collaborated","syn3":"","syn4":"","nrw":"","syn5":"","updatedBy":"george","grp":"","createdBy":"george","term":"collaboration","updatedTime":"2009-09-08 17:51:12.565948","brd":""}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

updatedTime Displays the date and time that the term grouping was last updated. Date and time

updatedBy Displays the user ID of the person who last updated the term grouping.

String

grp This field is not currently supported. String

brd This field is not currently supported. String

term Displays a term. String

syn1 Displays the first synonym in the term grouping. String

syn2 Displays the second synonym in the term grouping. String

syn3 Displays the third synonym in the term grouping. String

syn4 Displays the fourth synonym in the term grouping. String

syn5 Displays the fifth synonym in the term grouping. String

Field Description Type

10-28Cisco Pulse API Reference Guide

OL-21500-02

Page 29: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get an Active Pulse Vocabulary Term by Specifying an ID Number

This API enables you to get the term in the active Pulse Vocabulary table that matches the specified ID number.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Field Values

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the active Pulse Vocabulary table. String WL Required

searchField Specifies that you want to get a term with a particular ID number. You should not specify a null value.

String id Required

searchValue Specifies the ID number of the term you want to get. You can determine the ID number using pgAdmin, which is a database tool. For information on this tool, go to this URL:

http://www.pgadmin.org/

You should not specify a null value.

Integer id-number Required

operation Specifies the operation, which is to get and list a term in the active Pulse Vocabulary table. You should not specify a null value.

String get Required

fields Gets only the specified pending Pulse Vocabulary table field(s). If you do not specify a value for this parameter, the system displays all fields.

See Field Values table Optional

Field Description Type

cat This field is not currently supported. String

desc This field is not currently supported. String

createdTime Displays the date and time that the term grouping was created. Date and time

createdBy Displays the user ID of the person who created the term grouping. String

10-29Cisco Pulse API Reference Guide

OL-21500-02

Page 30: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'WL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.GET;options[cisco.pulse.osapi.vocab.options.SEARCH_FIELD] = 'id';options[cisco.pulse.osapi.vocab.options.SEARCH_VALUE] = '222'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"cat":"","desc":"","createdTime":"2009-09-08 17:51:12.565948","syn1":"collaborate","syn2":"collaborated","syn3":"","syn4":"","nrw":"","syn5":"","updatedBy":"george","grp":"","createdBy":"george","term":"collaboration","updatedTime":"2009-09-08 17:51:12.565948","brd":""}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

updatedTime Displays the date and time that the term grouping was last updated. Date and time

updatedBy Displays the user ID of the person who last updated the term grouping.

String

grp This field is not currently supported. String

brd This field is not currently supported. String

term Displays a term. String

syn1 Displays the first synonym in the term grouping. String

syn2 Displays the second synonym in the term grouping. String

syn3 Displays the third synonym in the term grouping. String

syn4 Displays the fourth synonym in the term grouping. String

syn5 Displays the fifth synonym in the term grouping. String

Field Description Type

10-30Cisco Pulse API Reference Guide

OL-21500-02

Page 31: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get a Restricted Vocabulary Term by Specifying an ID Number

This API enables you to get the term in the Restricted Vocabulary table that matches the specified ID number.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Field Values

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the Restricted Vocabulary table. String BL Required

searchField Specifies that you want to get a term with a particular ID number. You should not specify a null value.

String id Required

searchValue Specifies the ID number of the term you want to get. You can determine the ID number using pgAdmin, which is a database tool. For information on this tool, go to this URL:

http://www.pgadmin.org/

You should not specify a null value.

Integer id-number Required

operation Specifies the operation, which is to get and list a term in the Restricted Vocabulary table. You should not specify a null value.

String get Required

fields Gets only the specified pending Pulse Vocabulary table field(s). If you do not specify a value for this parameter, the system displays all fields.

See Field Values table Optional

Field Description Type

cat This field is not currently supported. String

desc This field is not currently supported. String

createdTime Displays the date and time that the term grouping was created. Date and time

createdBy Displays the user ID of the person who created the term grouping. String

10-31Cisco Pulse API Reference Guide

OL-21500-02

Page 32: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'BL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.GET;options[cisco.pulse.osapi.vocab.options.SEARCH_FIELD] = 'id';options[cisco.pulse.osapi.vocab.options.SEARCH_VALUE] = '222'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"cat":"","desc":"","createdTime":"2009-09-08 17:51:12.565948","syn1":"salary","syn2":"compensation","syn3":"","syn4":"","nrw":"","syn5":"","updatedBy":"george","grp":"","createdBy":"george","term":"paycheck","updatedTime":"2009-09-08 17:51:12.565948","brd":""}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

updatedTime Displays the date and time that the term grouping was last updated. Date and time

updatedBy Displays the user ID of the person who last updated the term grouping.

String

grp This field is not currently supported. String

brd This field is not currently supported. String

term Displays a term. String

syn1 Displays the first synonym in the term grouping. String

syn2 Displays the second synonym in the term grouping. String

syn3 Displays the third synonym in the term grouping. String

syn4 Displays the fourth synonym in the term grouping. String

syn5 Displays the fifth synonym in the term grouping. String

Field Description Type

10-32Cisco Pulse API Reference Guide

OL-21500-02

Page 33: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get a Pending Pulse Vocabulary Term by Specifying the Term

This API enables you to get a term in the pending Pulse Vocabulary table by specifying the term itself.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Field Values

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the Restricted Vocabulary table. String PWL Required

searchField Specifies that you want to get a particular term. You should not specify a null value.

String mainTerm Required

searchValue Specifies the term that you want to get. You should not specify a null value.

String mainTerm Required

operation Specifies the operation, which is to get and list a term in the pending Pulse Vocabulary table. You should not specify a null value.

String get Required

fields Gets only the specified pending Pulse Vocabulary table field(s). If you do not specify a value for this parameter, the system displays all fields.

See Field Values table Optional

Field Description Type

cat This field is not currently supported. String

desc This field is not currently supported. String

createdTime Displays the date and time that the term grouping was created. Date and time

createdBy Displays the user ID of the person who created the term grouping. String

updatedTime Displays the date and time that the term grouping was last updated. Date and time

updatedBy Displays the user ID of the person who last updated the term grouping.

String

grp This field is not currently supported. String

brd This field is not currently supported. String

10-33Cisco Pulse API Reference Guide

OL-21500-02

Page 34: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'PWL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.GET;options[cisco.pulse.osapi.vocab.options.SEARCH_FIELD] = 'mainTerm';options[cisco.pulse.osapi.vocab.options.SEARCH_VALUE] = 'collaboration'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"cat":"","desc":"","createdTime":"2009-09-08 17:51:12.565948","syn1":"collaborate","syn2":"collaborating","syn3":"","syn4":"","nrw":"","syn5":"","updatedBy":"george","grp":"","createdBy":"george","term":"collaboration","updatedTime":"2009-09-08 17:51:12.565948","brd":""}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

term Displays a term. String

syn1 Displays the first synonym in the term grouping. String

syn2 Displays the second synonym in the term grouping. String

syn3 Displays the third synonym in the term grouping. String

syn4 Displays the fourth synonym in the term grouping. String

syn5 Displays the fifth synonym in the term grouping. String

Field Description Type

10-34Cisco Pulse API Reference Guide

OL-21500-02

Page 35: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get an Active Pulse Vocabulary Term by Specifying the Term

This API enables you to get a term in the active Pulse Vocabulary table by specifying the term itself.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Field Values

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the active Pulse Vocabulary table. String WL Required

searchField Specifies that you want to get a particular term. You should not specify a null value.

String mainTerm Required

searchValue Specifies the term that you want to get. String mainTerm Required

operation Specifies the operation, which is to get and list a term in the active Pulse Vocabulary table. You should not specify a null value.

String get Required

fields Gets only the specified pending Pulse Vocabulary table field(s). If you do not specify a value for this parameter, the system displays all fields.

See Field Values table Optional

Field Description Type

cat This field is not currently supported. String

desc This field is not currently supported. String

createdTime Displays the date and time that the term grouping was created. Date and time

createdBy Displays the user ID of the person who created the term grouping. String

updatedTime Displays the date and time that the term grouping was last updated. Date and time

updatedBy Displays the user ID of the person who last updated the term grouping.

String

grp This field is not currently supported. String

brd This field is not currently supported. String

term Displays a term. String

10-35Cisco Pulse API Reference Guide

OL-21500-02

Page 36: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'WL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.GET;options[cisco.pulse.osapi.vocab.options.SEARCH_FIELD] = 'mainTerm';options[cisco.pulse.osapi.vocab.options.SEARCH_VALUE] = 'collaboration'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"cat":"","desc":"","createdTime":"2009-09-08 17:51:12.565948","syn1":"collaborate","syn2":"collaborating","syn3":"","syn4":"","nrw":"","syn5":"","updatedBy":"george","grp":"","createdBy":"george","term":"collaboration","updatedTime":"2009-09-08 17:51:12.565948","brd":""}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

syn1 Displays the first synonym in the term grouping. String

syn2 Displays the second synonym in the term grouping. String

syn3 Displays the third synonym in the term grouping. String

syn4 Displays the fourth synonym in the term grouping. String

syn5 Displays the fifth synonym in the term grouping. String

Field Description Type

10-36Cisco Pulse API Reference Guide

OL-21500-02

Page 37: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get a Restricted Vocabulary Term by Specifying the Term

This API enables you to get a term in the Restricted Vocabulary table by specifying the term itself.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Field Values

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the Restricted Vocabulary table. String BL Required

searchField Specifies that you want to get a particular term. You should not specify a null value.

String mainTerm Required

searchValue Specifies the term that you want to get. You should not specify a null value.

String mainTerm Required

operation Specifies the operation, which is to get and list a term in the Restricted Vocabulary table. You should not specify a null value.

String get Required

fields Gets only the specified pending Pulse Vocabulary table field(s). If you do not specify a value for this parameter, the system displays all fields.

See Field Values table Optional

Field Description Type

cat This field is not currently supported. String

desc This field is not currently supported. String

createdTime Displays the date and time that the term grouping was created. Date and time

createdBy Displays the user ID of the person who created the term grouping. String

updatedTime Displays the date and time that the term grouping was last updated. Date and time

updatedBy Displays the user ID of the person who last updated the term grouping.

String

grp This field is not currently supported. String

brd This field is not currently supported. String

10-37Cisco Pulse API Reference Guide

OL-21500-02

Page 38: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'BL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.GET;options[cisco.pulse.osapi.vocab.options.SEARCH_FIELD] = 'mainTerm';options[cisco.pulse.osapi.vocab.options.SEARCH_VALUE] = 'paycheck'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"cat":"","desc":"","createdTime":"2009-09-08 17:51:12.565948","syn1":"salary","syn2":"compensation","syn3":"","syn4":"","nrw":"","syn5":"","updatedBy":"george","grp":"","createdBy":"george","term":"paycheck","updatedTime":"2009-09-08 17:51:12.565948","brd":""}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

term Displays a term. String

syn1 Displays the first synonym in the term grouping. String

syn2 Displays the second synonym in the term grouping. String

syn3 Displays the third synonym in the term grouping. String

syn4 Displays the fourth synonym in the term grouping. String

syn5 Displays the fifth synonym in the term grouping. String

Field Description Type

10-38Cisco Pulse API Reference Guide

OL-21500-02

Page 39: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Search All Fields for a Pending Pulse Vocabulary Term (Receive Boolean Response)

This API enables you to determine whether or not a specified string is found in any fields in the pending Pulse Vocabulary table.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'PWL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.EXIST;options[cisco.pulse.osapi.vocab.options.SEARCH_FIELD] = 'allFields';options[cisco.pulse.osapi.vocab.options.SEARCH_VALUE] = 'collaboration'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the pending Pulse Vocabulary table. String PWL Required

searchField Specifies that all fields in the pending Pulse Vocabulary table are searched. You should not specify a null value.

String allFields Required

searchValue Specifies the string upon which to search. You should not specify a null value.

String string Required

operation Specifies the operation, which is to get a specified string that might exist in the pending Pulse Vocabulary table. You should not specify a null value.

String exist Required

10-39Cisco Pulse API Reference Guide

OL-21500-02

Page 40: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"vocabType":"PWL"}}] ' exists

[{"data":{}}] ' doesn't exist

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-40Cisco Pulse API Reference Guide

OL-21500-02

Page 41: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Search All Fields for an Active Pulse Vocabulary Term (Receive Boolean Response)

This API enables you to determine whether or not a specified string is found in any fields in the active Pulse Vocabulary table.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'WL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.EXIST;options[cisco.pulse.osapi.vocab.options.SEARCH_FIELD] = 'allFields';options[cisco.pulse.osapi.vocab.options.SEARCH_VALUE] = 'collaboration'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the active Pulse Vocabulary table. String WL Required

searchField Specifies that all fields in the active Pulse Vocabulary table are searched. You should not specify a null value.

String allFields Required

searchValue Specifies the string upon which to search. You should not specify a null value.

String string Required

operation Specifies the operation, which is to get a specified string that might exist in the active Pulse Vocabulary table. You should not specify a null value.

String exist Required

10-41Cisco Pulse API Reference Guide

OL-21500-02

Page 42: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>server bug

Expected Results

• Success:

[{"data":{"vocabType":"WL"}}] ' exists

[{"data":{}}] ' doesn't exist

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-42Cisco Pulse API Reference Guide

OL-21500-02

Page 43: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Search All Fields for a Restricted Vocabulary Term (Receive Boolean Response)

This API enables you to determine whether or not a specified string is found in any fields in the Restricted Vocabulary table.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'BL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.EXIST;options[cisco.pulse.osapi.vocab.options.SEARCH_FIELD] = 'allFields';options[cisco.pulse.osapi.vocab.options.SEARCH_VALUE] = 'paycheck'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the Restricted Vocabulary table. String BL Required

searchField Specifies that all fields in the Restricted Vocabulary table are searched. You should not specify a null value.

String allFields Required

searchValue Specifies the string upon which to search. You should not specify a null value.

String string Required

operation Specifies the operation, which is to get a specified string that might exist in the Restricted Vocabulary table. You should not specify a null value.

String exist Required

10-43Cisco Pulse API Reference Guide

OL-21500-02

Page 44: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"vocabType":"BL"}}] ' exists

[{"data":{}}] ' doesn't exist

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-44Cisco Pulse API Reference Guide

OL-21500-02

Page 45: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Search Term Field for a Pending Pulse Vocabulary Term (Receive Boolean Response)

This API enables you to determine whether or not a specified string is found in the term field in the pending Pulse Vocabulary table.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'PWL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.EXIST;options[cisco.pulse.osapi.vocab.options.SEARCH_FIELD] = 'mainTerm';options[cisco.pulse.osapi.vocab.options.SEARCH_VALUE] = 'collaboration'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the pending Pulse Vocabulary table. String PWL Required

searchField Specifies that all term fields in the pending Pulse Vocabulary table are searched. You should not specify a null value.

String mainTerm Required

searchValue Specifies the string upon which to search. You should not specify a null value.

String string Required

operation Specifies the operation, which is to get a specified string that might exist in a term field in the pending Pulse Vocabulary table. You should not specify a null value.

String exist Required

10-45Cisco Pulse API Reference Guide

OL-21500-02

Page 46: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"vocabType":"PWL"}}] ' exists

[{"data":{}}] ' doesn't exist

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-46Cisco Pulse API Reference Guide

OL-21500-02

Page 47: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Search Term Field for an Active Pulse Vocabulary Term (Receive Boolean Response)

This API enables you to determine whether or not a specified string is found in the term field in the active Pulse Vocabulary table.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'WL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.EXIST;options[cisco.pulse.osapi.vocab.options.SEARCH_FIELD] = 'mainTerm';options[cisco.pulse.osapi.vocab.options.SEARCH_VALUE] = 'collaboration'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the active Pulse Vocabulary table. String WL Required

searchField Specifies that all term fields in the active Pulse Vocabulary table are searched. You should not specify a null value.

String mainTerm Required

searchValue Specifies the string upon which to search. You should not specify a null value.

String string Required

operation Specifies the operation, which is to get a specified string that might exist in a term field in the active Pulse Vocabulary table. You should not specify a null value.

String exist Required

10-47Cisco Pulse API Reference Guide

OL-21500-02

Page 48: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"vocabType":"WL"}}] ' exists

[{"data":{}}] ' doesn't exist

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-48Cisco Pulse API Reference Guide

OL-21500-02

Page 49: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Search Term Field for a Restricted Vocabulary Term (Receive Boolean Response)

This API enables you to determine whether or not a specified string is found in the term field in the Restricted Vocabulary table.

Object Filename

vocab.js

Object

cisco.pulse.osapi.vocab

Method

get

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.vocab.options.VOCAB_TYPE] = 'BL';options[cisco.pulse.osapi.vocab.options.OPERATION] =

cisco.pulse.osapi.vocab.getOperations.EXIST;options[cisco.pulse.osapi.vocab.options.SEARCH_FIELD] = 'mainTerm';options[cisco.pulse.osapi.vocab.options.SEARCH_VALUE] = 'paycheck'; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

vocabType Specifies the Restricted Vocabulary table. String BL Required

searchField Specifies that all term fields in the Restricted Vocabulary table are searched. You should not specify a null value.

String mainTerm Required

searchValue Specifies the string upon which to search. You should not specify a null value.

String string Required

operation Specifies the operation, which is to get a specified string that might exist in a term field in the Restricted Vocabulary table. You should not specify a null value.

String exist Required

10-49Cisco Pulse API Reference Guide

OL-21500-02

Page 50: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

cisco.pulse.osapi.vocab.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"vocabType":"BL"}}] ' exists

[{"data":{}}] ' doesn't exist

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

User-Suggested Tag APIs• Add a User-Suggested Tag, page 10-51

• Get Requests, page 10-52

10-50Cisco Pulse API Reference Guide

OL-21500-02

Page 51: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Add a User-Suggested Tag

This API enables you to implement an interface in which a user can suggest a tag for inclusion in the Pulse Vocabulary.

Object Filename

usersuggest.js

Object

cisco.pulse.osapi.usersuggest

Method

add

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

var options = {};var mainTerm = 'collaboration' + (new Date()).getTime() % 100000;options[cisco.pulse.osapi.usersuggest.options.MAIN_TERM] = mainTerm;options['userId'] = '[email protected]'; // the requirement of userId indicates

server bug

cisco.pulse.osapi.usersuggest.create(options).execute(function(result) {...});

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

mainTerm Suggests a term for inclusion in the Pulse Vocabulary.

String term Required

syn1 Suggests a synonym for the term. String synonym1 Optional

syn2 Suggests a synonym for the term. String synonym2 Optional

syn3 Suggests a synonym for the term. String synonym3 Optional

syn4 Suggests a synonym for the term. String synonym4 Optional

syn5 Suggests a synonym for the term. String synonym5 Optional

10-51Cisco Pulse API Reference Guide

OL-21500-02

Page 52: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

Get Requests

• Get a User-Suggested Tag By Specifying an ID Number, page 10-53

• Get a User-Suggested Tag By Specifying the Tag, page 10-55

• Get Number of User-Suggested Tags, page 10-57

• Get All User-Suggested Tags, page 10-59

10-52Cisco Pulse API Reference Guide

OL-21500-02

Page 53: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get a User-Suggested Tag By Specifying an ID Number

This API enables you to get a user-suggested tag by specifying its ID number.

Object Filename

usersuggest.js

Object

cisco.pulse.osapi.usersuggest

Method

get

Parameters

Field Values

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

operation Specifies the operation, which is to get and list a user-suggested term. You should not specify a null value.

String get Required

searchBy Specifies that you want to get a term with a specified ID. You should not specify a null value.

String id Required

searchValue Specifies that you want to get a term with the specified id-number. You can determine the ID number using pgAdmin, which is a database tool. For information on this tool, go to this URL:

http://www.pgadmin.org/

You should not specify a null value.

Integer id-number Required

fields Gets only the specified field(s) for the user-suggested tag. If you do not specify a value for this parameter, the system displays all fields.

See Field Values table Optional

Field Description Type

cat This field is not currently supported. String

desc This field is not currently supported. String

createdTime Displays the date and time that the term grouping was created. Date and time

createdBy Displays the user ID of the person who created the term grouping. String

updatedTime Displays the date and time that the term grouping was last updated. Date and time

10-53Cisco Pulse API Reference Guide

OL-21500-02

Page 54: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.usersuggest.options.SEARCH_BY] = 'id';options[cisco.pulse.osapi.usersuggest.options.SEARCH_VALUE] = 1;options[cisco.pulse.osapi.usersuggest.options.OPERATION] =

cisco.pulse.osapi.usersuggest.getOperations.GET; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.usersuggest.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"adminDecision":"MERGED","createdTime":"2009-03-25 10:12:30.191","syn1":"terms","updatedBy":"george","createdBy":"george","term":"terminology","updatedTime":"2009-03-25 10:12:30.191"}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

updatedBy Displays the user ID of the person who last updated the term grouping.

String

grp This field is not currently supported. String

brd This field is not currently supported. String

nrw This field is not currently supported. String

term Displays a term. String

syn1 Displays the first synonym in the term grouping. String

syn2 Displays the second synonym in the term grouping. String

syn3 Displays the third synonym in the term grouping. String

syn4 Displays the fourth synonym in the term grouping. String

syn5 Displays the fifth synonym in the term grouping. String

adminDecision Displays whether the business administrator accepted or rejected the tag for inclusion in the Pulse Vocabulary.

String

Field Description Type

10-54Cisco Pulse API Reference Guide

OL-21500-02

Page 55: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get a User-Suggested Tag By Specifying the Tag

This API enables you to get a user-suggested tag by specifying the tag itself.

Object Filename

usersuggest.js

Object

cisco.pulse.osapi.usersuggest

Method

get

Parameters

Field Values

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

operation Specifies the operation, which is to get and list a user-suggested term. You should not specify a null value.

String get Required

searchBy Specifies that you want to get a tag by specifying the tag itself. You should not specify a null value.

String mainTerm Required

searchValue Specifies that you want to get the specified tag. String tag Required

fields Gets only the specified field(s) for the user-suggested tag. If you do not specify a value for this parameter, the system displays all fields.

See Field Values table Optional

Field Description Type

cat This field is not currently supported. String

desc This field is not currently supported. String

createdTime Displays the date and time that the term grouping was created. Date and time

createdBy Displays the user ID of the person who created the term grouping. String

updatedTime Displays the date and time that the term grouping was last updated. Date and time

updatedBy Displays the user ID of the person who last updated the term grouping.

String

grp This field is not currently supported. String

brd This field is not currently supported. String

nrw This field is not currently supported. String

term Displays a term. String

10-55Cisco Pulse API Reference Guide

OL-21500-02

Page 56: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.usersuggest.options.SEARCH_BY] = 'mainTerm';options[cisco.pulse.osapi.usersuggest.options.SEARCH_VALUE] = term;options[cisco.pulse.osapi.usersuggest.options.OPERATION] =

cisco.pulse.osapi.usersuggest.getOperations.GET; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.usersuggest.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"adminDecision":"MERGED","createdTime":"2009-03-25 10:12:30.191","syn1":"terms","updatedBy":"george","createdBy":"george","term":"terminology","updatedTime":"2009-03-25 10:12:30.191"}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

syn1 Displays the first synonym in the term grouping. String

syn2 Displays the second synonym in the term grouping. String

syn3 Displays the third synonym in the term grouping. String

syn4 Displays the fourth synonym in the term grouping. String

syn5 Displays the fifth synonym in the term grouping. String

adminDecision Displays whether the business administrator accepted or rejected the tag for inclusion in the Pulse Vocabulary.

String

Field Description Type

10-56Cisco Pulse API Reference Guide

OL-21500-02

Page 57: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get Number of User-Suggested Tags

This API enables you to get the current number of user-suggested tags.

Object Filename

usersuggest.js

Object

cisco.pulse.osapi.usersuggest

Method

get

Parameters

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.usersuggest.options.FILTER_OP] = 'startsWith';options[cisco.pulse.osapi.usersuggest.options.FILTER_VALUE] = 'c';options[cisco.pulse.osapi.usersuggest.options.OPERATION] =

cisco.pulse.osapi.usersuggest.getOperations.GET_COUNT; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.usersuggest.get(options).execute(function(result) {...});

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

operation Specifies the operation, which is to get a count of currently existing user-suggested tags. You should not specify a null value.

String getCount Required

filterOp Specifies a filter, which narrows the number of terms counted to those that start with the specified letter(s). You can specify a null value.

String startsWith Optional

filterValue Narrows the count to terms that start with the specified letter(s), for example, a, b, ca, and so on. You can specify a null value.

String letter(s) Optional

10-57Cisco Pulse API Reference Guide

OL-21500-02

Page 58: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

</script>]]> </Content>

</Module>

Expected Results

• Success:

[{"data":{"count":76,"vocabType":"US"}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-58Cisco Pulse API Reference Guide

OL-21500-02

Page 59: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Get All User-Suggested Tags

This API enables you to get the user-suggested tags that match the specified parameters.

Object Filename

usersuggest.js

Object

cisco.pulse.osapi.usersuggest

Method

get

Parameters

Parameter Description Type Expected Value Status

userId Specifies the user ID for a user with the system or business administrator privilege levels. You must specify the expected value.

String user-id Required

operation Specifies the operation, which is to get and list all currently existing user-suggested tags. You should not specify a null value.

String getAll Required

count Specifies the number of terms to get. If you do not specify this parameter, 20 terms are retrieved and listed.

Integer integer Optional

startIndex Specifies that results starting from the provided index (position) are returned.

Integer integer Optional

sortOrder Specifies that the tags are listed in the descending or ascending order in which they were suggested.

String DescendingAscending

Optional

sortBy Specifies the field upon which the user-suggested tags are sorted. If you do not specify this parameter, the tags are sorted by the updatedTime fields.

String updatedTime Optional

filterOp Specifies a filter, which narrows the tags retrieved to those that start with the specified letter(s). You can specify a null value.

String startsWith Optional

filterValue Narrows the retrieved tags to those that start with the specified letter(s), for example, a, b, ca, and so on. You can specify a null value.

String letter(s) Optional

fields Gets only the specified user-suggested tag field(s). If you do not specify a value for this parameter, the system displays all fields.

See Field Values table Optional

10-59Cisco Pulse API Reference Guide

OL-21500-02

Page 60: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Field Values

Sample Request<?xml version="1.0" encoding="UTF-8" ?> - <Module>

- <ModulePrefs title="Profile read example" height="800"><Require feature="opensocial-0.8" /> <Require feature="osapi" /> <Require feature="cisco.pulse.services" />

</ModulePrefs>- <Content type="html">

- <![CDATA[<script type="text/javascript">

options = {};options[cisco.pulse.osapi.usersuggest.options.FILTER_OP] = 'startsWith';options[cisco.pulse.osapi.usersuggest.options.FILTER_VALUE] = 'c';options[cisco.pulse.osapi.usersuggest.options.OPERATION] =

cisco.pulse.osapi.usersuggest.getOperations.GET_ALL; options['userId'] = '[email protected]'; // the requirement of userId

indicates server bug

cisco.pulse.osapi.usersuggest.get(options).execute(function(result) {...});

</script>]]> </Content>

</Module>

Field Description Type

cat This field is not currently supported. String

desc This field is not currently supported. String

createdTime Displays the date and time that the term grouping was created. Date and time

createdBy Displays the user ID of the person who created the term grouping. String

updatedTime Displays the date and time that the term grouping was last updated. Date and time

updatedBy Displays the user ID of the person who last updated the term grouping.

String

grp This field is not currently supported. String

brd This field is not currently supported. String

nrw This field is not currently supported. String

term Displays a term. String

syn1 Displays the first synonym in the term grouping. String

syn2 Displays the second synonym in the term grouping. String

syn3 Displays the third synonym in the term grouping. String

syn4 Displays the fourth synonym in the term grouping. String

syn5 Displays the fifth synonym in the term grouping. String

adminDecision Displays whether or not the business administrator decides to add the suggested term to the Pulse Vocabulary.

String

10-60Cisco Pulse API Reference Guide

OL-21500-02

Page 61: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

Expected Results

• Success:

[{"data":{"startIndex":0,"totalResults":2,"list":[{"adminDecision":"PENDING","createdTime":"2010-04-12 15:56:57.43","updatedBy":"userA","createdBy":"userA","term":"term1","updatedTime":"2010-04-12 15:56:57.43"},{"adminDecision":"PENDING","createdTime":"2010-04-12 15:56:21.757","updatedBy":"userA","createdBy":"userA","term":"term2","updatedTime":"2010-04-12 15:56:21.757"}]}}]

• Failures:

[{"error":{"message":"badRequest: message","code":number}}]

10-61Cisco Pulse API Reference Guide

OL-21500-02

Page 62: Vocabulary Management APIs - Cisco - Global Home Page › c › en › us › td › docs › collaboration › ... · Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary

Chapter 10 Vocabulary Management APIs Cisco Pulse Vocabulary Management JavaScript APIs

10-62Cisco Pulse API Reference Guide

OL-21500-02