The Analytics Library REST API is provided by the Analytics service. This API enables you to manage the libraries that are used to create SQL+\+ for Analytics user-defined functions.
Version: 0.1
{scheme}://{host}:{port}
The URL scheme, host, and port are as follows.
| Component | Description |
|---|---|
scheme |
The URL scheme. Use Values: |
host |
The host name or IP address of a node running the Analytics Service. Example: |
port |
The Analytics Service REST port. Use Values: |
This section describes the operations available with this REST API.
DELETE /analytics/library/{scope}/{library}
Deletes the specified library entirely.
-
application/json
| Name | Description | Schema |
|---|---|---|
library |
The name of a library. |
String |
scope |
The name of the Analytics scope containing the library. The scope name may contain one or two identifiers, separated by a slash (/). You must URL-encode this parameter to escape any special characters. |
String |
| HTTP Code | Description | Schema |
|---|---|---|
200 |
The operation was successful. |
Object |
404 |
Not found. The library name in the path may be incorrect. |
|
500 |
Internal server error. Incorrect path or port number, incorrect credentials, badly formatted parameters, or missing arguments. |
| Type | Name |
|---|---|
http (basic) |
GET /analytics/library
Returns all libraries and functions.
-
application/json
| HTTP Code | Description | Schema |
|---|---|---|
200 |
Success. Returns an array of objects, each of which contains information about a single library. |
Libraries array |
404 |
Not found. The path may be missing its trailing slash. |
|
500 |
Internal server error. Incorrect path or port number, incorrect credentials, badly formatted parameters, or missing arguments. |
| Type | Name |
|---|---|
http (basic) |
POST /analytics/library/{scope}/{library}
Creates the specified library and its associated functions. If the specified library exists, the existing library is overwritten.
-
multipart/form-data
-
application/json
| Name | Description | Schema |
|---|---|---|
library |
The name of a library. |
String |
scope |
The name of the Analytics scope containing the library. The scope name may contain one or two identifiers, separated by a slash (/). You must URL-encode this parameter to escape any special characters. |
String |
| Name | Description | Schema |
|---|---|---|
data |
The library and all its dependencies, packaged by shiv. |
File (binary) |
type |
The language of the library. Values: |
String |
| HTTP Code | Description | Schema |
|---|---|---|
200 |
The operation was successful. |
Object |
400 |
Bad request. A parameter has an incorrect value. |
|
500 |
Internal server error. Incorrect path or port number, incorrect credentials, badly formatted parameters, or missing arguments. |
| Type | Name |
|---|---|
http (basic) |
This section describes the properties consumed and returned by this REST API.
| Property | Schema | |
|---|---|---|
error |
An error message. |
String |
| Property | Schema | |
|---|---|---|
scope |
The name of the Analytics scope containing the library. The scope name may contain one or two identifiers, separated by a slash (/). Example: |
String |
hash_md5 |
A MD5 hash of the library residing on the server. |
String |
name |
The name of the library. Example: |
String |
To [Create or Update a Library](#post_library) or [Delete a Library](#delete_library), users must have the Full Admin RBAC role.
Type: http
To [Read All Libraries](#get_collection), users must have one of the following RBAC roles:
-
Full Admin
-
Cluster Admin
-
Analytics Admin
Type: http