- Home
- Resources
- MediaResource
The Media resource provides read-only access to the standard media objects
which are in the content server.
Named Objects & Collections
Name | Description |
Media |
To fetch the media object which will have link to the physical resource. |
MediaContent |
The link to fetch the datasource for a given media object. |
Data Model Objects
- SCFileElement
- SCImageFile
- SCTextFile
- FileDatasource
The following resources are applicable:
GET /media/{mediaId}
Fetch a Media business object (SCFileElement instance).
Request Parameters
name |
type |
description |
default |
mediaId |
path |
The SCId of the Media object. |
n/a |
Response Codes
code |
condition |
404 |
When Media object is not found. |
400 |
When the incoming mediaId is invalid. |
Response Body
media type |
data type |
application/vnd.ptc.sc+json |
SCItem
(JSON) |
GET /media/{mediaId}/{relative}
Streams Media content to a client. Passes through to the over-loaded getMediaContent
method with null contentId. Signature exists to support null contentId.
(e.g. /media/{mediaId}/files/) where the default content, without specifying the
actual file identifier, is then selected.
Request Parameters
name |
type |
description |
default |
Accept |
header |
The HTTP Accept header representing the type of content desired. |
n/a |
mediaId |
path |
The Id of the Media object to retrieve. Standard Media objects are instances of SCFileElement
however there is supporting auxiliary data based on other types that may be retrieved through
this URI. |
n/a |
relative |
path |
The "media root". Values are constrained by the MediaServiceSvr.MEDIA_ROOT enumeration.
Standard Media objects are streamed through "files" and supporting Media may come through
other paths (e.g. css, scripts, etc.). |
n/a |
forceDownload |
query |
Instructs the resource to provide content header "Content-Disposition: attachment" so
browsers will show a "save" dialog prompted to the user. |
n/a |
highlight |
query |
The search term that should be highlighted in the desired content. Parameter will only be
populated if the content has been requested from a search result. |
n/a |
Response Codes
code |
condition |
404 |
When Media object is not found. |
400 |
When the incoming mediaId is invalid. |
406 |
If the client Accept header it too restrictive for the type of content being requested. |
Response Body
media type |
data type |
application/vnd.ptc.sc+json |
object
(JSON) |
GET /media/symptoms/{contentId}
Streams Media content for symptoms advanced search.
Request Parameters
name |
type |
description |
default |
Accept |
header |
The HTTP Accept header representing the type of content desired. |
n/a |
contentId |
path |
The mandatory content/file identifier. This may be an actual file name in which case it
will be used to select the appropriate ContentItem on the Media object. It may be a weak
reference in which case it will be used to resolve the corresponding Media object within
the same bundle to retrieve its contents. |
n/a |
forceDownload |
query |
Instructs the resource to provide content header "Content-Disposition: attachment" so
browsers will show a "save" dialog prompted to the user. |
n/a |
highlight |
query |
The search term that should be highlighted in the desired content. Parameter will only be
populated if the content has been requested from a search result. |
n/a |
Response Codes
code |
condition |
304 |
When Media object has not changed. |
404 |
When Media object is not found. |
400 |
When the incoming mediaId is invalid. |
406 |
If the client Accept header it too restrictive for the type of content being requested. |
Response Body
media type |
data type |
application/vnd.ptc.sc+json |
object
(JSON) |
GET /media/{mediaId}/{relative}/{contentId}
Streams Media content to a client.
Request Parameters
name |
type |
description |
default |
Accept |
header |
The HTTP Accept header representing the type of content desired. |
n/a |
contentId |
path |
The optional content/file identifier. This may be an actual file name in which case it
will be used to select the appropriate ContentItem on the Media object. It may be a weak
reference in which case it will be used to resolve the corresponding Media object within
the same bundle to retrieve its contents. It may be a filename of auxiliary supporting
content when relative != files (e.g. techinfo.css). |
n/a |
mediaId |
path |
The Id of the Media object to retrieve. Standard Media objects are instances of SCFileElement
however there is supporting auxiliary data based on other types that may be retrieved through
this URI. |
n/a |
relative |
path |
The "media root". Values are constrained by the MediaServiceSvr.MEDIA_ROOT enumeration.
Standard Media objects are streamed through "files" and supporting Media may come through
other paths (e.g. css, scripts, etc.). |
n/a |
SRCType |
query |
|
n/a |
dealerId |
query |
DealerId |
n/a |
forceDownload |
query |
Instructs the resource to provide content header "Content-Disposition: attachment" so
browsers will show a "save" dialog prompted to the user. |
n/a |
highlight |
query |
The search term that should be highlighted in the desired content. Parameter will only be
populated if the content has been requested from a search result. |
n/a |
Response Codes
code |
condition |
304 |
When Media object has not changed. |
404 |
When Media object is not found. |
400 |
When the incoming mediaId is invalid. |
406 |
If the client Accept header it too restrictive for the type of content being requested. |
Response Body
media type |
data type |
application/json |
object
(JSON) |
application/xml |
anyType
(XML) |
GET /media/{mediaId}/{relative}/{contentId}/{operation}
Streams Media content to a client.
Request Parameters
name |
type |
description |
default |
Accept |
header |
The HTTP Accept header representing the type of content desired. |
n/a |
contentId |
path |
The optional content/file identifier. This may be an actual file name in which case it
will be used to select the appropriate ContentItem on the Media object. It may be a weak
reference in which case it will be used to resolve the corresponding Media object within
the same bundle to retrieve its contents. It may be a filename of auxiliary supporting
content when relative != files (e.g. techinfo.css). |
n/a |
mediaId |
path |
The Id of the Media object to retrieve. Standard Media objects are instances of SCFileElement
however there is supporting auxiliary data based on other types that may be retrieved through
this URI. |
n/a |
operation |
path |
|
n/a |
relative |
path |
The "media root". Values are constrained by the MediaServiceSvr.MEDIA_ROOT enumeration.
Standard Media objects are streamed through "files" and supporting Media may come through
other paths (e.g. css, scripts, etc.). |
n/a |
highlight |
query |
The search term that should be highlighted in the desired content. Parameter will only be
populated if the content has been requested from a search result. |
n/a |
Response Codes
code |
condition |
304 |
When Media object has not changed. |
404 |
When Media object is not found. |
400 |
When the incoming mediaId is invalid. |
406 |
If the client Accept header it too restrictive for the type of content being requested. |
Response Body
media type |
data type |
application/vnd.ptc.sc+json |
object
(JSON) |
GET /media/{mediaId}/{relative}/preview
Streams Media content in the search preview section.
Request Parameters
name |
type |
description |
default |
Accept |
header |
The HTTP Accept header representing the type of content desired. |
n/a |
mediaId |
path |
The Id of the Media object to retrieve. Standard Media objects are instances of SCFileElement
however there is supporting auxiliary data based on other types that may be retrieved through
this URI. |
n/a |
relative |
path |
The "media root". Values are constrained by the MediaServiceSvr.MEDIA_ROOT enumeration.
Standard Media objects are streamed through "files" and supporting Media may come through
other paths (e.g. css, scripts, etc.). |
n/a |
highlight |
query |
|
n/a |
Response Codes
code |
condition |
304 |
When Media object has not changed. |
404 |
When Media object is not found. |
400 |
When the incoming mediaId is invalid. |
406 |
If the client Accept header it too restrictive for the type of content being requested. |
Response Body
media type |
data type |
application/json |
object
(JSON) |
application/xml |
anyType
(XML) |
POST /media/versionInfo/batch
Retrieves the version information for list of uri's.
Request Body
media type |
data type |
application/json |
array of object
(JSON) |
application/xml |
list of anyType
(XML) |
Response Codes
code |
condition |
404 |
Returned when URI's are not found. |
400 |
Returned when the number of uri's exceed the limit. |
Response Body
media type |
data type |
application/vnd.ptc.sc+json |
array of object
(JSON) |