Versions Compared

Key

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

Microservices Conventions

In this API, client refers to an external application that is calling CDAP using the HTTP interface. application refers to a user application that has been deployed into CDAP.

...

Code Block
http://<host>:<port>

where:

Parameter

Description

host

Host name of the CDAP server.

port

Port set as the router.bind.port in cdap-site.xml (default: 11015).

Note: If SSL is enabled for CDAP, then the base URL uses https instead and port becomes the port that is set as the router.ssl.server.port in cdap-site.xml (default: 10443).

...

Common status codes returned for all HTTP calls:

Code

Description

Explanation

200

OK

The request returned successfully.

400

Bad Request

The request had a combination of parameters that is not recognized.

401

Unauthorized

The request did not contain an authentication token; see the section below on Working with CDAP Security.

403

Forbidden

The request was authenticated but the client does not have permission; requests can fail due to a lack of privilege, as described in the section below on “Working with CDAP Security”.

404

Not Found

The request did not address any of the known URIs.

405

Method Not Allowed

A request was received with a method not supported for the URI.

409

Conflict

A request could not be completed due to a conflict with the current resource state.

500

Internal Server Error

An internal error occurred while processing the request.

501

Not Implemented

A request contained a query that is not supported by this API.

Note: These returned status codes are not necessarily included in the descriptions of the APIs, but a request may return any of these.

...

  • When working with a CDAP cluster with security enabled (security.enabled=true in cdap-site.xml), all calls to the HTTP RESTful APIs must be authenticated. Clients must first obtain an access token from the authentication server (see Client Authentication). In order to authenticate, all client requests must supply this access token in the Authorization header of the request:

    Code Block
    Authorization: Bearer <token>

    For CDAP-issued access tokens, the authentication scheme must always be Bearer.

  • When working with a CDAP cluster with authorization enabled (security.authorization.enabled=true in cdap-site.xml), all calls to the HTTP RESTful APIs must be authorized. Clients must be privileged, following the polices described in Authorization Policies.