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 ResponseFollowing model is returned when operation succeeds.BodyRoot Schema : getPosts_response- posts
-
Type:
array
postsAdditional Properties Allowed:The array of the Announcements. - totalPostsCount
-
Type:
integer
The total number of Announcements.
Nested Schema : postsNested Schema : itemsType:object
- active
-
Type:
boolean
Indicates whether a Announcement is active. - creationDate
-
Type:
string
The creation date of the Announcement. - id
-
Type:
string
The Announcement Post Id. - lastModifiedDate
-
Type:
string
The date on which the Announcement was last modified. - message
-
Type:
string
The Announcement Title text. - repositoryId
-
Type:
string
The repository id of the Announcement post. - type
-
Type:
string
The type of the Announcement item.
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 ResponseThe 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.|BodyRoot Schema : errorModelType:object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errorsNested Schema : itemsType:object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
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" } ] }