Developer Preview — This project is in active development. APIs may change. Provide feedback
Skip to content

Sites Commands

Commands for managing sites on B2C Commerce instances.

Authentication

Sites commands require OAuth authentication with OCAPI permissions for the /sites resource.

Required OCAPI Permissions

ResourceMethods
/sitesGET
/sites/*GET

Configuration

bash
export SFCC_CLIENT_ID=your-client-id
export SFCC_CLIENT_SECRET=your-client-secret

For complete setup instructions, see the Authentication Guide.


b2c sites list

List sites on a B2C Commerce instance.

Usage

bash
b2c sites list

Flags

Uses global instance and authentication flags.

Examples

bash
# List sites on an instance
b2c sites list --server my-sandbox.demandware.net --client-id xxx --client-secret yyy

# Using environment variables
export SFCC_SERVER=my-sandbox.demandware.net
export SFCC_CLIENT_ID=your-client-id
export SFCC_CLIENT_SECRET=your-client-secret
b2c sites list

Output

The command displays a list of sites with their:

  • Site ID
  • Display name
  • Status

Example output:

Found 2 site(s):

  RefArch
    Display Name: Reference Architecture
    Status: online

  SiteGenesis
    Display Name: Site Genesis
    Status: online

Released under the Apache-2.0 License.