Use the CDAP Preferences Microservices to save, retrieve, and delete preferences in CDAP. Preferences, usage, and examples of using them, are described in Preferences and Runtime Arguments.
All methods or endpoints described in this API have a base URL (typically http://<host>:11015
or https://<host>:10443
) that precedes the resource identifier, as described in the Microservices Conventions. These methods return a status code, as listed in the Microservices Status Codes.
...
Parameter | Description |
---|---|
| Namespace ID. |
| Name of application. |
| One of |
| Name of program. |
Properties, as a map of string-string pairs, are passed in the JSON request body.
...
Status Codes | Description |
---|---|
| The event successfully called the method, and the preferences were set/ |
| The JSON body has an invalid format. |
| The entity for which preferences are being set was not found. |
Get Preferences
To retrieve the current preferences, issue an HTTP GET request:
...
Parameter | Description |
---|---|
| Namespace ID. |
| Name of application. |
| One of |
| Name of program. |
HTTP Responses
Status Codes | Description |
---|---|
| The event successfully called the method, and the preferences were retrieved. |
| The entity for which preferences are being set was not found. |
Delete Preferences
To delete preferences, issue an HTTP DELETE. Preferences can be deleted only at one level with each request:
...
Parameter | Description |
---|---|
| Namespace ID. |
| Name of application. |
| One of |
| Name of program. |
HTTP Responses
Status Codes | Description |
---|---|
| The event successfully called the method, and the preferences were deleted. |
| The entity for which preferences are being deleted was not found. |