Create a Caslib

post/servers/{serverName}/caslibs
Internal-Use Only

Defines a new caslib.

Request Samples

1

Response Samples

1{
2 "name": "CASUSER(userId)",
3 "metadataId": "26ea7916-86af-4547-9180-9876512345cc",
4 "description": "Personal File System caslib",
5 "path": "/u/userId/",
6 "scope": "global",
7 "type": "PATH",
8 "hidden": false,
9 "transient": false,
10 "version": 1,
11 "attributes": [
12 {
13 "key": "active",
14 "value": {
15 "false": null
16 }
17 },
18 {
19 "key": "personal",
20 "value": {
21 "true": null
22 }
23 },
24 {
25 "key": "subDirs",
26 "value": {
27 "true": null
28 }
29 }
30 ],
31 "links": [
32 {
33 "href": "/casManagement/servers/casServer/caslibs",
34 "itemType": "application/vnd.sas.cas.caslib",
35 "method": "GET",
36 "rel": "up",
37 "type": "application/vnd.sas.collection",
38 "uri": "/casManagement/servers/casServer/caslibs"
39 },
40 {
41 "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
42 "method": "GET",
43 "rel": "self",
44 "type": "application/vnd.sas.cas.caslib",
45 "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
46 },
47 {
48 "href": "casManagement/servers/casServer/caslibs/CASUSER(userId)",
49 "method": "PATCH",
50 "rel": "patch",
51 "responseType": "application/vnd.sas.cas.caslib",
52 "type": "application/vnd.sas.cas.caslib",
53 "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
54 },
55 {
56 "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)",
57 "method": "DELETE",
58 "rel": "delete",
59 "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)"
60 },
61 {
62 "href": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables",
63 "method": "GET",
64 "rel": "tables",
65 "type": "application/vnd.sas.collection",
66 "uri": "/casManagement/servers/casServer/caslibs/CASUSER(userId)/tables"
67 },
68 {
69 "href": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
70 "method": "GET",
71 "rel": "dataSource",
72 "uri": "/dataSources/providers/cas/sources/cas-shared-default~fs~CASUSER(userId)",
73 "type": "application/vnd.sas.data.source"
74 }
75 ]
76}

Path Parameters

NameTypeRequiredDescription
serverName
string
true

Server name for which caslibs should be defined.

Query Parameters

NameTypeRequiredDescription
createDirectory
boolean
false

When creating a path-based Caslib, this parameter indicates whether the leaf-node of the path referenced by the Caslib. Should be created if it does not already exist. Applicable when creating a path-based Caslib. Defaults to false.

sessionId
string
false

Session ID (useful when session-specific Caslib is desired).

Request Body

A caslib object.

The representation of a caslib. Note that links are returned only for GET calls.

NameTypeRequiredDescription
attributes
array [Key/Value Array]
false

Contains an array of key/object pairs related to caslib type-specific settings. Supports simple object types (string, boolean, integer, long) as well as nested arrays. See reference documentation for specific caslib types to determine proper key/object pairs for defining a specific caslib.

description
string
false

Description of the caslib.

name
string
true

Name of the caslib.

metadataId
string
false

A read-only property containing the metadata ID assigned to this caslib.

path
string
false

The path of the caslib.

scope
string
false

The scope of the caslib. Valid values include session or global.

hidden
boolean
false

The hidden value of the caslib. True if this is a hidden caslib. False otherwise.

transient
boolean
false

The transient value of the caslib. True if this is a transient caslib. False otherwise.

type
string
true

Type of the Caslib. Valid values include any caslib type supported by the CAS server, such as Path, HDFS, DNFS, LASR, Teradata, Greenplum, and Oracle.

version
integer
false

The version of this object.

Responses

StatusMeaningDescription
201CreatedThe Caslib was defined successfully. Information about the defined Caslib is returned. Note that links are returned only for GET calls, and are not included in the POST response (though listed here so that endpoints in this documentation can share the same schema definition).HeadersSchema
400Bad RequestThe request was invalid.Schema
404Not FoundThe requested CAS server does not exist.
409ConflictThe request could not be completed due to a conflict with the current state of the resource. Details are included in the response body.