getPosts

get

/ccadmin/v1/posts

Get Posts. Fetches Announcements based on the passed filters

Request

Supported Media Types
  • application/json
Query Parameters
limit
Type: integer
Maximum size of the record set to be returned
offset
Type: integer
Numeric offset of the first Announcement post of the sorted result set.
q
Type: string
Required: true
The RQL query string.
sort
Type: string
A delimiter separated sort property name and sort direction.

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getPosts_response
Nested Schema : posts
Type: array
The array of the Announcements.
Nested Schema : items
Type: object
Example application/json

{
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:9080/ccadminui/v1/posts?q=type%20%3D%20%22announcementPost%22&offset=0&limit=250&sort=creationDate%3Adesc"
        }
    ],
    "totalPostsCount":2,
    "posts":[
        {
            "lastModifiedDate":"2015-05-09T14:32:10.056Z",
            "repositoryId":"200001",
            "active":true,
            "id":"200001",
            "message":"Test Announcement message1.",
            "creationDate":"2015-05-09T14:32:10.056Z",
            "type":"announcementPost"
        },
        {
            "lastModifiedDate":"2015-05-10T06:33:31.242Z",
            "repositoryId":"100002",
            "active":true,
            "id":"100002",
            "message":"Test Announcement message2.",
            "creationDate":"2015-05-06T10:23:43.000Z",
            "type":"announcementPost"
        }
    ]
}
Default Response
The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |200201|Internal error occurred.|
Body
Root Schema : errorModel
Type: object
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

Examples

Sample Response Payload returned by endpoint:

{
  "links": [{
    "rel": "self",
    "href": "http://localhost:9080/ccadminui/v1/posts?q=type%20%3D%20%22announcementPost%22&offset=0&limit=250&sort=creationDate%3Adesc"
  }],
  "totalPostsCount": 2,
  "posts": [
    {
      "lastModifiedDate": "2015-05-09T14:32:10.056Z",
      "repositoryId": "200001",
      "active": true,
      "id": "200001",
      "message": "Test Announcement message1.",
      "creationDate": "2015-05-09T14:32:10.056Z",
      "type": "announcementPost"
    },
    {
      "lastModifiedDate": "2015-05-10T06:33:31.242Z",
      "repositoryId": "100002",
      "active": true,
      "id": "100002",
      "message": "Test Announcement message2.",
      "creationDate": "2015-05-06T10:23:43.000Z",
      "type": "announcementPost"
    }
  ]
}