Get all service requests with messages using advanced query

post

/api/boss/data/objects/ora/cxServiceCore/srMgmt/v1/serviceRequests/$views/serviceRequestMessages/$query

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
Match All
Show Source
Nested Schema : schema
Match All
Show Source
Nested Schema : schema
Type: object
Show Source
  • accessors
    Maps accessor names to query objects specific to corresponding accessors. Query object for each accessor supports query capabilities similar to the base.
  • fields
    Restricts the resource fields. Only the specified fields and mandatory system fields are returned.
  • subTypes
    Maps discriminator values (as defined in subtypes) to query objects specific to corresponding subtypes. Subtype-specific query objects support a subset(fields,accessors,filter) of the query capabilities when compared to the base.
Nested Schema : type
Type: object
Show Source
Nested Schema : type
Type: object
Show Source
Nested Schema : accessors
Type: object
Maps accessor names to query objects specific to corresponding accessors. Query object for each accessor supports query capabilities similar to the base.
Nested Schema : fields
Type: array
Restricts the resource fields. Only the specified fields and mandatory system fields are returned.
Show Source
Nested Schema : subTypes
Type: object
Maps discriminator values (as defined in subtypes) to query objects specific to corresponding subtypes. Subtype-specific query objects support a subset(fields,accessors,filter) of the query capabilities when compared to the base.
Nested Schema : collection
Type: object
Defines query criteria that can be applied on a resource collection.
Show Source
  • The resource collection will be queried using the specified filter condition.
  • Restricts the number of resource items returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resource items.
  • Defines the starting position of the resource collection. If offset exceeds the resource count then no resource items are returned.
  • Represents the privilege or action required to check for while serving a request to access a resource.
  • sortBy
    Orders a resource collection based on the specified fields.
Nested Schema : sortBy
Type: array
Orders a resource collection based on the specified fields.
Show Source
Nested Schema : items
Match One Schema
Show Source
  • Name of field based on which sorting will happen. Order is ascending.
  • type
    Object with single entry. Key must be name of field based on which sorting will happen. Value must be either asc or desc to decide the sort order.
Nested Schema : type
Type: object
Object with single entry. Key must be name of field based on which sorting will happen. Value must be either asc or desc to decide the sort order.
Nested Schema : parameters
Type: object
Values to be applied in a parameterized filter specific to the view.
Back to Top

Response

Default Response

Successful response of retrieving view serviceRequestMessages for resource Service Requests
Body ()
Root Schema : serviceRequests_view-serviceRequestMessages
Match All
Show Source
Nested Schema : __collection_context
Type: object
Show Source
Nested Schema : serviceRequests_view-serviceRequestMessages-allOf[1]
Type: object
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Match All
Show Source
Nested Schema : __busObj_context
Type: object
Show Source
Nested Schema : items-allOf[1]
Type: object
Show Source
Nested Schema : $context
Type: object
Show Source
Nested Schema : closedDate
Match All
Show Source
Nested Schema : createdBy
Match All
Show Source
  • Read Only: true
  • Title: Created By
    The user who created the record.
Nested Schema : criticalFlag
Match All
Show Source
  • Read Only: true
  • Title: Critical
    Indicates whether the service request is critical. If critical, the value is Y, else the value is N.
Nested Schema : id
Match All
Show Source
Nested Schema : lastReopenDate
Match All
Show Source
  • Read Only: true
  • Title: Date Reopened
    The date and time when the service request was last reopened.
Nested Schema : lastResolvedDate
Match All
Show Source
Nested Schema : messages
Match All
Show Source
Nested Schema : number
Match All
Show Source
  • Read Only: true
  • Title: Reference Number
    The unique number that's used to identify a service request. You can edit the service request number to a format that's best suitable to your organizational requirements.
Nested Schema : openDate
Match All
Show Source
  • Read Only: true
  • Title: Date Reported
    The date when the service request was reported by the customer.
Nested Schema : problemDescription
Match All
Show Source
  • Read Only: true
  • Title: Problem Description
    The service request's problem description or statement and the steps to reproduce the issue.
Nested Schema : resolveDescription
Match All
Show Source
  • Read Only: true
  • Title: Solution Description
    The description of how the service request has been resolved.
Nested Schema : timeCreated
Match All
Show Source
Nested Schema : timeUpdated
Match All
Show Source
Nested Schema : title
Match All
Show Source
  • Read Only: true
  • Title: Title
    The brief title of the service request.
