Cisco WebEx Social API Reference Guide, Release 3.4
API Consumer Resource Operations
Downloads: This chapterpdf (PDF - 231.0KB) The complete bookPDF (PDF - 15.05MB) | Feedback

API Consumer Resource Operations

Table Of Contents

API Consumer Resource Operations

Get Information about an API Consumer

Get Information about All API Consumers

Add an API Consumer

Update the Designated API Consumer


API Consumer Resource Operations


A Cisco WebEx Social API consumer is an application that enables the API to access Cisco WebEx Social resources and entities on behalf of a Cisco WebEx Social user. An API consumer applies when you are using the OAuth 1.0a for authorization and authentication. For more information, see Chapter 2 "Authorization and Authentication."

The Cisco WebEx Social API Consumer resource operations let you manage API consumers. Use of these operations requires the Cisco WebEx Social system administrator privilege.

Table 16-1 provides a summary of the API Consumer resource operations. Each operation is described in detail in the section that is listed.

These sections provide this information:

Purpose—Brief explanation of the operation

Availability—Cisco WebEx Social releases that support the operation

Request—HTTP method and URI for the operation

Request Payload—Description of the request payload, if the operation requires one

Response—Description of the expected response when the operation executes

Example—Sample request and response for the operation

Table 16-1 API Consumer Resource Operations Summary 

Operation and Reference
Purpose

Get Information about an API Consumer

Retrieves information about the designated API consumer

Get Information about All API Consumers

Retrieves information about each API consumer that has registered with Cisco WebEx Social

Add an API Consumer

Creates a profile in Cisco WebEx Social for an API consumer

Update the Designated API Consumer

Updates the designated API consumer


Get Information about an API Consumer

Purpose

Retrieves information about the designated API consumer.

Availability

Cisco WebEx Social 3.4 and later.

Request

HTTP Method
URI

GET

{http|https}://server[:port]/api/quad/rest/management/apiconsumers
/
consumer_id[?query_parameters]


where:

server—Host name or IP address of the Cisco WebEx Social server.

port—Port number on which the Cisco WebEx Social server listens for API requests. The default value is 80.

consumer_id—Identifier of the API consumer to retrieve. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

query_parameters—Query parameters. See the "Query Parameters" section for information about using query parameters. For this operation:

The fields query parameter is supported for selecting fields from the Consumer resource to include in a response (Table 3-15 describes these fields)

The filterBy query parameter is not supported for filtering resources in a response

The sortOrder query parameter does not apply

The startIndex query parameter does not apply

The count query parameter does not apply

The meta query parameter does not apply

Request Payload

A request payload is not required.

Response

Standard response (see the "API Responses" section) with a response payload that can include one Consumer resource (the "Consumer Resource" section describes this resource).

Example

Request

GET http://webexsocialserver/api/quad/rest/management/apiconsumers/1210020
Accept:application/json

Response

HTTP/1.1 200 OK
Content-Type: application/json
{
    "statusCode": 200, 
    "startIndex": 0, 
    "itemsPerPage": 1, 
    "totalResults": 0,
    "filtered": false, 
    "sorted": false, 
    "entry": [
        {
            "data": {
                "accessPermission": "", 
                "author": "110189", 
                "callbackUrl": "", 
                "companyId": 0, 
                "consumerKey": "198hj39870phj", 
                "consumerSecret": "39ajke9qte9517", 
                "createDate": 0, 
                "description": "Cisco WebEx Social Mobile App", 
                "id": 1210020, 
                "modifiedDate": 0, 
                "name": "Auth Test 1", 
                "resource": "http://quad.cisco.com/schema/1.0/apiconsumer", 
                "state": "active", 
                "type": null
            }
        }
    ], 
    "serverMessages": null
}

Get Information about All API Consumers

Purpose

Retrieves information about each API consumer that has registered with Cisco WebEx Social.

Availability

Cisco WebEx Social 3.4 and later.

Request

HTTP Method
URI

GET

{http|https}://server[:port]/api/quad/rest/management/apiconsumers/@all
[?query_parameters]


where:

server—Host name or IP address of the Cisco WebEx Social server.

port—Port number on which the Cisco WebEx Social server listens for API requests. The default value is 80.

query_parameters—Query parameters. See the "Query Parameters" section for information about using query parameters. For this operation:

The fields query parameter is supported for selecting fields from the Consumer resource to include in a response (Table 3-15 describes these fields)

The filterBy query parameter is not supported for filtering resources in a response

The sortOrder query parameter is not supported for sorting resources in a response

The startIndex query parameter is supported for paginating return results

The count query parameter is supported for designating the maximum number of items in the return results

The meta query parameter does not apply

Request Payload

A request payload is not required.

Response

