Class AddEndpointCommand
Version: 3.4
Adds a new Sitecore.CH.Cli.Core.Models.Endpoint and selects it as active.
Inheritance
object
Sitecore.CH.Cli.Core.Abstractions.Commands.BaseCommand<THandler>Sitecore.CH.Cli.Core.CommandHandlers.Endpoints.AddEndpointCommandHandler
AddEndpointCommand
Namespace: SitecoreSitecore.CHSitecore.CH.CliSitecore.CH.Cli.CoreSitecore.CH.Cli.Core.CommandsEndpoints
Assembly: Sitecore.CH.Cli.Core.dll
Syntax
RequestResponse
public class AddEndpointCommand : BaseCommand<AddEndpointCommandHandler>
Remarks
Required parameters
--name -n
Name for the endpoint.--url -r
Url for the endpoint.--client-id -i
Client ID for the endpoint.--client-secret -s
Client Secret for the endpoint.
Optional parameters
--password -p
User password.--username -u
User name.--redirect-uri -d
Specifies a local URI to complete the OAuth flow. Needs to match the value configured for the given OAuth client. Default value: http://localhost:9000/
Global parameters
-? --help -h
Show this help message and exit.-v --verbosity
Enables verbose logging.
Examples
Authenticate with and endpoint using user name and password from standard input:
RequestResponse
cat ./password.txt | ch-cli endpoint add -n "<endpoint name>" -r "<endpoint url>" -i "<client id>" -s "<client secret>" -u "<user name>"
Authenticate with and endpoint using user name and password:
RequestResponse
ch-cli endpoint add -n "<endpoint name>" -r "<endpoint url>" -i "<client id>" -s "<client secret>" -u "<user name>" -p "<password>"
Authenticate with and endpoint interactively:
RequestResponse
ch-cli endpoint add -n "<endpoint name>" -r "<endpoint url>" -i "<client id>" -s "<client secret>"
Authenticate with and endpoint using a non-default redirect URI:
RequestResponse
ch-cli endpoint add -n "<endpoint name>" -r "<endpoint url>" -i "<client id>" -s "<client secret>" --redirect-uri "http://localhost:9005/"