SegmentUpdatesResource

Provides web API to push and pull updates to segment data to and from the Download Center repository.



Supported API: false

Extendable: false

The following resources are applicable:

PUT /segmentupdates

Pushes an update to a segment into the repository

Request Body

media type data type description
application/vnd.ptc.sc+json SCList (JSON) An SCList representing the segment updates to push into the repository.

Response Codes

code condition
400 Returned when the content does not contain data.
403 When {@link com.ptc.sc.download.DownloadCenterUtils#isDownloadCenterEnabled()} returns false
415 Returned if the Content-Type is not application/vnd.ptc.sc+json;version=n

Response Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)
Available Since
InService 6.0

POST /segmentupdates

Retrieves segment updates stored in the repository that would be applicable to update a segment with a given id and version level.

Available Since
InService 6.0

Request Body

media type data type description
application/vnd.ptc.sc+json SCList (JSON) An SCList representing the segments that updates are being pulled for.

Response Codes

code condition
400 returned when the segmentId is not of valid ID for a segment update
403 When {@link com.ptc.sc.download.DownloadCenterUtils#isDownloadCenterEnabled()} returns false
404 returned when a segment update is not found for the given segmentId

Response Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)

GET /segmentupdates/getPublished

To get list of segments for which 'Published' status is set to true

Request Parameters

name type description default
dealerId query n/a

Response Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)

GET /segmentupdates/{contentId}

Retrieves segment information from a given id and version of segment.

Request Parameters

name type description default
contentId path string representing Content ID n/a

Response Codes

code condition
403 When {@link com.ptc.sc.download.DownloadCenterUtils#isDownloadCenterEnabled()} returns false

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)

GET /segmentupdates

List all segments from DownloadCenter

Request Parameters

name type description default
$orderby query Retrieved data are sorted by default ascending n/a

Response Codes

code condition
403 When {@link com.ptc.sc.download.DownloadCenterUtils#isDownloadCenterEnabled()} returns false

Response Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)

DELETE /segmentupdates/{contentId}

Deletes the specified segment by ID.

Request Parameters

name type description default
contentId path The ID of the segment to be deleted. n/a

Response Codes

code condition
403 When {@link com.ptc.sc.download.DownloadCenterUtils#isDownloadCenterEnabled()} returns false

Response Body

media type data type
application/vnd.ptc.sc+json SCValue (JSON)

POST /segmentupdates/remove

Delete a list of given segments.

Request Body

media type data type description
application/vnd.ptc.sc+json SCList (JSON) The SCList of segments to be deleted.

Response Codes

code condition
403 When {@link com.ptc.sc.download.DownloadCenterUtils#isDownloadCenterEnabled()} returns false

Response Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)

POST /segmentupdates/updatePublishStatus

To update 'Published' status of a particular segments

Request Body

media type data type description
application/vnd.ptc.sc+json SCItem (JSON) : SCItem representing packet and should contain FILE_NAME_KEY and PUBLIST_STATUS_KEY

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)

POST /segmentupdates/update

To update data associated with a particular segment

Request Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)

Response Codes

code condition
403 When {@link com.ptc.sc.download.DownloadCenterUtils#isDownloadCenterEnabled()} returns false

Response Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)

GET /segmentupdates/download/{packetId}

Returns requested zip file.

Request Parameters

name type description default
packetId path n/a

Response Codes

code condition
403 When {@link com.ptc.sc.download.DownloadCenterUtils#isDownloadCenterEnabled()} returns false

Response Body

media type data type
application/vnd.ptc.sc+json object (JSON)

POST /segmentupdates

Creates a SegmentUpdate from each attached file.

Request Body

media type data type description
multipart/form-data (custom) container of files sent from client

Response Codes

code condition
400 Returned if extension or formInput is empty
415 Returned if the mime-type of any attached files are not supported
403 When {@link com.ptc.sc.download.DownloadCenterUtils#isDownloadCenterEnabled()} returns false

Response Body

media type data type
application/vnd.ptc.sc+json object (JSON)