Nested Schema : updatedBy
Match All
Show Source
  • Read Only: true
  • Title: Last Updated By
    The user who last updated the record.
Nested Schema : messages-allOf[1]
Type: object
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Match All
Show Source
Nested Schema : items-allOf[1]
Type: object
Show Source
  • Title: Created By
    Read Only: true
    The user who created the record.
  • Title: Message ID
    Read Only: true
    The unique identifier associated with the service request message.
  • Title: Message Content
    Read Only: true
    Indicates the content of the service request message.
  • Title: Message Number
    Read Only: true
    The public unique identifier of the service request message.
  • Title: Original System
    Read Only: true
    The reference to the service request record in the original system from which service request was imported (if imported).
  • Title: Origination Date
    Read Only: true
    The date the message was created in the original source system. This is applicable if the service request message was imported from another system.
  • Title: Contains PII Data
    Read Only: true
    Indicates whether the message contains personally identifiable information.
  • Title: Rich Text
    Read Only: true
    Default Value: true
    Indicates whether the message content is in rich text format.
  • Title: Sent Date
    Read Only: true
    The date and time when the message was sent.
  • Title: Source System Record Created-By
    Read Only: true
    The user who created the message in the original source system. This is applicable if the service request message was imported from another system.
  • Title: Last Update Date in Source System
    Read Only: true
    The date when the message was last updated in the original source system. This is applicable if the service request message was imported from another system.
  • Title: Source System Record Last-Updated-By
    Read Only: true
    The user who last updated the message in the original source system. This is applicable if the service request message was imported from another system.
  • Title: Subject
    Read Only: true
    Indicates the subject of the service request message.
  • Title: Template Name
    Read Only: true
    The name of the template that's used for outbound communication of the message.
  • Title: Created On
    Read Only: true
    The date and time when the record was created.
  • Title: Last Updated Date
    Read Only: true
    The date and time when the record was last updated.
  • Title: Last Updated By
    Read Only: true
    The user who last updated the record.
Back to Top

Examples

The following example shows how to create an advanced query to get all the service requests with messages by submitting a POST request on the REST resource.

cURL Command

curl -X POST --location 'https://servername.fa.us2.oraclecloud.com/api/boss/data/objects/ora/cxServiceCore/srMgmt/v1/$en-US/serviceRequests/$views/serviceRequestMessages/$query'\
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>
--data @request.json

Example of Request Body

The following example shows the contents of the request body in JSON format.

{
    "fields": [
        "id",
        "number",
        "title"        
    ],
    "collection": {
        "sortBy": [{"timeUpdated": "desc"}],
        "filter":"number='\''SR0000011001'\''"
    },
    "accessors": {
        "messages": {
            "fields":["messageContent"]
        }
    }
}

Example of Response Body

The following example shows the contents of the response body in JSON format.

{
    "items": [
        {
            "id": "300100122471257",
            "number": "SR0000011001",
            "title": "Request for Software Installation: Adobe Photoshop",
            "$id": "SR0000011001",
            "$context": {
                "etag": "2",
                "links": {
                    "$self": {
                        "href": "https://servername.fa.us2.oraclecloud.com/api/boss/data/objects/ora/cxServiceCore/srMgmt/v1/serviceRequests/SR0000011001"
                    }
                }
            },
            "messages": {
                "items": [
                    {
                        "messageContent": "Respond Flag-N- Child Message",
                        "$id": "300100122471262",
                        "$context": {
                            "etag": "1",
                            "links": {
                                "$self": {
                                    "href": "https://servername.fa.us2.oraclecloud.com/api/boss/data/objects/ora/cxServiceCore/srMgmt/v1/serviceRequests/SR0000011001/messages/300100122471262"
                                }
                            }
                        }
                    },
                    {
                        "messageContent": "A contact could not be associated with the SR because no contact was available with the social handle 1139536692773011.",
                        "$id": "300100122471260",
                        "$context": {
                            "etag": "1",
                            "links": {
                                "$self": {
                                    "href": "https://servername.fa.us2.oraclecloud.com/api/boss/data/objects/ora/cxServiceCore/srMgmt/v1/serviceRequests/SR0000011001/messages/300100122471260"
                                }
                            }
                        }
                    }
                ],
                "hasMore": false
            }
        }
    ],
    "hasMore": false
}
Back to Top