Get the files that are associated with an object

get/documents/{objectTypeName}/{objectId}/files
Internal-Use Only

Gets the files that are associated with an object and returns them as a collection.

Request Samples

1

Response Samples

1{
2 "links": [
3 {
4 "method": "GET",
5 "rel": "self",
6 "href": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files?start=0&limit=10",
7 "uri": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files?start=0&limit=10",
8 "type": "application/vnd.sas.collection",
9 "itemType": "application/vnd.sas.datahub.file"
10 },
11 {
12 "method": "GET",
13 "rel": "collection",
14 "href": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files",
15 "uri": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files",
16 "type": "application/vnd.sas.collection",
17 "itemType": "application/vnd.sas.datahub.file"
18 },
19 {
20 "method": "POST",
21 "rel": "create",
22 "href": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files",
23 "uri": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files",
24 "type": "application/vnd.sas.datahub.file",
25 "responseType": "application/vnd.sas.datahub.file"
26 }
27 ],
28 "name": "files",
29 "accept": "application/vnd.sas.datahub.file",
30 "start": 0,
31 "count": 2,
32 "items": [
33 {
34 "version": 1,
35 "id": "237f217b-4911-4f5b-9e1a-bc36a6c06ab0",
36 "name": "DocumentsPdf.pdf",
37 "originalName": "DocumentsPdf.pdf",
38 "category": "Attachment",
39 "location": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files/237f217b-4911-4f5b-9e1a-bc36a6c06ab0",
40 "type": "application/pdf",
41 "size": 22159,
42 "uploadedAt": "2022-05-31T12:23:14.493Z",
43 "uploadedBy": "videmo",
44 "links": [
45 {
46 "method": "GET",
47 "rel": "self",
48 "href": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files/237f217b-4911-4f5b-9e1a-bc36a6c06ab0",
49 "uri": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files/237f217b-4911-4f5b-9e1a-bc36a6c06ab0",
50 "type": "application/vnd.sas.datahub.file"
51 },
52 {
53 "method": "GET",
54 "rel": "content",
55 "href": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files/237f217b-4911-4f5b-9e1a-bc36a6c06ab0/content",
56 "uri": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files/237f217b-4911-4f5b-9e1a-bc36a6c06ab0/content",
57 "type": "application/pdf"
58 },
59 {
60 "method": "DELETE",
61 "rel": "delete",
62 "href": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files/237f217b-4911-4f5b-9e1a-bc36a6c06ab0",
63 "uri": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files/237f217b-4911-4f5b-9e1a-bc36a6c06ab0"
64 },
65 {
66 "method": "GET",
67 "rel": "up",
68 "href": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files",
69 "uri": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files",
70 "type": "application/vnd.sas.collection",
71 "itemType": "application/vnd.sas.datahub.file"
72 },
73 {
74 "method": "POST",
75 "rel": "addFile",
76 "href": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files",
77 "uri": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files",
78 "type": "application/vnd.sas.datahub.file",
79 "responseType": "application/vnd.sas.datahub.file"
80 }
81 ]
82 },
83 {
84 "version": 1,
85 "id": "1ebb707a-9e54-47ec-a957-9b2bd64d62a0",
86 "name": "super.txt",
87 "originalName": "super.txt",
88 "category": "Attachment",
89 "location": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files/1ebb707a-9e54-47ec-a957-9b2bd64d62a0",
90 "type": "text/plain",
91 "size": 5,
92 "uploadedAt": "2022-05-31T12:22:42.067Z",
93 "uploadedBy": "videmo",
94 "links": [
95 {
96 "method": "GET",
97 "rel": "self",
98 "href": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files/1ebb707a-9e54-47ec-a957-9b2bd64d62a0",
99 "uri": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files/1ebb707a-9e54-47ec-a957-9b2bd64d62a0",
100 "type": "application/vnd.sas.datahub.file"
101 },
102 {
103 "method": "GET",
104 "rel": "content",
105 "href": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files/1ebb707a-9e54-47ec-a957-9b2bd64d62a0/content",
106 "uri": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files/1ebb707a-9e54-47ec-a957-9b2bd64d62a0/content",
107 "type": "text/plain"
108 },
109 {
110 "method": "DELETE",
111 "rel": "delete",
112 "href": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files/1ebb707a-9e54-47ec-a957-9b2bd64d62a0",
113 "uri": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files/1ebb707a-9e54-47ec-a957-9b2bd64d62a0"
114 },
115 {
116 "method": "GET",
117 "rel": "up",
118 "href": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files",
119 "uri": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files",
120 "type": "application/vnd.sas.collection",
121 "itemType": "application/vnd.sas.datahub.file"
122 },
123 {
124 "method": "POST",
125 "rel": "addFile",
126 "href": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files",
127 "uri": "/svi-datahub/documents/alerts/281eb4b9-c936-4918-a36a-7d2ae57fbee6/files",
128 "type": "application/vnd.sas.datahub.file",
129 "responseType": "application/vnd.sas.datahub.file"
130 }
131 ]
132 }
133 ],
134 "limit": 10,
135 "version": 2
136}

Path Parameters

NameTypeRequiredDescription
objectId
string
true

The ID of the object.

objectTypeName
string
true

The name of the object type to which the object belongs.

Query Parameters

NameTypeRequiredDescription
filter
string
false

The criteria by which to filter the files.

limit
integer
false

The maximum number of files to return in this page of results. The actual number of returned items is fewer if the collection is exhausted.

Default:
10
sortBy
string
false

The criteria by which to sort the files.

start
integer
false

The starting index of the first file in the collection.

Default:
0

Responses

StatusMeaningDescription
200OKThe request succeeded. A collection of metadata for the files that are associated with the object was returned.Schema
400Bad RequestThe start or limit parameter was invalid.Schema
404Not FoundThe object does not exist or the user does not have the correct permissions to view the object.Schema