getInstancesForComponent
get
/ccadmin/v1/applications/{applicationId}/components/{componentId}/instances
Get instances of a component.
Request
Supported Media Types
- application/json
Path Parameters
-
applicationId(required): string
The ID of the application.
-
componentId(required): string
The ID of the component.
Query Parameters
-
addToPageInfoOnly: boolean
If set to true (default is false), limits the amount of information gathered per instance.
-
includeLayoutAssociations: boolean
If set to true (default is false), layout associations of the instances is passed in endpoint response.
-
limit: integer
This is the field to determine number of records to be fetched per REST call. If provided returns paginated response.
-
offset: integer
This field determines the offset/starting index from which data to be fetched. If provided returns paginated response.
-
search: string
If search provided (default is empty), returns paginated response matching the search query param with display name of instances.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : getInstancesForComponent_response
Type:
Show Source
object
-
items:
array items
Component Instance
Nested Schema : items
Type:
Show Source
object
-
component:
object component
The parent component.
-
configuration:
object configuration
Configuration settings for the component instance
-
displayName:
string
The display name for the component instance.
-
id:
string
The component's repository ID.
-
layout:
object layout
The layout for the component, if any.
-
repositoryId:
string
The component instance's repository ID.
-
usageCount:
integer
Number of pages where instance is used.
Nested Schema : component
Type:
object
The parent component.
Show Source
-
displayName:
string
The display name for the component.
- hiddenFromSiteStudio: boolean
-
id:
string
The component's repository ID.
-
name:
string
The name for the component.
-
namespace:
string
The namespace for the component (e.g. occ.react).
-
providesContext:
string
the container context that the component provides.
-
repositoryId:
string
The component's repository ID.
-
requiresContext:
string
the container context that the component requires.
-
root:
string
The root folder for the component's assets
-
source:
integer
Is this component out of the box (100) or uploaded (101).
-
type:
string
The type of component.
Nested Schema : configuration
Type:
object
Configuration settings for the component instance
Nested Schema : layout
Type:
object
The layout for the component, if any.
Example Response (application/json)
{
"items":[
{
"layout":null,
"component":{
"providesContext":null,
"requiresContext":null,
"displayName":"WebContent",
"root":"/clientApplications/core-commerce-reference-store/components/WebContent",
"repositoryId":"100739",
"name":"WebContent",
"namespace":"occ.react",
"hiddenFromSiteStudio":false,
"id":"100739",
"source":101,
"type":"component"
},
"configuration":{
"webContent":"Help Web Content Text
"
},
"displayName":"help-web-content",
"repositoryId":"100638",
"usageCount":1
},
{
"layout":null,
"component":{
"providesContext":null,
"requiresContext":null,
"displayName":"WebContent",
"root":"/clientApplications/core-commerce-reference-store/components/WebContent",
"repositoryId":"100739",
"name":"WebContent",
"namespace":"occ.react",
"hiddenFromSiteStudio":false,
"id":"100739",
"source":101,
"type":"component"
},
"configuration":{
"webContent":"Returns Refunds Web Content Text
"
},
"displayName":"returns-refunds-web-content",
"repositoryId":"100509",
"usageCount":1
}
]
}
Default Response
The error response.
Root Schema : errorModel
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code