Get a collection of columns

get/dataSources/{dataSourceId}/tables/{tableId}/columns
Internal-Use Only

Returns a collection of column resources. Standard paging, filtering and sorting options are specified in the Parameters section below.

Request Samples

1

Response Samples

1{
2 "name": "columns",
3 "accept": "application/vnd.sas.data.column.summary application/vnd.sas.data.column",
4 "count": 15,
5 "start": 0,
6 "limit": 6,
7 "items": [
8 {
9 "name": "Make",
10 "index": 0,
11 "type": "char",
12 "rawLength": 13,
13 "formattedLength": 13,
14 "indexed": false,
15 "version": 2,
16 "links": [
17 {
18 "method": "GET",
19 "rel": "self",
20 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/Make",
21 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/Make",
22 "type": "application/vnd.sas.data.column"
23 },
24 {
25 "method": "GET",
26 "rel": "alternate",
27 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/Make",
28 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/Make",
29 "type": "application/vnd.sas.data.column.summary"
30 },
31 {
32 "method": "GET",
33 "rel": "up",
34 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
35 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
36 "type": "application/vnd.sas.collection",
37 "itemType": "application/vnd.sas.data.column.summary"
38 },
39 {
40 "method": "GET",
41 "rel": "table",
42 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
43 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
44 "type": "application/vnd.sas.data.table"
45 }
46 ]
47 },
48 {
49 "name": "Model",
50 "index": 1,
51 "type": "char",
52 "rawLength": 40,
53 "formattedLength": 40,
54 "indexed": false,
55 "version": 2,
56 "links": [
57 {
58 "method": "GET",
59 "rel": "self",
60 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/Model",
61 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/Model",
62 "type": "application/vnd.sas.data.column"
63 },
64 {
65 "method": "GET",
66 "rel": "alternate",
67 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/Model",
68 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/Model",
69 "type": "application/vnd.sas.data.column.summary"
70 },
71 {
72 "method": "GET",
73 "rel": "up",
74 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
75 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
76 "type": "application/vnd.sas.collection",
77 "itemType": "application/vnd.sas.data.column.summary"
78 },
79 {
80 "method": "GET",
81 "rel": "table",
82 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
83 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
84 "type": "application/vnd.sas.data.table"
85 }
86 ]
87 },
88 {
89 "name": "Type",
90 "index": 2,
91 "type": "char",
92 "rawLength": 8,
93 "formattedLength": 8,
94 "indexed": false,
95 "version": 2,
96 "links": [
97 {
98 "method": "GET",
99 "rel": "self",
100 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/Type",
101 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/Type",
102 "type": "application/vnd.sas.data.column"
103 },
104 {
105 "method": "GET",
106 "rel": "alternate",
107 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/Type",
108 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/Type",
109 "type": "application/vnd.sas.data.column.summary"
110 },
111 {
112 "method": "GET",
113 "rel": "up",
114 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
115 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
116 "type": "application/vnd.sas.collection",
117 "itemType": "application/vnd.sas.data.column.summary"
118 },
119 {
120 "method": "GET",
121 "rel": "table",
122 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
123 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
124 "type": "application/vnd.sas.data.table"
125 }
126 ]
127 },
128 {
129 "name": "MSRP",
130 "index": 3,
131 "type": "double",
132 "rawLength": 8,
133 "formattedLength": 8,
134 "indexed": false,
135 "version": 2,
136 "links": [
137 {
138 "method": "GET",
139 "rel": "self",
140 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/MSRP",
141 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/MSRP",
142 "type": "application/vnd.sas.data.column"
143 },
144 {
145 "method": "GET",
146 "rel": "alternate",
147 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/MSRP",
148 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/MSRP",
149 "type": "application/vnd.sas.data.column.summary"
150 },
151 {
152 "method": "GET",
153 "rel": "up",
154 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
155 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
156 "type": "application/vnd.sas.collection",
157 "itemType": "application/vnd.sas.data.column.summary"
158 },
159 {
160 "method": "GET",
161 "rel": "table",
162 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
163 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
164 "type": "application/vnd.sas.data.table"
165 }
166 ]
167 },
168 {
169 "name": "MPG_City",
170 "label": "MPG (City)",
171 "index": 4,
172 "type": "double",
173 "rawLength": 8,
174 "formattedLength": 12,
175 "indexed": false,
176 "version": 2,
177 "links": [
178 {
179 "method": "GET",
180 "rel": "self",
181 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/MPG_City",
182 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/MPG_City",
183 "type": "application/vnd.sas.data.column"
184 },
185 {
186 "method": "GET",
187 "rel": "alternate",
188 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/MPG_City",
189 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/MPG_City",
190 "type": "application/vnd.sas.data.column.summary"
191 },
192 {
193 "method": "GET",
194 "rel": "up",
195 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
196 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
197 "type": "application/vnd.sas.collection",
198 "itemType": "application/vnd.sas.data.column.summary"
199 },
200 {
201 "method": "GET",
202 "rel": "table",
203 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
204 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
205 "type": "application/vnd.sas.data.table"
206 }
207 ]
208 },
209 {
210 "name": "MPG_Highway",
211 "label": "MPG (Highway)",
212 "index": 5,
213 "type": "double",
214 "rawLength": 8,
215 "formattedLength": 12,
216 "indexed": false,
217 "version": 2,
218 "links": [
219 {
220 "method": "GET",
221 "rel": "self",
222 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/MPG_Highway",
223 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/MPG_Highway",
224 "type": "application/vnd.sas.data.column"
225 },
226 {
227 "method": "GET",
228 "rel": "alternate",
229 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/MPG_Highway",
230 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns/MPG_Highway",
231 "type": "application/vnd.sas.data.column.summary"
232 },
233 {
234 "method": "GET",
235 "rel": "up",
236 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
237 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
238 "type": "application/vnd.sas.collection",
239 "itemType": "application/vnd.sas.data.column.summary"
240 },
241 {
242 "method": "GET",
243 "rel": "table",
244 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
245 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
246 "type": "application/vnd.sas.data.table"
247 }
248 ]
249 }
250 ],
251 "links": [
252 {
253 "method": "GET",
254 "rel": "collection",
255 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
256 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
257 "type": "application/vnd.sas.collection",
258 "itemType": "application/vnd.sas.data.column.summary"
259 },
260 {
261 "method": "GET",
262 "rel": "self",
263 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns?start=0&limit=6",
264 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns?start=0&limit=6",
265 "type": "application/vnd.sas.collection",
266 "itemType": "application/vnd.sas.data.column.summary"
267 },
268 {
269 "method": "GET",
270 "rel": "next",
271 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns?start=6&limit=6",
272 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns?start=6&limit=6",
273 "type": "application/vnd.sas.collection",
274 "itemType": "application/vnd.sas.data.column.summary"
275 },
276 {
277 "method": "GET",
278 "rel": "last",
279 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns?start=12&limit=6",
280 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns?start=12&limit=6",
281 "type": "application/vnd.sas.collection",
282 "itemType": "application/vnd.sas.data.column.summary"
283 },
284 {
285 "method": "GET",
286 "rel": "up",
287 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
288 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
289 "type": "application/vnd.sas.data.table"
290 }
291 ]
292}

