# CallApiGatewayHttpApiEndpointProps

Properties for calling an HTTP API Endpoint.

Extends: CallApiGatewayHttpApiEndpointProps
Extends: CallApiGatewayEndpointBaseProps, CallApiGatewayHttpApiEndpointOptions
Used as props by: CallApiGatewayHttpApiEndpoint

- Source: [`aws-stepfunctions-tasks/lib/apigateway/call-http-api.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/apigateway/call-http-api.ts#L43)
- Type last changed: v2.178.0 · 6 Feb 2025

## Example

```ts
import * as apigatewayv2 from 'aws-cdk-lib/aws-apigatewayv2';
const httpApi = new apigatewayv2.HttpApi(this, 'MyHttpApi');

const invokeTask = new tasks.CallApiGatewayHttpApiEndpoint(this, 'Call HTTP API', {
  apiId: httpApi.apiId,
  apiStack: Stack.of(httpApi),
  method: tasks.HttpMethod.GET,
});
```

## Properties

- `apiId`: string (required) — The Id of the API to call.

- `apiPath`: string — Path parameters appended after API endpoint.

  **Default:** No path

- `apiStack`: [Stack](/cdk/api/v2/docs/aws-cdk-lib.Stack.html) (required) — The Stack in which the API is defined.

- `assign`: { [key: string]: any } — Workflow variables to store in this step.

  **Default:** Not assign variables

  Using workflow variables, you can store data in a step and retrieve that data in future steps.

- `authType`: [AuthType](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.AuthType.html) = AuthType.NO_AUTH — Authentication methods.

- `comment`: string — A comment describing this state.

  **Default:** No comment

- `credentials`: [Credentials](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.Credentials.html) — Credentials for an IAM Role that the State Machine assumes for executing the task.

  **Default:** None (Task is executed using the State Machine's execution role)

  This enables cross-account resource invocations.

- `headers`: [TaskInput](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.TaskInput.html) — HTTP request information that does not relate to contents of the request.

  **Default:** No headers

- `heartbeat`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = None — use `heartbeatTimeout`

- `heartbeatTimeout`: [Timeout](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.Timeout.html) = None — Timeout for the heartbeat.

  [disable-awslint:duration-prop-type] is needed because all props interface in
  aws-stepfunctions-tasks extend this interface

- `inputPath`: string = $ — JSONPath expression to select part of the state to be the input to this state.

  May also be the special value JsonPath.DISCARD, which will cause the effective
  input to be the empty object {}.

- `integrationPattern`: [IntegrationPattern](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.IntegrationPattern.html) — AWS Step Functions integrates with services directly in the Amazon States Language.

  **Default:** `IntegrationPattern.REQUEST_RESPONSE` for most tasks. `IntegrationPattern.RUN_JOB` for the following exceptions: `BatchSubmitJob`, `EmrAddStep`, `EmrCreateCluster`, `EmrTerminationCluster`, and `EmrContainersStartJobRun`.

  You can control these AWS services using service integration patterns.

  Depending on the AWS Service, the Service Integration Pattern availability will vary.

- `method`: [HttpMethod](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.HttpMethod.html) (required) — Http method for the API.

- `outputPath`: string = $ — JSONPath expression to select part of the state to be the output to this state.

  May also be the special value JsonPath.DISCARD, which will cause the effective
  output to be the empty object {}.

- `outputs`: any — Used to specify and transform output from the state.

  **Default:** $states.result or $states.errorOutput

  When specified, the value overrides the state output default.
  The output field accepts any JSON value (object, array, string, number, boolean, null).
  Any string value, including those inside objects or arrays,
  will be evaluated as JSONata if surrounded by {% %} characters.
  Output also accepts a JSONata expression directly.

- `queryLanguage`: [QueryLanguage](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.QueryLanguage.html) = JSONPath — The name of the query language used by the state.

  If the state does not contain a `queryLanguage` field,
  then it will use the query language specified in the top-level `queryLanguage` field.

- `queryParameters`: [TaskInput](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.TaskInput.html) — Query strings attached to end of request.

  **Default:** No query parameters

- `requestBody`: [TaskInput](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.TaskInput.html) — HTTP Request body.

  **Default:** No request body

- `resultPath`: string = $ — JSONPath expression to indicate where to inject the state's output.

  May also be the special value JsonPath.DISCARD, which will cause the state's
  input to become its output.

- `resultSelector`: { [key: string]: any } = None — The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.

  You can use ResultSelector to create a payload with values that are static
  or selected from the state's raw result.

- `stageName`: string = '$default' — Name of the stage where the API is deployed to in API Gateway.

- `stateName`: string — Optional name for this state.

  **Default:** The construct ID will be used as state name

- `taskTimeout`: [Timeout](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.Timeout.html) = None — Timeout for the task.

  [disable-awslint:duration-prop-type] is needed because all props interface in
  aws-stepfunctions-tasks extend this interface

- `timeout`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = None — use `taskTimeout`
