This endpoint is in preview and may be modified or removed at any time.
To use this endpoint, add preview=true to the request query parameters.
Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown.
The body of the request must contain the binary content of the file and the Content-Type header must be application/octet-stream.
Third-party applications using this endpoint via OAuth2 must request the following operation scopes: api:ontologies-read api:ontologies-write.
stringThe API name or RID of the Ontology. To find the API name or RID, use the List Ontologies endpoint or check the Ontology Manager.
stringThe API name of the object type. To find the API name, use the List object types endpoint or check the Ontology Manager.
stringThe API name of the media reference property. To find the API name, check the Ontology Manager or use the Get object type endpoint.
stringA path for the media item within its backing media set. Required if the backing media set requires paths.
booleanA boolean flag that, when set to true, enables the use of beta features in preview mode.
objectThe media reference for the uploaded media.
stringThe media type of the file or attachment.
Examples: application/json, application/pdf, application/octet-stream, image/jpeg
unionA union of the types supported by media reference properties.
1
2
3
4
5
curl -X POST \
\t-H "Content-type: application/octet-stream" \
\t-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v2/ontologies/palantir/objectTypes/employee/media/profile_picture/upload?mediaItemPath=my-file.png&preview=true" \
--data-binary '@/path/to/file'