# Activities Resource

## getActivity

Gets the full definition of an activity.

### Example

```typescript
const activityId: string = "https://example.com/activities/test-activity";

xapi.getActivity({
  activityId: activityId
}).then((result: AxiosReponse<Activity>) => {
  const activity: Activity = result.data;
  console.log(activity);
});
```

### Parameters

| Parameter      | Type    | Required | Description              |
| -------------- | ------- | -------- | ------------------------ |
| activityId     | string  | true     | The URI of the activity. |
| useCacheBuster | boolean | false    | Enables cache busting.   |

### **Returns**

This method returns an `AxiosPromise` with the success `data` containing an [Activity](https://github.com/xapijs/xapi/blob/master/src/interfaces/Statement/Activity/Activity.ts) if successful.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.xapijs.dev/xapi-wrapper-library/activities-resource.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