Standard response (see the "API Responses" section) with a response payload that can include one or more Consumer resources (the "Consumer Resource" section describes this resource).

Example

Request

GET http://webexsocialserver/api/quad/rest/management/apiconsumers/@all
Accept:application/json

Response

HTTP/1.1 200 OK
Content-Type: application/json
{
    "statusCode": 200,
    "startIndex": 0, 
    "itemsPerPage": 1, 
    "totalResults": 1, 
    "filtered": false, 
    "sorted": false, 
    "entry": [
        {
            "data": {
                "accessPermission": "", 
                "author": "110189", 
                "callbackUrl": "", 
                "companyId": 0, 
                "consumerKey": "198hj39870phj", 
                "consumerSecret": "39ajke9qte9517", 
                "createDate": 0, 
                "description": "Cisco WebEx Social Mobile App", 
                "id": 1210020, 
                "modifiedDate": 0, 
                "name": "Auth Test 1", 
                "resource": "http://quad.cisco.com/schema/1.0/apiconsumer", 
                "state": "active", 
                "type": null
            }
        },
       {
            "data": {
                "accessPermission": "", 
                "author": "110189", 
                "callbackUrl": "", 
                "companyId": 0, 
                "consumerKey": "239487jk098zpo34", 
                "consumerSecret": "39ajke9qte9517", 
                "createDate": 0, 
                "description": "Cisco WebEx Social CIUS App", 
                "id": 1210020, 
                "modifiedDate": 0, 
                "name": "Auth Test 1", 
                "resource": "http://quad.cisco.com/schema/1.0/apiconsumer", 
                "state": "active", 
                "type": null
            }
        }
    ], 
    "serverMessages": null
}

Add an API Consumer

Purpose

Creates a profile in Cisco WebEx Social for an API consumer.

Availability

Cisco WebEx Social 3.4 and later.

Request

HTTP Method
URI

POST

{http|https}://server[:port]/api/quad/rest/management/apiconsumers


where:

server—Host name or IP address of the Cisco WebEx Social server.

port—Port number on which the Cisco WebEx Social server listens for API requests. The default value is 80.

Request Payload

The request payload includes fields from the Consumer resource (Table 3-15 describes these fields):

Required Fields
Optional Fields

name

callbackUrl
description


Response

Standard response (see the "API Responses" section) with a response payload that can include one Consumer resource (the "Consumer Resource" section describes this resource).

Example

Request

POST http://webexsocialserver/api/quad/rest/management/apiconsumers
Accept:application/json
Content-Type:application/json
 
   
{
    "description": "Cisco WebEx Social Mobile App", 
    "name": "Cisco WebEx Social Mobile App", 
    "callbackUrl": "http://callbackurl"
}

Response

Status Code: 201 Created
{
    "statusCode": 200, 
    "startIndex": 0, 
    "itemsPerPage": 1, 
    "totalResults": 0,
    "filtered": false, 
    "sorted": false, 
    "entry": [
        {
            "data": {
                "accessPermission": "", 
                "author": "110189", 
                "callbackUrl": "http://callbackurl", 
                "companyId": 0, 
                "consumerKey": "198hj39870phj", 
                "consumerSecret": "39ajke9qte9517", 
                "createDate": 1316741399291, 
                "description": "Cisco WebEx Social Mobile App", 
                "id": 1210021, 
                "modifiedDate": 1316741399291, 
                "name": "Auth Test", 
                "resource": "http://quad.cisco.com/schema/1.0/apiconsumer", 
                "state": "active", 
                "type": null
            }
        }
    ], 
    "serverMessages": null
}

Update the Designated API Consumer

Purpose

Updates the designated API consumer.

Availability

Cisco WebEx Social 3.4 and later.

Request

HTTP Method
URI

PUT

{http|https}://server[:port]/api/quad/rest/management/apiconsumers
/
consumer_id


where:

server—Host name or IP address of the Cisco WebEx Social server.

port—Port number on which the Cisco WebEx Social server listens for API requests. The default value is 80.

consumer_id—Identifier of the API consumer to update. For information about obtaining the identifier that you need, see the "Identifiers of Cisco WebEx Social Entities" section.

Request Payload

The request payload includes fields from the Consumer resource (Table 3-15 describes these fields):

Required Fields
Optional Fields

callbackURL
description
name
state
type


Response

Standard response (see the "API Responses" section) with an HTTP header only.

Example

Request

PUT http://webexsocialserver/api/quad/rest/management/apiconsumers/1210020
Accept:application/json
Content-Type:application/json
 
   
{
    "callbackUrl": "http://callbackurl", 
    "description": "Cisco WebEx Social Mobile App", 
    "name": "Cisco WebEx Social Mobile App", 
    "state": "active", 
    "type": "desktop"
}

Response

Status Code: 204 No Content