Path Parameters

NameTypeRequiredDescription
dataSourceId
string
true

The name of the data source. Its format is providerIdfssourceIdfslibraryName. The format is a tilda encoded form composed of the following: providerId: name of the provider. Examples: cas, Compute Use GET /dataSources/providers to see the list of available providers. sourceId: refers to server id in case of cas and computeContextId in case of compute. An example sourceId for cas is cas-shared-default. An example sourceId for Compute is 97751fe6-8313-487f-865a-f941c8a75f8f (SAS Studio Compute Context). Use GET /dataSources/providers/{providerId}/sources to see the list of available sources. libraryName: name of the library. Use GET /dataSources/providers/{providerId}/sources/{sourceId}/children to see the the list of available libraries. An example dataSourceId for cas is casfscas-shared-defaultfsmodels. An example dataSourceId for Compute is Computefs97751fe6-8313-487f-865a-f941c8a75f8ffssashelp.

tableId
string
true

The URL encoded (i.e. Percent encoded) form of the table's name.

Query Parameters

NameTypeRequiredDescription
excludeItemLinks
boolean
false

Set to true to remove the links from the returned column items. Defaults to false.

filter
string<filter-criteria>
false

Filter criteria for returned columns. The valid filter fields are name and type if supported by the provider. The supported functions are and, or, not, eq, lt, le, gt, ge, contains, startsWith, endsWith, and isNull. Some sample queries: Search by name starting with: .../tables/{tableId}/columns?filter=startsWith(name, 'col') Search by name: .../tables/{tableId}/columns?filter=eq(name, 'column1') Search for multiple tables: .../tables/{tableId}/columns?filter=in(name, 'column1', 'column2', 'column3')

limit
integer
false

The maximum number of columns to return in this page of results. The actual number of returned columns might be less if the collection has been exhausted. Defaults to 25.

preserveSession
boolean
false

This has effect only when the sessionId query parameter is not specified. If this is set to true, no sessionId is provided, the session created by the data service provider is not be terminated. All returned links, except the "self" link, have the sessionId query parameter added to their respective URIs. Also, they contain an additional session link to the application/vnd.sas.data.session resource that corresponds to the provided sessionId. If set to false, or not specified, the session is be terminated after the request is complete. The default is false.

sessionId
string
false

The unique identifier of the session used to access the data service provider's backing service. When this is not specified, the data service provider creates a temporary session, and then terminates it after the request is complete. If this is specified, all returned links, except the "self" link, have the sessionId query parameter added to their respective URIs. Also, they contain an additional session link to the application/vnd.sas.data.session resource that corresponds to the provided sessionId.

sortBy
string<sort-criteria>
false

Sort returned tables. The sort criteria supports the following fields in either ascending or descending order (index, name, type). Some sample sorts: Sort ascending by table name: .../tables/{tableId}/columns?sortBy=name:ascending Sort descending by table name: .../tables/{tableId}/columns?sortBy=name:descending The default sort is by name in ascending index.

start
integer
false

The starting index of the first table in a page. Defaults to 0.

Header Parameters

NameTypeRequiredDescription
Accept-Item
string
false

The desired column representation. The Accept-Item options are: application/vnd.sas.data.column.summary+json application/vnd.sas.data.column+json application/vnd.sas.summary+json If the application/vnd.sas.data.column.summary+json type is specified, or there is no Accept-Item header, the columns are returned as summary representation column objects. In this case, the column contains the following properties: name, type, rawLength, formattedLength, and links.

Allowed values:
application/vnd.sas.data.column.summary+jsonapplication/vnd.sas.data.column+json

Responses

StatusMeaningDescription
200OKThe request succeeded.Schema
400Bad RequestAn invalid request was made in one of the following scenarios: <ul> <li>A negative start value is provided.</li> <li>A negative limit value is provided.</li> <li>A non-existent or unsupported field is specified in the sortBy parameter.</li> </ul> Schema
404Not FoundOne of the following resources does not exist: <ul> <li>The data source</li> <li>The table</li> </ul> Schema