ContentRepositoryFragmentResource Resource

Resource for handling ContentRepository Fragments

GET /cr_fragments

List available ContentRepository Fragments.
The result can be filtered by

  • id
  • globalId
  • name
and sorted by
  • id
  • globalId
  • name

Request Parameters
name type description default constraints
page query Returned page, if paging is used. Paging starts with 1 1 int
pageSize query Page size for paging. If this is set to -1 no paging is used (all matching items are returned). Setting this to 0 will return no items. -1 int
perms query Flag to add permission information for the returned items. false boolean
q query Query string for filtering    
sort query Comma separated list of sorted attributes. Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order name  
Response Codes
code condition
200 ContentRepository Fragment list is returned.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json ContentRepositoryFragmentListResponse (JSON) List of ContentRepository Fragments

Example

Request
GET /cr_fragments
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ {
    "id" : 12345,
    "name" : "...",
    "globalId" : "..."
  }, {
    "id" : 12345,
    "name" : "...",
    "globalId" : "..."
  } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "formreport", "create" ],
    "property2" : [ "formreport", "createitems" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /cr_fragments

Create a new ContentRepository Fragment

Request Body
media type data type description
application/json ContentRepositoryFragmentModel (JSON) ContentRepository Fragment to create
Response Codes
code condition
201 ContentRepository Fragment was created.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json ContentRepositoryFragmentResponse (JSON) created ContentRepository Fragment

Example

Request
POST /cr_fragments
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "name" : "...",
  "globalId" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "contentRepositoryFragment" : {
    "id" : 12345,
    "name" : "...",
    "globalId" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

DELETE /cr_fragments/{id}

Delete the ContentRepository Fragment with given id

Request Parameters
name type description
id path internal or external ContentRepository Fragment ID
Response Codes
code condition
204 ContentRepository Fragment {id} was deleted.
404 ContentRepository Fragment {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json object (JSON) response

Example

Request
DELETE /cr_fragments/{id}
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
...
                
              

GET /cr_fragments/{id}

Get the ContentRepository Fragment with given id

Request Parameters
name type description
id path internal or external ContentRepository ID
Response Codes
code condition
200 ContentRepository Fragment {id} exists.
404 ContentRepository Fragment {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json ContentRepositoryFragmentResponse (JSON) Response containing the ContentRepository

Example

Request
GET /cr_fragments/{id}
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "contentRepositoryFragment" : {
    "id" : 12345,
    "name" : "...",
    "globalId" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

PUT /cr_fragments/{id}

Update ContentRepository Fragment with given id

Request Parameters
name type description
id path internal or external ContentRepository Fragment ID
Request Body
media type data type description
application/json ContentRepositoryFragmentModel (JSON) updated ContentRepository Fragment
Response Codes
code condition
201 ContentRepository Fragment {id} was updated.
404 ContentRepository Fragment {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json ContentRepositoryFragmentResponse (JSON) updated ContentRepository Fragment

Example

Request
PUT /cr_fragments/{id}
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "name" : "...",
  "globalId" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "contentRepositoryFragment" : {
    "id" : 12345,
    "name" : "...",
    "globalId" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /cr_fragments/{id}/entries

Get the entries in the ContentRepository Fragment.
The result can be filtered by

  • id
  • globalId
  • tagname
  • mapname
  • foreignlinkAttribute
  • foreignlinkAttributeRule
  • category
and sorted by
  • id
  • globalId
  • tagname
  • mapname
  • objType
  • attributeType
  • targetType
  • multivalue
  • optimized
  • filesystem
  • foreignlinkAttribute
  • foreignlinkAttributeRule
  • category
  • segmentfield
  • displayfield
  • urlfield

Request Parameters
name type description default constraints
id path internal or external ID    
page query Returned page, if paging is used. Paging starts with 1 1 int
pageSize query Page size for paging. If this is set to -1 no paging is used (all matching items are returned). Setting this to 0 will return no items. -1 int
q query Query string for filtering    
sort query Comma separated list of sorted attributes. Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order name  
Response Codes
code condition
200 List of entries in ContentRepository Fragment {id} is returned.
404 ContentRepository Fragment {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json ContentRepositoryFragmentEntryListResponse (JSON) list of entries

Example

Request
GET /cr_fragments/{id}/entries
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "updateinheritance", "deleteform" ],
    "property2" : [ "edit", "publish" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /cr_fragments/{id}/entries

Create a new ContentRepository Fragment Entry

Request Parameters
name type description
id path internal or external ID of the ContentRepository Fragment
Request Body
media type data type description
application/json ContentRepositoryFragmentEntryModel (JSON) entry to create
Response Codes
code condition
201 Entry was created.
404 ContentRepository Fragment {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json ContentRepositoryFragmentEntryResponse (JSON) created entry

Example

Request
POST /cr_fragments/{id}/entries
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "globalId" : "...",
  "tagname" : "...",
  "mapname" : "...",
  "objType" : 12345,
  "attributeType" : 12345,
  "multivalue" : true,
  "optimized" : true,
  "filesystem" : true,
  "targetType" : 12345,
  "foreignlinkAttribute" : "...",
  "foreignlinkAttributeRule" : "...",
  "category" : "...",
  "displayfield" : true,
  "segmentfield" : true,
  "urlfield" : true,
  "elasticsearch" : { },
  "micronodeFilter" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "entry" : {
    "id" : 12345,
    "globalId" : "...",
    "tagname" : "...",
    "mapname" : "...",
    "objType" : 12345,
    "attributeType" : 12345,
    "multivalue" : true,
    "optimized" : true,
    "filesystem" : true,
    "targetType" : 12345,
    "foreignlinkAttribute" : "...",
    "foreignlinkAttributeRule" : "...",
    "category" : "...",
    "displayfield" : true,
    "segmentfield" : true,
    "urlfield" : true,
    "elasticsearch" : { },
    "micronodeFilter" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

DELETE /cr_fragments/{id}/entries/{entryId}

Delete the Fragment entry

Request Parameters
name type description
entryId path internal or external entry ID
id path internal or external ContentRepository Fragment ID
Response Codes
code condition
204 Entry {entryId} was deleted.
404 ContentRepository Fragment {id} or Entry {entryId} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json object (JSON) response

Example

Request
DELETE /cr_fragments/{id}/entries/{entryId}
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
...
                
              

GET /cr_fragments/{id}/entries/{entryId}

Get a Fragment Entry

Request Parameters
name type description
entryId path internal or external ID of the entry
id path internal or external ID of the ContentRepository Fragment
Response Codes
code condition
200 Entry {entryId} is returned.
404 ContentRepository {id} or Entry {entryId} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json ContentRepositoryFragmentEntryResponse (JSON) response containing the entry

Example

Request
GET /cr_fragments/{id}/entries/{entryId}
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "entry" : {
    "id" : 12345,
    "globalId" : "...",
    "tagname" : "...",
    "mapname" : "...",
    "objType" : 12345,
    "attributeType" : 12345,
    "multivalue" : true,
    "optimized" : true,
    "filesystem" : true,
    "targetType" : 12345,
    "foreignlinkAttribute" : "...",
    "foreignlinkAttributeRule" : "...",
    "category" : "...",
    "displayfield" : true,
    "segmentfield" : true,
    "urlfield" : true,
    "elasticsearch" : { },
    "micronodeFilter" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

PUT /cr_fragments/{id}/entries/{entryId}

Update Fragment entry

Request Parameters
name type description
entryId path internal or external entry ID
id path internal or external ContentRepository Fragment ID
Request Body
media type data type description
application/json ContentRepositoryFragmentEntryModel (JSON) updated entry
Response Codes
code condition
201 Entry {entryId} was updated.
404 ContentRepository Fragment {id} or Entry {entryId} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json ContentRepositoryFragmentEntryResponse (JSON) updated entry

Example

Request
PUT /cr_fragments/{id}/entries/{entryId}
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "globalId" : "...",
  "tagname" : "...",
  "mapname" : "...",
  "objType" : 12345,
  "attributeType" : 12345,
  "multivalue" : true,
  "optimized" : true,
  "filesystem" : true,
  "targetType" : 12345,
  "foreignlinkAttribute" : "...",
  "foreignlinkAttributeRule" : "...",
  "category" : "...",
  "displayfield" : true,
  "segmentfield" : true,
  "urlfield" : true,
  "elasticsearch" : { },
  "micronodeFilter" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "entry" : {
    "id" : 12345,
    "globalId" : "...",
    "tagname" : "...",
    "mapname" : "...",
    "objType" : 12345,
    "attributeType" : 12345,
    "multivalue" : true,
    "optimized" : true,
    "filesystem" : true,
    "targetType" : 12345,
    "foreignlinkAttribute" : "...",
    "foreignlinkAttributeRule" : "...",
    "category" : "...",
    "displayfield" : true,
    "segmentfield" : true,
    "urlfield" : true,
    "elasticsearch" : { },
    "micronodeFilter" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}