Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Namespace ID.

app-id

Name of application.

program-type

One of mapreducesparkworkflowsservices, or workers.

program-id

Name of program.

Properties, as a map of string-string pairs, are passed in the JSON request body.

...

Status Codes

Description

200 OK

The event successfully called the method, and the preferences were set/

400 BAD REQUEST

The JSON body has an invalid format.

404 NOT FOUND

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

Namespace ID.

app-id

Name of application.

program-type

One of mapreducesparkworkflowsservices, or workers.

program-id

Name of program.

HTTP Responses

Status Codes

Description

200 OK

The event successfully called the method, and the preferences were retrieved.

404 NOT FOUND

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

Namespace ID.

app-id

Name of application.

program-type

One of mapreducesparkworkflowsservices. or workers.

program-id

Name of program.

HTTP Responses

Status Codes

Description

200 OK

The event successfully called the method, and the preferences were deleted.

404 NOT FOUND

The entity for which preferences are being deleted was not found.