Versions Compared

Key

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

Use the CDAP Profile HTTP RESTful API Microservices to create profiles, list available profiles, and retrieve information about profiles

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 RESTful API Conventions. These methods return a status code, as listed in the RESTful API Status Codes.

Write a Profile

A system profile can be created or updated with an HTTP PUT method to the URL:

...

Code Block
$ PUT /v3/namespace/default/profiles/dataproc -d
{
  "label": "Dataproc",
  "description": "My Dataproc profile",
  "provisioner": {
    "name": "gcp-dataproc",
    "properties": [
      {
        "name": "projectId",
        "value": "my project id",
        "isEditable": false
      },
      ...
    ]
  }
}

List Profiles

To list all system profiles, submit an HTTP GET request:

...

Code Block
$ GET /v3/namespaces/default/profiles
[
  {
    "name": "dataproc",
    "label": "Dataproc",
    "description": "My Dataproc Profile",
    "scope": "SYSTEM",
    "status": "ENABLED",
    "created": 1234567890,
    "provisioner": {
      "name": "gcp-dataproc",
      "properties": [
        {
          "name": "projectId",
          "value": "my project id",
          "isEditable": false
        },
        ...
      ]
    }
  },
  ...
]

Retrieve Profile Details

To retrieve details about a system profile, submit an HTTP GET request:

...

Code Block
$ GET /v3/namespaces/default/profiles/dataproc
{
  "name": "dataproc",
  "label": "Dataproc",
  "description": "My Dataproc Profile",
  "scope": "SYSTEM",
  "status": "ENABLED",
  "created": 1234567890,
  "provisioner": {
    "name": "gcp-dataproc",
    "properties": [
      {
        "name": "projectId",
        "value": "my project id",
        "isEditable": false
      },
      ...
    ]
  }
}

Disable Profile

To disable a system profile, submit an HTTP POST request:

...

Code Block
POST /v3/namespaces/<namespace-id>/profiles/<profile-name>/disable

Enable Profile

To enable a system profile, submit an HTTP POST request:

...

Code Block
POST /v3/namespaces/<namespace-id>/profiles/<profile-name>/enable

Delete Profile

To delete a system profile, submit an HTTP DELETE request:

...