Add a member to a folder
Adds a new member to the folder. If the member type is 'child' and the object referenced is already a member of any folder (including the specified parent), this operation fails with a 409 status (conflict). If the object being added is a folder, this method checks that the name is unique (among other members that are of the same type). If a name collision occurs, a 409 status is returned.
1{2 "id": "2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",3 "uri": "/reports/reports/1234567890",4 "added": "2019-08-08T12:59:08.775Z",5 "type": "child",6 "name": "Test Report",7 "parentFolderUri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",8 "contentType": "report",9 "links": [10 {11 "method": "GET",12 "rel": "self",13 "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",14 "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",15 "type": "application/vnd.sas.content.folder.member"16 },17 {18 "method": "GET",19 "rel": "up",20 "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",21 "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",22 "type": "application/vnd.sas.content.folder"23 },24 {25 "method": "GET",26 "rel": "getResource",27 "href": "/reports/reports/1234567890",28 "uri": "/reports/reports/1234567890",29 "type": "application/vnd.sas.summary"30 },31 {32 "method": "PUT",33 "rel": "putResource",34 "href": "/reports/reports/1234567890",35 "uri": "/reports/reports/1234567890"36 },37 {38 "method": "DELETE",39 "rel": "deleteResource",40 "href": "/reports/reports/1234567890",41 "uri": "/reports/reports/1234567890"42 },43 {44 "method": "GET",45 "rel": "ancestors",46 "href": "/folders/ancestors?childUri=/reports/reports/1234567890",47 "uri": "/folders/ancestors?childUri=/reports/reports/1234567890",48 "type": "application/vnd.sas.content.folder.ancestor"49 },50 {51 "method": "PUT",52 "rel": "update",53 "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",54 "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",55 "type": "application/vnd.sas.content.folder.member"56 },57 {58 "method": "DELETE",59 "rel": "delete",60 "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",61 "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f"62 },63 {64 "method": "PUT",65 "rel": "validateRename",66 "href": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f/name?value={newname}&type={newtype}",67 "uri": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f/name?value={newname}&type={newtype}",68 "type": "application/vnd.sas.validation"69 },70 {71 "method": "GET",72 "rel": "transferExport",73 "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",74 "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",75 "responseType": "application/vnd.sas.transfer.object"76 },77 {78 "method": "PUT",79 "rel": "transferImportUpdate",80 "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",81 "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",82 "type": "application/vnd.sas.transfer.object",83 "responseType": "application/vnd.sas.summary"84 },85 {86 "method": "POST",87 "rel": "transferImport",88 "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",89 "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",90 "type": "application/vnd.sas.transfer.object",91 "responseType": "application/vnd.sas.summary"92 }93 ],94 "version": 195}
Name | Type | Required | Description |
---|---|---|---|
folderId | string<object-id> | true | The identifier of a specific folder, or of one of the delegate strings @myFolder, @appDataFolder, @myHistory, @myFavorites, or @public. |
Name | Type | Required | Description |
---|---|---|---|
abortOnMetadataFailure | boolean | false | If true, the member creation is aborted if the GET to retrieve the member metadata fails. If false, the member creation succeeds regardless of the metadata retrieval status. The default value is false. |
forceMove | boolean | false | If true, if this is a creation of a child member and if the URI in the member already exists in another folder, the member is moved to the requested folder. If it is already a member of the requested folder, the request succeeds. The default value is false. |
Member
The schema for creating a new folder member.
Name | Type | Required | Description |
---|---|---|---|
uri | string<relative URI> | true | The URI of the item that the member represents. The service does not make any attempt to validate this field, so it can be anything. However, if this is a folder, it MUST be the folder's URI. It should come from the folder's "self" link, and not be assembled from pieces. |
type | string | true | Must be "child" or "reference". Child members are deleted when the parent folder is deleted. Child members that rely on SAS authorization checking inherit authorization settings from the parent folder. An object can be a child of one and only one folder. Reference members have no such restrictions. Any member object can be referenced from an unrestricted number of containers. |
parentFolderUri | string | false | The URI of this member's parent folder. This is writable by the client. In order to perform a move, PUT this member with an updated parentFolderUri pointing to the new parent. |
name | string | true | Localizable name of the member object. This attribute is persisted with the folder for performance reasons. For SAS managed objects, this value is intended to be synchronized with the attribute persisted with the object. |
description | string | false | Localizable description of the member object. Member attribute is synchronized with attribute of member object for SAS managed objects. |
creationTimeStamp | string<date-time> | false | Timestamp of member object creation. Member attribute is synchronized with attribute of member object for SAS managed objects. |
modifiedTimeStamp | string<date-time> | false | Timestamp of last member object modification. Member attribute is synchronized with attribute of member object for SAS managed objects. |
contentType | string | false | Member object type. Member attribute is synchronized with attribute of member object for SAS managed objects. |
typeDefName | string | false | (version 2) If the resource has a subtype that applies, the client can specify it when creating the member. This gives the client navigating the members more information for filtering, sorting, or searching for matching members. |
iconUri | string<relative URI> | false | Member object icon URI. Member attribute is synchronized with attribute of member object for SAS managed objects. |
orderNum | integer | false | Optional ordering specifier to provide user ordering of members. When retrieving members, if no other ordering is specified, members are ordered by this field in ascending order. The values do not have to be sequential; the results are ordered according to the values provided. The values also do not have to be unique. However, duplicates result in arbitrary ordering of records with duplicate values. |
version | integer | false | This media type's schema version number. This representation is version 2. |
Status | Meaning | Description | ||
---|---|---|---|---|
200 | OK | The request succeeded. The member was updated. | Headers | Schema |
201 | Created | A member was created. | Headers | Schema |
400 | Bad Request | The request was invalid. There was an attempt to make a folder its own parent. | Schema | |
404 | Not Found | No folder exists at the requested path. | Schema | |
409 | Conflict | The request could not be completed due to a conflict with the current state of the resource. The URI already exists as a child in this folder or another folder. | Schema | |
422 | Unprocessable Entity | History creation failed because the metadata retrieval failed. | Schema |