Get a resource's ancestors
get/ancestors
Get the ancestors of a resource by URI as a flat list, ordered starting with the parent folder of the resource, and continuing up to the root folder.
1{2 "childUri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",3 "ancestors": [4 {5 "creationTimeStamp": "2022-06-17T18:33:22.626045Z",6 "createdBy": "stpweb1",7 "modifiedTimeStamp": "2022-06-17T18:33:22.626048Z",8 "modifiedBy": "stpweb1",9 "version": 1,10 "id": "c18ba574-76d3-4104-b9b3-9332b6106453",11 "name": "stpweb1",12 "parentFolderUri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",13 "description": "The user folder for stpweb1",14 "type": "userFolder",15 "memberCount": 5,16 "properties": {17 "allowMove": "false",18 "hidden": "true"19 },20 "links": [21 {22 "method": "GET",23 "rel": "self",24 "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",25 "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",26 "type": "application/vnd.sas.content.folder"27 },28 {29 "method": "DELETE",30 "rel": "delete",31 "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",32 "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453"33 },34 {35 "method": "DELETE",36 "rel": "deleteRecursively",37 "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453?recursive=true",38 "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453?recursive=true"39 },40 {41 "method": "GET",42 "rel": "members",43 "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",44 "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",45 "type": "application/vnd.sas.collection",46 "itemType": "application/vnd.sas.content.folder"47 },48 {49 "method": "POST",50 "rel": "addMember",51 "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",52 "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",53 "type": "application/vnd.sas.content.folder.member",54 "responseType": "application/vnd.sas.content.folder.member"55 },56 {57 "method": "GET",58 "rel": "up",59 "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",60 "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",61 "type": "application/vnd.sas.content.folder"62 },63 {64 "method": "GET",65 "rel": "ancestors",66 "href": "/folders/ancestors?childUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",67 "uri": "/folders/ancestors?childUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",68 "type": "application/vnd.sas.content.folder.ancestor"69 },70 {71 "method": "POST",72 "rel": "createChild",73 "href": "/folders/folders?parentFolderUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",74 "uri": "/folders/folders?parentFolderUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",75 "type": "application/vnd.sas.content.folder"76 },77 {78 "method": "PUT",79 "rel": "validateNewMemberName",80 "href": "/folders/commons/validations/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members/@new/name?value={newname}&type={newtype}",81 "uri": "/folders/commons/validations/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members/@new/name?value={newname}&type={newtype}",82 "type": "application/vnd.sas.validation"83 },84 {85 "method": "GET",86 "rel": "transferExport",87 "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",88 "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",89 "responseType": "application/vnd.sas.transfer.object"90 },91 {92 "method": "PUT",93 "rel": "transferImportUpdate",94 "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",95 "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",96 "type": "application/vnd.sas.transfer.object",97 "responseType": "application/vnd.sas.summary"98 }99 ]100 },101 {102 "creationTimeStamp": "2022-06-17T16:33:36.212131Z",103 "createdBy": "anonymous",104 "modifiedTimeStamp": "2022-06-17T16:33:36.212133Z",105 "modifiedBy": "anonymous",106 "version": 1,107 "id": "329d3711-3c38-4391-8920-c35478e2456b",108 "name": "Users",109 "description": "Base Folder for all user folders.",110 "type": "userRoot",111 "memberCount": 6,112 "properties": {113 "allowMove": "false",114 "uuid": "e911697e-fe53-497c-a27c-909c757ba04a"115 },116 "links": [117 {118 "method": "GET",119 "rel": "self",120 "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",121 "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",122 "type": "application/vnd.sas.content.folder"123 },124 {125 "method": "GET",126 "rel": "members",127 "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b/members",128 "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b/members",129 "type": "application/vnd.sas.collection",130 "itemType": "application/vnd.sas.content.folder"131 },132 {133 "method": "GET",134 "rel": "ancestors",135 "href": "/folders/ancestors?childUri=/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",136 "uri": "/folders/ancestors?childUri=/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",137 "type": "application/vnd.sas.content.folder.ancestor"138 },139 {140 "method": "PUT",141 "rel": "validateNewMemberName",142 "href": "/folders/commons/validations/folders/329d3711-3c38-4391-8920-c35478e2456b/members/@new/name?value={newname}&type={newtype}",143 "uri": "/folders/commons/validations/folders/329d3711-3c38-4391-8920-c35478e2456b/members/@new/name?value={newname}&type={newtype}",144 "type": "application/vnd.sas.validation"145 },146 {147 "method": "GET",148 "rel": "transferExport",149 "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",150 "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",151 "responseType": "application/vnd.sas.transfer.object"152 }153 ]154 }155 ],156 "version": 1157}
Status | Meaning | Description | ||
---|---|---|---|---|
200 | OK | The member was found and the ancestry was returned. In the case of a root folder, a 200 HTTP status code and an empty list of ancestors is returned. | Schema | |
204 | No Content | No ancestors were found for the URI. | ||
400 | Bad Request | No childUri parameter was provided. | Schema |