Create a service
post
/crmRestApi/resources/11.13.18.05/serviceProviders/{ProviderId}/child/services
Request
Path Parameters
-
ProviderId(required): integer(int64)
The unique identifier of the service provider.
Header Parameters
-
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.
-
Upsert-Mode:
Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object
-
EstimatedStartTime: string
(date-time)
Title:
Estimated Start Time
The next estimated start time for the service state. -
LastAvailDate: string
(date-time)
Title:
Last Available Date
The date when the service was last available. -
ProviderId(required): integer
(int64)
Title:
Provider ID
The unique identifier of the service provider. -
serviceHistories: array
Service Histories
Title:
Service Histories
The service histories resource is used to view the historical information about the availability of a service. -
ServiceName(required): string
Title:
Service Name
Maximum Length:400
The name of the service. -
ServiceStateCd: string
Title:
Service State Code
Maximum Length:64
Default Value:UNAVAILABLE
The code indicating the state of the service.
Nested Schema : Service Histories
Type:
array
Title:
Service Histories
The service histories resource is used to view the historical information about the availability of a service.
Show Source
Nested Schema : serviceProviders-services-serviceHistories-item-post-request
Type:
Show Source
object
-
EstimatedStartTime: string
(date-time)
Title:
Estimated Start Time
The next estimated start time for the service state. -
LastAvailDate: string
(date-time)
Title:
Last Available Date
The date when the service history was last available. -
ServiceId: integer
(int64)
Title:
Service ID
The unique identifier of the service to which the history belongs. -
ServiceStateCd: string
Title:
Service State Code
Maximum Length:64
The code indicating the state of the service.
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 By
Read Only:true
Maximum Length:64
The user who created the service. -
CreationDate: string
(date-time)
Title:
Creation Date
Read Only:true
The date when the service was created. -
EstimatedStartTime: string
(date-time)
Title:
Estimated Start Time
The next estimated start time for the service state. -
LastAvailDate: string
(date-time)
Title:
Last Available Date
The date when the service was last available. -
LastUpdateDate: string
(date-time)
Title:
Last Updated Date
Read Only:true
The date when the service was last updated. -
LastUpdatedBy: string
Title:
Last Updated By
Read Only:true
Maximum Length:64
The user who last updated the service. -
LastUpdateLogin: string
Title:
Last Update Login
Read Only:true
Maximum Length:32
The login details of the user who last updated the service. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
ProviderId: integer
(int64)
Title:
Provider ID
The unique identifier of the service provider. -
serviceHistories: array
Service Histories
Title:
Service Histories
The service histories resource is used to view the historical information about the availability of a service. -
ServiceId: integer
(int64)
Title:
Service ID
Read Only:true
The unique identifier of the service. -
ServiceName: string
Title:
Service Name
Maximum Length:400
The name of the service. -
ServiceStateCd: string
Title:
Service State Code
Maximum Length:64
Default Value:UNAVAILABLE
The code indicating the state of the service.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Nested Schema : Service Histories
Type:
array
Title:
Service Histories
The 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 reference
The URI to the related resource. -
kind: string
Title:
kind
Allowed Values:[ "collection", "item", "describe", "other" ]
The kind of the related resource. -
name: string
Title:
name
The name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relation
Allowed 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 By
Read Only:true
Maximum Length:64
The user who created the service history. -
CreationDate: string
(date-time)
Title:
Creation Date
Read Only:true
The date when the service history was created. -
EstimatedStartTime: string
(date-time)
Title:
Estimated Start Time
The next estimated start time for the service state. -
HistoryId: integer
(int64)
Title:
History ID
Read Only:true
The unique identifier of the service history. -
LastAvailDate: string
(date-time)
Title:
Last Available Date
The date when the service history was last available. -
LastUpdateDate: string
(date-time)
Title:
Last Updated Date
Read Only:true
The date when the service history was last updated. -
LastUpdatedBy: string
Title:
Last Updated By
Read Only:true
Maximum Length:64
The user who last updated the service history. -
LastUpdateLogin: string
Title:
Last Update Login
Read Only:true
Maximum Length:32
The login details of the user who last updated the service history. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
ServiceId: integer
(int64)
Title:
Service ID
The unique identifier of the service to which the history belongs. -
ServiceStateCd: string
Title:
Service State Code
Maximum Length:64
The code indicating the state of the service.
Nested Schema : Links
Type:
array
Title:
Links
The 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 create a service by submitting a POST request on the REST resource using cURL.
cURL Command
curl -u <username:password> \ -X POST -d
@example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/serviceProviders/300100123753001/child/services/
Example of Request Body
The following shows an example of the request body in JSON format.
{ "ServiceName":"test service", "ServiceStateCd":"AVAILABLE" }
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:38:38.011+00:00", "LastUpdateLogin": "5E67CBDF62AA11EEE0538E09F20A463C", "LastUpdatedBy": "SALES_ADMIN", "ProviderId": 300100123753001, "ServiceId": 300100123781596, "EstimatedStartTime": null, "LastAvailDate": "2017-11-20T11:38:38.011+00:00", "ServiceName": "test service", "ServiceStateCd": "AVAILABLE", "links": [ ... ] }