sitecore · Capability

Sitecore XM Cloud REST API — Collections

Sitecore XM Cloud REST API — Collections. 7 operations. Lead operation: List site collections. Self-contained Naftiko capability covering one Sitecore business surface.

Run with Naftiko SitecoreCollections

What You Can Do

GET
Listcollections — List site collections
/v1/api/v1/collections
POST
Createcollection — Create a site collection
/v1/api/v1/collections
POST
Validatecollectionname — Validate a site collection name
/v1/api/v1/collections/name/validate
POST
Sortcollections — Sort site collections
/v1/api/v1/collections/sort
GET
Getcollection — Get a site collection
/v1/api/v1/collections/{collectionid}
PUT
Updatecollection — Update a site collection
/v1/api/v1/collections/{collectionid}
DELETE
Deletecollection — Delete a site collection
/v1/api/v1/collections/{collectionid}

MCP Tools

list-site-collections

List site collections

read-only idempotent
create-site-collection

Create a site collection

validate-site-collection-name

Validate a site collection name

read-only
sort-site-collections

Sort site collections

get-site-collection

Get a site collection

read-only idempotent
update-site-collection

Update a site collection

idempotent
delete-site-collection

Delete a site collection

idempotent

Capability Spec

xm-cloud-rest-collections.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Sitecore XM Cloud REST API — Collections
  description: 'Sitecore XM Cloud REST API — Collections. 7 operations. Lead operation: List site collections. Self-contained
    Naftiko capability covering one Sitecore business surface.'
  tags:
  - Sitecore
  - Collections
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SITECORE_API_KEY: SITECORE_API_KEY
capability:
  consumes:
  - type: http
    namespace: xm-cloud-rest-collections
    baseUri: https://xmapps-api.sitecorecloud.io
    description: Sitecore XM Cloud REST API — Collections business capability. Self-contained, no shared references.
    resources:
    - name: api-v1-collections
      path: /api/v1/collections
      operations:
      - name: listcollections
        method: GET
        description: List site collections
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createcollection
        method: POST
        description: Create a site collection
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v1-collections-name-validate
      path: /api/v1/collections/name/validate
      operations:
      - name: validatecollectionname
        method: POST
        description: Validate a site collection name
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v1-collections-sort
      path: /api/v1/collections/sort
      operations:
      - name: sortcollections
        method: POST
        description: Sort site collections
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v1-collections-collectionId
      path: /api/v1/collections/{collectionId}
      operations:
      - name: getcollection
        method: GET
        description: Get a site collection
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatecollection
        method: PUT
        description: Update a site collection
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletecollection
        method: DELETE
        description: Delete a site collection
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.SITECORE_API_KEY}}'
  exposes:
  - type: rest
    namespace: xm-cloud-rest-collections-rest
    port: 8080
    description: REST adapter for Sitecore XM Cloud REST API — Collections. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/v1/collections
      name: api-v1-collections
      description: REST surface for api-v1-collections.
      operations:
      - method: GET
        name: listcollections
        description: List site collections
        call: xm-cloud-rest-collections.listcollections
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createcollection
        description: Create a site collection
        call: xm-cloud-rest-collections.createcollection
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/collections/name/validate
      name: api-v1-collections-name-validate
      description: REST surface for api-v1-collections-name-validate.
      operations:
      - method: POST
        name: validatecollectionname
        description: Validate a site collection name
        call: xm-cloud-rest-collections.validatecollectionname
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/collections/sort
      name: api-v1-collections-sort
      description: REST surface for api-v1-collections-sort.
      operations:
      - method: POST
        name: sortcollections
        description: Sort site collections
        call: xm-cloud-rest-collections.sortcollections
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/collections/{collectionid}
      name: api-v1-collections-collectionid
      description: REST surface for api-v1-collections-collectionId.
      operations:
      - method: GET
        name: getcollection
        description: Get a site collection
        call: xm-cloud-rest-collections.getcollection
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updatecollection
        description: Update a site collection
        call: xm-cloud-rest-collections.updatecollection
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecollection
        description: Delete a site collection
        call: xm-cloud-rest-collections.deletecollection
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: xm-cloud-rest-collections-mcp
    port: 9090
    transport: http
    description: MCP adapter for Sitecore XM Cloud REST API — Collections. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: list-site-collections
      description: List site collections
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: xm-cloud-rest-collections.listcollections
      outputParameters:
      - type: object
        mapping: $.
    - name: create-site-collection
      description: Create a site collection
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: xm-cloud-rest-collections.createcollection
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: validate-site-collection-name
      description: Validate a site collection name
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: xm-cloud-rest-collections.validatecollectionname
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: sort-site-collections
      description: Sort site collections
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: xm-cloud-rest-collections.sortcollections
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-site-collection
      description: Get a site collection
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: xm-cloud-rest-collections.getcollection
      outputParameters:
      - type: object
        mapping: $.
    - name: update-site-collection
      description: Update a site collection
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: xm-cloud-rest-collections.updatecollection
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-site-collection
      description: Delete a site collection
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: xm-cloud-rest-collections.deletecollection
      outputParameters:
      - type: object
        mapping: $.