1. Overview

The service contains a collection of RESTful service calls for saving, getting, updating and deleting User prefernce setting for the UI apps.

Descriptions of these functions can be found in the section headers for each collection of relevant resources.

1.1. URI scheme

Host : localhost
BasePath : /

1.2. Tags

  • UserSettings : User Settings Controller

2. Resources

2.1. UserSettings

User Settings Controller

2.1.1. Create User preference settings for the logged in user

POST /v1/settings
Parameters
Type Name Description Schema

Body

userSettings
optional

User Preference Object

UserSettingsDto

Responses
HTTP Code Description Schema

201

Created, User Settings saved

Resource«UserSettingsDto»

204

No Content, Error retrieving created user settings

No Content

400

Invalid data supplied. Request with correct json format, refer model section for the schema

No Content

409

Conflict, User Setting already exists. Use a PUT to update

No Content

500

Internal Server Error

No Content

Consumes
  • application/json

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

oauth

default

2.1.2. Get User preference settings for the logged in User

GET /v1/settings
Responses
HTTP Code Description Schema

200

OK

Resource«UserSettingsDto»

404

Not found, no preference setting found for the user

No Content

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

oauth

default

2.1.3. Update User preference settings for the logged in user

PUT /v1/settings
Parameters
Type Name Description Schema

Body

userDetail
optional

User Preference Object

UserSettingsDto

Responses
HTTP Code Description Schema

200

OK

Resource«UserSettingsDto»

400

Invalid data supplied. Request with correct json format, refer model section for the schema

No Content

404

Not Found, There is no saved User preference settings for the logged in user

No Content

500

Internal Server Error

No Content

Consumes
  • application/json

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

oauth

default

2.1.4. Delete User preference settings for the logged in user

DELETE /v1/settings
Responses
HTTP Code Description Schema

200

Ok, the record got deleted

No Content

404

Not Found, User preference file not found

No Content

500

Internal Server Error

No Content

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

oauth

default

2.1.5. Create User settings for the logged in user

POST /v2/settings
Parameters
Type Name Description Schema

Body

userSettingsRequest
optional

User Setting Object

UserSettingRequest

Responses
HTTP Code Description Schema

201

Created

UserSettingResource

204

No Content, Error retrieving created user settings

HttpErrorResponse

400

Invalid data supplied

HttpErrorResponse

401

User Unauthorized

No Content

409

Conflict, User Setting already exists. Use a PUT to update

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

oauth

default

2.1.6. Get User settings for the logged in User

GET /v2/settings
Parameters
Type Name Description Schema

Query

appId
required

appId

integer (int32)

Query

viewName
required

viewName

string

Responses
HTTP Code Description Schema

200

OK

UserSettingResource

400

Invalid data supplied

HttpErrorResponse

401

User Unauthorized

No Content

404

Not found, no user setting found for the user

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

oauth

default

2.1.7. Update User settings for the logged in user

PUT /v2/settings
Parameters
Type Name Description Schema

Body

request
optional

User Preference Object

UserSettingRequest

Responses
HTTP Code Description Schema

200

OK

UserSettingResource

400

Invalid data supplied

HttpErrorResponse

401

User Unauthorized

No Content

404

Not Found, There is no saved User settings for the logged in user

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Consumes
  • application/json

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

oauth

default

2.1.8. Delete User settings for the logged in user

DELETE /v2/settings
Parameters
Type Name Description Schema

Query

appId
required

appId

integer (int32)

Query

viewName
required

viewName

string

Responses
HTTP Code Description Schema

200

OK

object

204

Success

object

400

Invalid data supplied

HttpErrorResponse

401

User Unauthorized

No Content

404

Not Found, User Setting not found

HttpErrorResponse

500

Internal Server Error

HttpErrorResponse

Produces
  • application/json;charset=UTF-8

Security
Type Name Scopes

oauth2

oauth

default

3. Definitions

3.1. Error

Name Schema

code
optional

string

details
optional

object

3.2. HttpErrorResponse

Name Schema

error
optional

Error

path
optional

string

timestamp
optional

string

Name Schema

href
optional

string

rel
optional

string

templated
optional

boolean

3.4. Map«string,object»

Type : < string, object > map

3.5. Resource«UserSettingsDto»

Name Description Schema

appSettings
optional

The application specific settings, Eg:- 'App Name' : {'property1' : 'value' , 'property2' : 'value'} }
Example : {
"AppKey1" : {
"property1" : { },
"property2" : { },
"property3" : { }
},
"AppKey2" : {
"property1" : { },
"property2" : { },
"property3" : { }
},
"AppKey3" : {
"property1" : { },
"property2" : { },
"property3" : { }
}
}

< string, < string, object > map > map

globalSettings
optional

The global application settings to be used accross applications Eg:- { 'autoRefresh' : true}
Example : {
"property1" : { },
"property2" : { },
"property3" : { }
}

object

links
optional

< Link > array

3.6. UserSettingRequest

Name Description Schema

appId
optional

integer (int32)

data
optional

The application specific settings, Eg:- 'App Name' : {'property1' : 'value' , 'property2' : 'value'} }
Example : {
"AppKey1" : {
"property1" : { },
"property2" : { },
"property3" : { }
},
"AppKey2" : {
"property1" : { },
"property2" : { },
"property3" : { }
},
"AppKey3" : {
"property1" : { },
"property2" : { },
"property3" : { }
}
}

object

viewName
optional

string

3.7. UserSettingResource

Name Schema

appId
optional

integer (int32)

data
optional

object

defaultSetting
optional

boolean

links
optional

< Link > array

viewName
optional

string

3.8. UserSettingsDto

Name Description Schema

appSettings
optional

The application specific settings, Eg:- 'App Name' : {'property1' : 'value' , 'property2' : 'value'} }
Example : {
"AppKey1" : {
"property1" : { },
"property2" : { },
"property3" : { }
},
"AppKey2" : {
"property1" : { },
"property2" : { },
"property3" : { }
},
"AppKey3" : {
"property1" : { },
"property2" : { },
"property3" : { }
}
}

< string, < string, object > map > map

globalSettings
optional

The global application settings to be used accross applications Eg:- { 'autoRefresh' : true}
Example : {
"property1" : { },
"property2" : { },
"property3" : { }
}

object

4. Security

4.1. oauth

Type : oauth2
Flow : accessCode
Token URL : https://localhost:8080/uaa/oauth/authorize
Token URL : https://localhost:8080/uaa/oauth/token

Name Description

default

Default oauth2 scope.