Cisco WebEx Social API Reference Guide, Release 3.3
API Client Resource Operations
Downloads: This chapterpdf (PDF - 191.0KB) The complete bookPDF (PDF - 14.25MB) | Feedback

API Client Resource Operation

Table Of Contents

API Client Resource Operation

Register an API Client


API Client Resource Operation


A Cisco WebEx Social API client 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 client applies when you are using OAuth 2 for authorization and authentication. For more information, see Chapter 2 "Authorization and Authentication."

The Cisco WebEx Social API Client resource operation let you register an API client. Use of this operation requires the Cisco WebEx Social system administrator privilege.

Table 16-1 provides a summary of the API Client resource operation. This operation is described in detail in the section that is listed. The section provides 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 Configuration Operation Summary 

Operation and Reference
Purpose

Register an API Client

Creates a profile in Cisco WebEx Social for an API client


Register an API Client

Purpose

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

Availability

Cisco WebEx Social 3.3 and later.

Request

HTTP Method
URI

POST

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


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 Client resource (Table 3-5 describes these fields:

Required Fields
Optional Fields

title
type
flow1

redirectUri

1 If you are using the OAuth 2.0 authorization code flow, specify authorization_code for the flow field. If you are using the OAuth 2.0 implicit flow, specify implicit for the flow field.


Response

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

Example

Request—Authorization Code Flow

POST http:///webexsocialserver/api/quad/rest/management/apiclients
Accept:application/json
Content-Type:application/json
{"redirectUri":"http://client.url.com/redirecturl",
  "title":"Client Title",
  "type":"confidential",
  "flow":"authorization_code"
}

Response—Authorization Code Flow

{
   "statusCode":200,
   "startIndex":0,
   "itemsPerPage":1,
   "totalResults":0,
   "filtered":false,
   "sorted":false,
   "entry":[
      {
         "data":{
            "clientId":"bbe60273f56b6835e4f845a537caa5d1443a92d1",
            "clientSecret":"d84f6cd3512307a88a652008517490292e4a3ea3",
            "companyId":10195,
            "createDate":null,
            "flow":"authorization code",
            "iconUrl":"",
            "id":0,
            "modifiedDate":null,
            "redirectUri":"http://client.url.com/redirecturl",
            "resource":"http://client.url.com/redirecturl",
            "title":"Client Title",
            "type":"confidential",
            "userId":10258,
            "userName":"Pat Kim"
         }
      }
   ],
   "serverMessages":null
}

Request—Implicit Flow

POST http:///webexsocialserver/api/quad/rest/management/apiclients
Accept: application/json
Content-Type:application/json
{"title":"Your Implicit Client",
  "type":"public",
  "flow":"implicit",
  "redirect_uri":"http://yoursite.com"
}

Response—Implicit Flow

{
   "statusCode": 200,
   "startIndex": 0,
  "itemsPerPage": 1,
   "totalResults": 1,
   "filtered": false,
   "sorted": false,
   "entry": [
     {
       "data": {
         "clientId": "1d26f84c735390df0c8b890f6b74f07b04433adb",
         "clientSecret": "8a7c775303e4558d73944da8f0ebd94b014d1df0",
         "companyId": 10196,
         "createDate": null,
         "flow": "implicit",
         "iconUrl": "",
         "id": 0,
         "modifiedDate": null,
         "redirectUri": "",
         "resource": "http://quad.cisco.com/schema/1.0/base",
         "title": "Your Implicit Client",
         "type": "public",
         "userId": 10258,
         "userName": "Pat Kim"
       }
     }
   ],
   "serverMessages": null
 }