Get a collection of tables

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

Returns a collection of tables available from the named data source as application/vnd.sas.data.table or application/vnd.sas.data.table.summary resources. Standard paging, filtering, and sorting options are specified in the Parameters section below.

Request Samples

1

Response Samples

1{
2 "name": "tables",
3 "accept": "application/vnd.sas.data.table application/vnd.sas.data.table.summary",
4 "version": 2,
5 "count": 730,
6 "start": 0,
7 "limit": 3,
8 "items": [
9 {
10 "name": "AIRLINES",
11 "providerId": "cas",
12 "dataSourceId": "MYCASLIB",
13 "type": "dataTable",
14 "creationTimeStamp": "0001-01-01T00:00:00Z",
15 "modifiedTimeStamp": "0001-01-01T00:00:00Z",
16 "attributes": {
17 "loaded": true,
18 "characterSet": "UTF8",
19 "global": true,
20 "caslibId": "MYCASLIB",
21 "rowCount": 6048,
22 "columnCount": 8,
23 "sessionId": "6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
24 "encoding": "utf-8",
25 "serverId": "cas"
26 },
27 "version": 2,
28 "links": [
29 {
30 "method": "GET",
31 "rel": "self",
32 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/AIRLINES",
33 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/AIRLINES",
34 "type": "application/vnd.sas.data.table"
35 },
36 {
37 "method": "GET",
38 "rel": "alternate",
39 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/AIRLINES",
40 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/AIRLINES",
41 "type": "application/vnd.sas.data.table.summary"
42 },
43 {
44 "method": "GET",
45 "rel": "connectionAttributes",
46 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/AIRLINES",
47 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/AIRLINES",
48 "type": "application/vnd.sas.attributes"
49 },
50 {
51 "method": "GET",
52 "rel": "sessionScoped",
53 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/AIRLINES?sessionId=6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
54 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/AIRLINES?sessionId=6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
55 "type": "application/vnd.sas.data.table"
56 },
57 {
58 "method": "GET",
59 "rel": "session",
60 "href": "/dataSources/providers/cas/sources/cas-shared-default/sessions/6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
61 "uri": "/dataSources/providers/cas/sources/cas-shared-default/sessions/6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
62 "type": "application/vnd.sas.data.session"
63 },
64 {
65 "method": "GET",
66 "rel": "up",
67 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables",
68 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables",
69 "type": "application/vnd.sas.collection",
70 "itemType": "application/vnd.sas.data.table"
71 },
72 {
73 "method": "GET",
74 "rel": "source",
75 "href": "/dataSources/providers/cas/sources/cas-shared-default",
76 "uri": "/dataSources/providers/cas/sources/cas-shared-default",
77 "type": "application/vnd.sas.data.source"
78 },
79 {
80 "method": "GET",
81 "rel": "rows",
82 "href": "/rowSets/tables/cas~cas-shared-default~fs~MYCASLIB~fs~AIRLINES/rows",
83 "uri": "/rowSets/tables/cas~cas-shared-default~fs~MYCASLIB~fs~AIRLINES/rows",
84 "type": "application/vnd.sas.collection",
85 "itemType": "application/vnd.sas.data.row"
86 },
87 {
88 "method": "GET",
89 "rel": "rowSet",
90 "href": "/rowSets/tables/cas~cas-shared-default~fs~MYCASLIB~fs~AIRLINES/rowSet",
91 "uri": "/rowSets/tables/cas~cas-shared-default~fs~MYCASLIB~fs~AIRLINES/rowSet",
92 "type": "application/vnd.sas.data.row.set"
93 },
94 {
95 "method": "GET",
96 "rel": "columns",
97 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/AIRLINES/columns",
98 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/AIRLINES/columns",
99 "type": "application/vnd.sas.collection",
100 "itemType": "application/vnd.sas.data.column.summary"
101 },
102 {
103 "method": "GET",
104 "rel": "provider",
105 "href": "/dataTables/providers/cas",
106 "uri": "/dataTables/providers/cas",
107 "type": "application/vnd.sas.data.provider"
108 },
109 {
110 "method": "GET",
111 "rel": "dataSource",
112 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB",
113 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB",
114 "type": "application/vnd.sas.data.source"
115 }
116 ]
117 },
118 {
119 "name": "CARS",
120 "providerId": "cas",
121 "dataSourceId": "MYCASLIB",
122 "type": "dataTable",
123 "creationTimeStamp": "0001-01-01T00:00:00Z",
124 "modifiedTimeStamp": "0001-01-01T00:00:00Z",
125 "attributes": {
126 "loaded": true,
127 "characterSet": "UTF8",
128 "global": true,
129 "caslibId": "MYCASLIB",
130 "rowCount": 6048,
131 "columnCount": 8,
132 "sessionId": "6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
133 "encoding": "utf-8",
134 "serverId": "cas"
135 },
136 "version": 2,
137 "links": [
138 {
139 "method": "GET",
140 "rel": "self",
141 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
142 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
143 "type": "application/vnd.sas.data.table"
144 },
145 {
146 "method": "GET",
147 "rel": "alternate",
148 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
149 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
150 "type": "application/vnd.sas.data.table.summary"
151 },
152 {
153 "method": "GET",
154 "rel": "connectionAttributes",
155 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
156 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS",
157 "type": "application/vnd.sas.attributes"
158 },
159 {
160 "method": "GET",
161 "rel": "sessionScoped",
162 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS?sessionId=6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
163 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS?sessionId=6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
164 "type": "application/vnd.sas.data.table"
165 },
166 {
167 "method": "GET",
168 "rel": "session",
169 "href": "/dataSources/providers/cas/sources/cas-shared-default/sessions/6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
170 "uri": "/dataSources/providers/cas/sources/cas-shared-default/sessions/6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
171 "type": "application/vnd.sas.data.session"
172 },
173 {
174 "method": "GET",
175 "rel": "up",
176 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables",
177 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables",
178 "type": "application/vnd.sas.collection",
179 "itemType": "application/vnd.sas.data.table"
180 },
181 {
182 "method": "GET",
183 "rel": "source",
184 "href": "/dataSources/providers/cas/sources/cas-shared-default",
185 "uri": "/dataSources/providers/cas/sources/cas-shared-default",
186 "type": "application/vnd.sas.data.source"
187 },
188 {
189 "method": "GET",
190 "rel": "rows",
191 "href": "/rowSets/tables/cas~cas-shared-default~fs~MYCASLIB~fs~CARS/rows",
192 "uri": "/rowSets/tables/cas~cas-shared-default~fs~MYCASLIB~fs~CARS/rows",
193 "type": "application/vnd.sas.collection",
194 "itemType": "application/vnd.sas.data.row"
195 },
196 {
197 "method": "GET",
198 "rel": "rowSet",
199 "href": "/rowSets/tables/cas~cas-shared-default~fs~MYCASLIB~fs~CARS/rowSet",
200 "uri": "/rowSets/tables/cas~cas-shared-default~fs~MYCASLIB~fs~CARS/rowSet",
201 "type": "application/vnd.sas.data.row.set"
202 },
203 {
204 "method": "GET",
205 "rel": "columns",
206 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
207 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/CARS/columns",
208 "type": "application/vnd.sas.collection",
209 "itemType": "application/vnd.sas.data.column.summary"
210 },
211 {
212 "method": "GET",
213 "rel": "provider",
214 "href": "/dataTables/providers/cas",
215 "uri": "/dataTables/providers/cas",
216 "type": "application/vnd.sas.data.provider"
217 },
218 {
219 "method": "GET",
220 "rel": "dataSource",
221 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB",
222 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB",
223 "type": "application/vnd.sas.data.source"
224 }
225 ]
226 },
227 {
228 "name": "MOVIES",
229 "providerId": "cas",
230 "dataSourceId": "MYCASLIB",
231 "type": "dataTable",
232 "creationTimeStamp": "0001-01-01T00:00:00Z",
233 "modifiedTimeStamp": "0001-01-01T00:00:00Z",
234 "attributes": {
235 "loaded": true,
236 "characterSet": "UTF8",
237 "global": true,
238 "caslibId": "MYCASLIB",
239 "rowCount": 6048,
240 "columnCount": 8,
241 "sessionId": "6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
242 "encoding": "utf-8",
243 "serverId": "cas"
244 },
245 "version": 2,
246 "links": [
247 {
248 "method": "GET",
249 "rel": "self",
250 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/MOVIES",
251 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/MOVIES",
252 "type": "application/vnd.sas.data.table"
253 },
254 {
255 "method": "GET",
256 "rel": "alternate",
257 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/MOVIES",
258 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/MOVIES",
259 "type": "application/vnd.sas.data.table.summary"
260 },
261 {
262 "method": "GET",
263 "rel": "connectionAttributes",
264 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/MOVIES",
265 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/MOVIES",
266 "type": "application/vnd.sas.attributes"
267 },
268 {
269 "method": "GET",
270 "rel": "sessionScoped",
271 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/MOVIES?sessionId=6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
272 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/MOVIES?sessionId=6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
273 "type": "application/vnd.sas.data.table"
274 },
275 {
276 "method": "GET",
277 "rel": "session",
278 "href": "/dataSources/providers/cas/sources/cas-shared-default/sessions/6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
279 "uri": "/dataSources/providers/cas/sources/cas-shared-default/sessions/6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
280 "type": "application/vnd.sas.data.session"
281 },
282 {
283 "method": "GET",
284 "rel": "up",
285 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables",
286 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables",
287 "type": "application/vnd.sas.collection",
288 "itemType": "application/vnd.sas.data.table"
289 },
290 {
291 "method": "GET",
292 "rel": "source",
293 "href": "/dataSources/providers/cas/sources/cas-shared-default",
294 "uri": "/dataSources/providers/cas/sources/cas-shared-default",
295 "type": "application/vnd.sas.data.source"
296 },
297 {
298 "method": "GET",
299 "rel": "rows",
300 "href": "/rowSets/tables/cas~cas-shared-default~fs~MYCASLIB~fs~MOVIES/rows",
301 "uri": "/rowSets/tables/cas~cas-shared-default~fs~MYCASLIB~fs~MOVIES/rows",
302 "type": "application/vnd.sas.collection",
303 "itemType": "application/vnd.sas.data.row"
304 },
305 {
306 "method": "GET",
307 "rel": "rowSet",
308 "href": "/rowSets/tables/cas~cas-shared-default~fs~MYCASLIB~fs~MOVIES/rowSet",
309 "uri": "/rowSets/tables/cas~cas-shared-default~fs~MYCASLIB~fs~MOVIES/rowSet",
310 "type": "application/vnd.sas.data.row.set"
311 },
312 {
313 "method": "GET",
314 "rel": "columns",
315 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/MOVIES/columns",
316 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables/MOVIES/columns",
317 "type": "application/vnd.sas.collection",
318 "itemType": "application/vnd.sas.data.column.summary"
319 },
320 {
321 "method": "GET",
322 "rel": "provider",
323 "href": "/dataTables/providers/cas",
324 "uri": "/dataTables/providers/cas",
325 "type": "application/vnd.sas.data.provider"
326 },
327 {
328 "method": "GET",
329 "rel": "dataSource",
330 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB",
331 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB",
332 "type": "application/vnd.sas.data.source"
333 }
334 ]
335 }
336 ],
337 "links": [
338 {
339 "method": "GET",
340 "rel": "collection",
341 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables",
342 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables",
343 "type": "application/vnd.sas.collection",
344 "itemType": "application/vnd.sas.data.table"
345 },
346 {
347 "method": "GET",
348 "rel": "next",
349 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables?start=10&limit=10",
350 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables?start=10&limit=10",
351 "type": "application/vnd.sas.collection"
352 },
353 {
354 "method": "GET",
355 "rel": "last",
356 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables?start=730&limit=1",
357 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables?start=730&limit=1",
358 "type": "application/vnd.sas.collection"
359 },
360 {
361 "method": "GET",
362 "rel": "self",
363 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables?start=0&limit=10",
364 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables?start=0&limit=10",
365 "type": "application/vnd.sas.collection",
366 "itemType": "application/vnd.sas.data.table"
367 },
368 {
369 "method": "GET",
370 "rel": "sessionScoped",
371 "href": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables?sessionId=6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f&start=0&limit=1",
372 "uri": "/dataTables/dataSources/cas~cas-shared-default~fs~MYCASLIB/tables?sessionId=6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f&start=0&limit=1",
373 "type": "application/vnd.sas.collection",
374 "itemType": "application/vnd.sas.data.table"
375 },
376 {
377 "method": "GET",
378 "rel": "up",
379 "href": "/dataSources/providers/cas/sources/cas~cas-shared-default~fs~MYCASLIB",
380 "uri": "/dataSources/providers/cas/sources/cas~cas-shared-default~fs~MYCASLIB",
381 "type": "application/vnd.sas.data.source"
382 },
383 {
384 "method": "GET",
385 "rel": "session",
386 "href": "/dataSources/providers/cas/sources/cas-shared-default/sessions/6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
387 "uri": "/dataSources/providers/cas/sources/cas-shared-default/sessions/6a5ebbb5-0f3a-0a4d-a433-17e44f65e34f",
388 "type": "application/vnd.sas.data.session"
389 }
390 ]
391}

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.

Query Parameters

NameTypeRequiredDescription
filter
string<filter-criteria>
false

Filter criteria for returned tables. 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: .../{dataSourceId}/tables?filter=startsWith(name, 'tab') Search by name: .../{dataSourceId}/tables?filter=eq(name, 'table1') Search for multiple tables: .../{dataSourceId}/tables?filter=in(name, 'table1', 'table2', 'table3')

limit
integer
false

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

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 (name, type, createdBy, modifiedBy, creationTimeStamp and modifiedTimeStamp). Some sample sorts: Sort ascending by table name:.../{dataSourceId}/tables?sortBy=name:ascending Sort descending by table name:.../{dataSourceId}/tables?sortBy=name:descending The default sort is by name in ascending order.

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.table+json application/vnd.sas.data.table.summary+json If the application/vnd.sas.data.table+json type is specified or there is no Accept-Item header, the tables are returned as the complete representation table objects.

Allowed values:
application/vnd.sas.data.table+jsonapplication/vnd.sas.data.table.summary+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 FoundThe data source does not exist.Schema