- URL:
- https://<root>/services/<ServiceName>.<ServiceType>/iteminfo/upload
- Methods:
POST- Version Introduced:
- 10.9
Access requirements
Required privileges
The Enterprise Administrator API requires privilege-based access. An administrator must be assigned a specific user privilege, or role, to access any given endpoint. Listed below are the user privileges or roles an administrator can be assigned that provides access to this endpoint. If multiple privileges are listed, only one needs to be assigned to gain access.
Tokens
This API requires token-based authentication. A token is automatically generated for administrators who sign in to the Enterprise Administrator API directory's HTML interface. Tokens generated in this way are stored for the entirety of the session.
Those accessing the API directory outside of the HTML interface will need to acquire a session token from the generate operation in the Enterprise Directory API. For security reasons, all POST requests made to the Enterprise Administrator API must include a token in the request body.
Description
The upload operation uploads a file associated with a service's item information to the server. The uploaded file is placed in a directory defined by the folder parameter, and is accessible by appending the path and file name to the Item Information URL. These uploads are filtered by an approved list of file name extensions:
.xml.img.png.gif.jpg.jpeg.bmp.json
Request parameters
| Parameter | Details |
|---|---|
| The name of the folder on the server to which the file must be uploaded. |
| The file to be uploaded. |
| The response format. The default format is Values: |
Example usage
The following is a sample POST request for the upload operation:
POST /<context>/admin/services/Hosted/MyService.FeatureServer/iteminfo/upload HTTP/1.1
Host: organization.example.com
Content-Type: multipart/form-data; boundary=----boundary
------boundary
Content-Disposition: form-data; name="folder"
UserFolder
------boundary
Content-Disposition: form-data; name="file"; filename=""
Content-Type: application/octet-stream
image.jpg
------boundary
Content-Disposition: form-data; name="f"
pjson
------boundary
Content-Disposition: form-data; name="token"
pTF08-CHWCTee06taPxsNFRbqe6oAmq-WsyD-cOITvUXypJemoP8I_8rPZltViyfP46PmKhkicCgt8dMK5m-4H02kpkIGnUG5yxIgOfkoQRyZ9y3bMhVnkGnh24YU-KDKTI6QQI0kDASxSPWl_ntPevBHbqhORrxLgauHDHoRBCm48fEswZTOyZwQdozczzYbS3wKKecRT66v9ssoRmtmiYLREY4B_nkRfTEZoQSwr6w7LzqLAO5k3wwB3orC1LR
------boundary--JSON Response example
{"status": "success"}