Skip to content

pacx customapi create

github-actions[bot] edited this page Jun 16, 2026 · 2 revisions

Creates a Dataverse Custom API with optional request parameters and response properties.

Usage

Create a minimal Custom API (unique name inferred from display name + solution publisher prefix):

pacx customapi create -d "Greg Sum" -s MySolution

Create with an explicit unique name:

pacx customapi create -d "Greg Sum" -n nn_GregSum -s MySolution

Create with request parameters and a response property:

pacx customapi create -d "Greg Sum" -p "Addend1:Integer, Addend2:Integer" -r Result:Integer -s MySolution

Naming conventions applied automatically:

  • Unique name (when omitted): {publisherPrefix}_{DisplayNameWithoutSpaces} — e.g. display name 'Greg Sum' with prefix 'nn' becomes nn_GregSum.
  • Request parameter unique names: {customApiUniqueName}-in-{parameterName} — e.g. nn_GregSum-in-Addend1.
  • Response property unique names: {customApiUniqueName}-out-{propertyName} — e.g. nn_GregSum-out-Result.
  • Display names for parameters/responses: inferred from the name by splitting on capital-letter boundaries — e.g. Addend1 becomes 'Addend 1'.
  • Publisher prefix validation: if --unique-name is provided, its prefix (before _) must match the solution publisher prefix; mismatches are rejected.

Arguments

Long Name Short Name Required? Description Default value Valid values
display-name d Y Human-readable name of the Custom API (e.g. 'Greg Sum'). - String
unique-name n N Unique name including publisher prefix (e.g. nn_GregSum). Inferred from --display-name and the solution publisher prefix if omitted. - String
description desc N Description of the Custom API. String
binding-type b N Binding type: Global, Entity, or EntityCollection. Global Global, Entity, EntityCollection
bound-entity be N Logical name of the entity this API is bound to (required when --binding-type is Entity or EntityCollection). - String
allowed-step-type ast N Allowed processing step type: None, AsyncOnly, or SyncAndAsync. SyncAndAsync None, AsyncOnly, SyncAndAsync
type t N Action (POST) or Function (GET). Action Action, Function
execute-privilege ep N Name of the privilege required to execute this Custom API. String
param p N Comma-separated request parameters as Name:Type (required) or Name?:Type (optional). E.g. X:Integer,Y?:String - String
response r N Comma-separated response properties as Name:Type. E.g. Result:Integer - String
solution s N Unmanaged solution unique name to add the Custom API components to. Uses the current default solution if omitted. - String

Command list

Clone this wiki locally