Update a service
patch
/crmRestApi/resources/11.13.18.05/serviceProviders/{ProviderId}/child/services/{ServiceId}
Request
Path Parameters
-
ProviderId(required): integer(int64)
The unique identifier of the service provider.
-
ServiceId(required): integer(int64)
The unique identifier of the service.
Header Parameters
-
Metadata-Context: string
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version: string
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object-
EstimatedStartTime: string
(date-time)
Title:
Estimated Start TimeThe next estimated start time for the service state. -
LastAvailDate: string
(date-time)
Title:
Last Available DateThe date when the service was last available. -
ProviderId(required): integer
(int64)
Title:
Provider IDThe unique identifier of the service provider. -
serviceHistories: array
Service Histories
Title:
Service HistoriesThe service histories resource is used to view the historical information about the availability of a service. -
ServiceName(required): string
Title:
Service NameMaximum Length:400The name of the service. -
ServiceStateCd: string
Title:
Service State CodeMaximum Length:64Default Value:UNAVAILABLEThe code indicating the state of the service.
Nested Schema : Service Histories
Type:
arrayTitle:
Service HistoriesThe service histories resource is used to view the historical information about the availability of a service.
Show Source
Nested Schema : serviceProviders-services-serviceHistories-item-patch-request
Type:
Show Source
object-
EstimatedStartTime: string
(date-time)
Title:
Estimated Start TimeThe next estimated start time for the service state. -
LastAvailDate: string
(date-time)
Title:
Last Available DateThe date when the service history was last available.
Response
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Root Schema : serviceProviders-services-item-response
Type:
Show Source
object-
CreatedBy: string
Title:
Created ByRead Only:trueMaximum Length:64The user who created the service. -
CreationDate: string
(date-time)
Title:
Creation DateRead Only:trueThe date when the service was created. -
EstimatedStartTime: string
(date-time)
Title:
Estimated Start TimeThe next estimated start time for the service state. -
LastAvailDate: string
(date-time)
Title:
Last Available DateThe date when the service was last available. -
LastUpdateDate: string
(date-time)
Title:
Last Updated DateRead Only:trueThe date when the service was last updated. -
LastUpdatedBy: string
Title:
Last Updated ByRead Only:trueMaximum Length:64The user who last updated the service. -
LastUpdateLogin: string
Title:
Last Update LoginRead Only:trueMaximum Length:32The login details of the user who last updated the service. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
ProviderId: integer
(int64)
Title:
Provider IDThe unique identifier of the service provider. -
serviceHistories: array
Service Histories
Title:
Service HistoriesThe service histories resource is used to view the historical information about the availability of a service. -
ServiceId: integer
(int64)
Title:
Service IDRead Only:trueThe unique identifier of the service. -
ServiceName: string
Title:
Service NameMaximum Length:400The name of the service. -
ServiceStateCd: string
Title:
Service State CodeMaximum Length:64Default Value:UNAVAILABLEThe code indicating the state of the service.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Nested Schema : Service Histories
Type:
arrayTitle:
Service HistoriesThe service histories resource is used to view the historical information about the availability of a service.
Show Source
Nested Schema : link
Type:
Show Source
object-
href: string
Title:
hyperlink referenceThe URI to the related resource. -
kind: string
Title:
kindAllowed Values:[ "collection", "item", "describe", "other" ]The kind of the related resource. -
name: string
Title:
nameThe name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relationAllowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]The name of the relation to the resource instance. Example: self.
Nested Schema : properties
Type:
Show Source
object-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Nested Schema : serviceProviders-services-serviceHistories-item-response
Type:
Show Source
object-
CreatedBy: string
Title:
Created ByRead Only:trueMaximum Length:64The user who created the service history. -
CreationDate: string
(date-time)
Title:
Creation DateRead Only:trueThe date when the service history was created. -
EstimatedStartTime: string
(date-time)
Title:
Estimated Start TimeThe next estimated start time for the service state. -
HistoryId: integer
(int64)
Title:
History IDRead Only:trueThe unique identifier of the service history. -
LastAvailDate: string
(date-time)
Title:
Last Available DateThe date when the service history was last available. -
LastUpdateDate: string
(date-time)
Title:
Last Updated DateRead Only:trueThe date when the service history was last updated. -
LastUpdatedBy: string
Title:
Last Updated ByRead Only:trueMaximum Length:64The user who last updated the service history. -
LastUpdateLogin: string
Title:
Last Update LoginRead Only:trueMaximum Length:32The login details of the user who last updated the service history. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
ServiceId: integer
(int64)
Title:
Service IDThe unique identifier of the service to which the history belongs. -
ServiceStateCd: string
Title:
Service State CodeMaximum Length:64The code indicating the state of the service.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Links
- ServiceStateCdLookup
-
Parameters:
- finder:
LookupTypeFinder%3BLookupType%3DORA_SVC_SERVICE_STATE_CD
The list of values indicating the state of a service,
The following properties are defined on the LOV link relation:- Source Attribute: ServiceStateCd; Target Attribute: LookupCode
- Display Attribute: Meaning
- finder:
- serviceHistories
-
Parameters:
- ProviderId:
$request.path.ProviderId - ServiceId:
$request.path.ServiceId
The service histories resource is used to view the historical information about the availability of a service. - ProviderId:
Examples
The following example shows how to update a service by submitting a PATCH request on the REST resource using cURL.
cURL Command
curl -u <username:password> \ -X PATCH -d
@example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/serviceProviders/child/services/300100123781596
Example of Request Body
The following shows an example of the request body in JSON format.
{
"ServiceStateCd" : "UNAVAILABLE"
}Example of Response Body
The following example shows the contents of the response body in JSON format.
{
"CreatedBy": "SALES_ADMIN",
"CreationDate": "2017-11-20T11:38:38+00:00",
"LastUpdateDate": "2017-11-20T11:42:47+00:00",
"LastUpdateLogin": "5E67CBDF62AB11EEE0538E09F20A463C",
"LastUpdatedBy": "SALES_ADMIN",
"ProviderId": 300100123753001,
"ServiceId": 300100123781596,
"EstimatedStartTime": null,
"LastAvailDate": "2017-11-20T11:38:38.011+00:00",
"ServiceName": "test service",
"ServiceStateCd": "UNAVAILABLE",
"links": [
...
]
}