Add a new Resource Server

post

/oam/services/rest/ssa/api/v1/oauthpolicyadmin/application

Request

Supported Media Types
Body ()
Resource Server that needs to be created
Root Schema : ResourceServer
Type: object
Show Source
Nested Schema : scopes
Type: array
Show Source
Nested Schema : tokenAttributes
Type: array
Show Source
Nested Schema : ScopeSettings
Type: object
Show Source
Nested Schema : AttributeSettings
Type: object
Custom attributes that can be added to the Access Token
Show Source
Back to Top

Response

Supported Media Types

200 Response

Sucessfully created entity - OAuthResourceServer, detail
Body ()
Root Schema : ResourceServer
Type: object
Show Source
Nested Schema : scopes
Type: array
Show Source
Nested Schema : tokenAttributes
Type: array
Show Source
Nested Schema : ScopeSettings
Type: object
Show Source
Nested Schema : AttributeSettings
Type: object
Custom attributes that can be added to the Access Token
Show Source

422 Response

Failed to create OAuth entity "ResourceServer" - name "NameofResourceServer"
Back to Top

Examples

This example demonstrates a sample request against the server for creating a new Resource Server.

cURL Example

curl -i -H 'Content-Type: application/json' -H 'Authorization:Basic d2VibG9naWM6V2VsY29tZTE='
--request POST http:<AdminServerHost:Port>/oam/services/rest/ssa/api/v1/oauthpolicyadmin/application -d 
{"name":"ResServer1","description":"TestResourceServer","scopes":[{"scopeName":"scope1","description":"ViewPage"},{"scopeName":"scope2","description":"UpdatePage"},{"scopeName":"scope3","description":"ModifyPage"}],"tokenAttributes":[{"attrName":"sessionId","attrValue":"$session.id","attrType":"DYNAMIC"},{"attrName":"resSrvAttr","attrValue":"RESOURCECONST","attrType":"STATIC"}],"idDomain":"TestDomain1","audienceClaim":{"subjects":["ab0"]}} 

Example of Request Body

The following example shows the contents of the response body for creating a new Resource Server in JSON format.

HTTP/1.1 200 OK
Date: Thu, 27 Jul 2017 17:30:16 GMT
Content-Length: 27
Content-Type: text/plain
X-ORACLE-DMS-ECID: 78d30c19-07b6-4ac2-a39b-f1cbd8182ebb-0000012d
X-ORACLE-DMS-RID: 0
Set-Cookie: JSESSIONID=4J2FGVVUN8MXI5vdemvJw3HFPHyraFXIDVRoRUZwc_7Uia_SOhG5!-1875566563; path=/; HttpOnly

Sucessfully created entity - OAuthResourceServer, detail...
Back to Top