Upload repository content

put/repository/items/{itemId}/content
Internal-Use Only

Uploads a single file to create a new file or updates the content of an existing file. You can also upload and expand a ZIP file to a container.

Request Samples

1

Response Samples

1{
2 "version": 1,
3 "createdBy": "sastest1",
4 "creationTimeStamp": "2023-08-29T12:23:24Z",
5 "modifiedBy": "sastest1",
6 "modifiedTimeStamp": "2023-09-19T19:01:21Z",
7 "id": "cac68a83-2f9b-4e45-859f-1163581edf1e",
8 "typeId": "businessunit",
9 "createdByDisplayName": "SAS Test User 1 (sastest1)",
10 "modifiedByDisplayName": "SAS Test User 1 (sastest1)",
11 "primaryType": "CONTEXT",
12 "name": "BU",
13 "location": "/",
14 "path": "/BU",
15 "size": 5318049,
16 "propertiesModifiedTimeStamp": "2023-08-29T12:23:24Z",
17 "propertiesModifiedBy": "sastest1",
18 "propertiesModifiedByDisplayName": "SAS Test User 1 (sastest1)",
19 "state": "ACTIVE",
20 "owner": "sastest1",
21 "ownerDisplayName": "SAS Test User 1 (sastest1)",
22 "defaultOwner": "sastest1",
23 "defaultOwnerDisplayName": "SAS Test User 1 (sastest1)",
24 "defaultMajorVersionLimit": 5,
25 "defaultMinorVersionLimit": 10
26}

Path Parameters

NameTypeRequiredDescription
itemId
string
true

The unique identifier for the repository item.

Examples:
"d6eefec9-dcc2-4574-8af8-69897038d9c5"

Query Parameters

NameTypeRequiredDescription
actionStatusId
string
false

The action status ID for monitoring the completion status. The action status ID is obtained by calling batchUpdate with the action UPLOAD or UPLOAD_EXPAND.

Examples:
"z31efec9-dcc2-4574-8af8-69897038d9c6"
comment
string
false

The file version comment for this newly created repository file. If a context or folder is being created this parameter will be ignored.

Examples:
"Final report version."
expand
boolean
false

Determines if the ZIP file on the request should be expanded when it is uploaded to the repository container. This parameter is ignored if the itemId is for a file.

Examples:
true
fileVersion
string
false

The version specification for creating a version of the file. This parameter is not required, so unless a version parameter value is provided, the file is created un-versioned. The valid values for version are MAJOR, MINOR, or a specific version such as 2.3. If MAJOR, the file is created as versioned with initial version 1.0. Similarly, MINOR creates a versioned file with version 0.1. If the file exists and is versioned, new versions are MINOR versions by default. To specify a version other than MAJOR or MINOR, a value can be specified between 0.1 and 99999.99999. If a context or folder is being created, this parameter is ignored.

Examples:
"MAJOR"
name
string
false

The name of the file to be created or updated.

Examples:
"testFile.txt"

Request Body

NameTypeRequiredDescription
filename
string
false

The name of the file. Clients must specify name of the file as form data in the request body.

file
string
false

The actual file content. The content should be listed in the format of standard form data in the request body. Only one file is permitted in a multipart request.

Responses

StatusMeaningDescription
200OKContent was uploaded successfully.Schema
400Bad RequestBad Request
404Not FoundNot found - the repository item could not be found.