> **Experimental**
>
> `@aws-cdk/integ-tests-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# ApiCallBase

Base class for an ApiCall.

Extends: Construct › ApiCallBase
Implements: IApiCall, IConstruct, IDependable
Superclass of: AwsApiCall, HttpApiCall, LambdaInvokeFunction

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/assertions/api-call-base.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/integ-tests-alpha/lib/assertions/api-call-base.ts#L124)

## Initializer

```ts
new ApiCallBase(scope: Construct, id: string)
```

## Properties

- `node`: [Node](/cdk/api/v2/docs/constructs.Node.html) (required) — The tree node.

- `provider`: [AssertionsProvider](/cdk/api/v2/docs/@aws-cdk_integ-tests-alpha.AssertionsProvider.html) (required) — access the AssertionsProvider.

  This can be used to add additional IAM policies
  the provider role policy

## Methods

- `assertAtPath(path: string, expected: ExpectedResult): IApiCall` — Assert that the ExpectedResult is equal to the result of the AwsApiCall at the given path.

  Providing a path will filter the output of the initial API call.

  For example the SQS.receiveMessage api response would look
  like:

  If you wanted to assert the value of `Body` you could do

- `expect(expected: ExpectedResult): IApiCall` — Assert that the ExpectedResult is equal to the result of the AwsApiCall.

- `getAtt(attributeName: string): Reference` — Returns the value of an attribute of the custom resource of an arbitrary type.

  Attributes are returned from the custom resource provider through the
  `Data` map where the key is the attribute name.

- `getAttString(attributeName: string): string` — Returns the value of an attribute of the custom resource of type string.

  Attributes are returned from the custom resource provider through the
  `Data` map where the key is the attribute name.

- `isConstruct(x: any): boolean` (static) — Checks if `x` is a construct.

  Use this method instead of `instanceof` to properly detect `Construct`
  instances, even when the construct library is symlinked.

  Explanation: in JavaScript, multiple copies of the `constructs` library on
  disk are seen as independent, completely different libraries. As a
  consequence, the class `Construct` in each copy of the `constructs` library
  is seen as a different class, and an instance of one class will not test as
  `instanceof` the other class. `npm install` will not create installations
  like this, but users may manually symlink construct libraries together or
  use a monorepo tool: in those cases, multiple copies of the `constructs`
  library can be accidentally installed, and `instanceof` will behave
  unpredictably. It is safest to avoid using `instanceof`, and using
  this type-testing method instead.

  **Parameters**

  - `x` — Any object.

  **Returns:** true if `x` is an object created from a class which extends `Construct`.

- `next(next: IApiCall): IApiCall` — Allows you to chain IApiCalls. This adds an explicit dependency betweent the two resources.

  Returns the IApiCall provided as `next`

- `toString(): string` — Returns a string representation of this construct.

- `waitForAssertions(options?: WaiterStateMachineOptions): IApiCall` — Wait for the IApiCall to return the expected response.

  If no expected response is specified then it will wait for
  the IApiCall to return a success

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.
  Use multiple `with()` calls if subsequent mixins should apply to added
  constructs.

  **Parameters**

  - `mixins` — The mixins to apply.

  **Returns:** This construct for chaining
