Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ If you want to see Tracardi in action subscribe to our [:tv: Youtube channel](ht

## 👇 Installation and getting started

The easiest way to run TRACARDI is to run it as a :whale: docker container. Please install docker and docker-compose on your local machine
The easiest way to run TRACARDI is to install a demo on our site. Visit [https://tracardi.com/index.php/about-tracardi/](https://tracardi.com/index.php/about-tracardi/) fill the form that pops-up and you will recievie a one day demo just for you.

If you would like to run TRACARDI on your latptop as a :whale: docker container. Please install docker and docker-compose on your local machine
then clone [tracardi/tracardi-api](https://github.com/Tracardi/tracardi-api.git)

```bash
Expand Down
125 changes: 125 additions & 0 deletions docs/api/webhooksdocumentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
Sending Profile-Less Events

To send a profile-less event, you can use two methods:

Method 1: Using the `profile_less` Parameter

You can send a profile-less event by including the `profile_less=true` parameter in the `POST /track` query:

=> POST /track?profile_less=true

A profile-less event will not create a profile but will generate a session. The data sent to the server must include a session ID, which can be an existing session or a new one generated on the client-side. It's important to note that a profile-less event will not have a profile when it enters the workflow, and the profile field will be empty.

Method 2: Direct `Endpoint Posting`

Another way to send a profile-less event is by posting it directly to the following endpoint:

=> POST /collect/EVENT-TYPE/SOURCE-ID

Where:
- EVENT-TYPE is the event type (e.g., coupon-received).
- SOURCE-ID is the event source ID.

In the body of the query, send a standard JSON object, which becomes the event's properties. This method does not create a session by default, but you can add a profile and session during event processing for dynamic linkage within the workflow.

Available Webhooks :

Below are the available webhooks in this system:

1. POST `/track`: This endpoint is used for tracking events using a POST request. It can handle both profiled and profile-less events.

2. PUT `/track`: Similar to the POST method, this endpoint allows tracking events using a PUT request.

3. POST `/collect/EVENT-TYPE/SOURCE-ID`: This endpoint is used to collect data from a POST request with an event type and source ID. It can create profile-less events with the provided properties.

4. GET `/collect/EVENT-TYPE/SOURCE-ID`: Similar to the POST method, this endpoint collects data from a GET request with an event type and source ID. It can also create profile-less events based on query parameters.

5. GET `/collect/EVENT-TYPE/SOURCE-ID`: This endpoint is used for collecting data from a GET request with an event type and source ID, potentially creating profile-less events.

6. POST `/collect/EVENT-TYPE/SOURCE-ID`: Similar to the GET method, this endpoint collects data from a POST request with an event type and source ID. It can create profile-less events based on the request's body.

7. PUT `/redirect/REDIRECT-ID/SESSION-ID`: This endpoint handles various HTTP requests for redirecting events to specific URLs based on configuration. It supports PUT, DELETE, GET, and POST methods.

Response Examples:

Here are response examples for each of the webhooks mentioned:

=> POST `/track`

Response Example:

{
"profile": {
"id": "0d2d9dc5-0d60-471e-956f-8766dcb8aba2"
},
"source": {
"consent": false
}
}

=> PUT `/track`

Response Example:

{
"profile": {
"id": "1a3b4c5d-6e7f-8g9h-0i1j"
},
"source": {
"consent": true
}
}

=> POST `/collect/EVENT-TYPE/SOURCE-ID`

Response Example:

{
"profile": {},
"source": {
"consent": true
}
}

=> GET `/collect/EVENT-TYPE/SOURCE-ID`

Response Example:

{
"profile": {},
"source": {
"consent": false
}
}

=> GET `/collect/EVENT-TYPE/SOURCE-ID`

Response Example:

{
"profile": {},
"source": {
"consent": true
}
}

=> POST `/collect/EVENT-TYPE/SOURCE-ID`

Response Example:

{
"profile": {},
"source": {
"consent": false
}
}

=> PUT `/redirect/REDIRECT-ID/SESSION-ID`

Response Example:

{
"message": "Event redirected successfully."
}

These response examples demonstrate the expected structures of responses for each webhook, providing clarity on the data and format.
59 changes: 59 additions & 0 deletions docs/flow/actions/get_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# GitHub Issue Retrieval Component

## Description
The GitHub Issue Retrieval component is designed to fetch a single issue from a GitHub repository using user-defined input parameters. It allows you to configure the resource, specify the owner of the repository, provide the repository name, and set a timeout for the issue retrieval operation.

## Inputs

### Resource Configuration
- **Type:** String
- **Description:** Specifies the resource configuration, which might include details like API endpoints, authentication credentials, and other relevant configuration options.

### Owner
- **Type:** String
- **Description:** Specifies the owner of the GitHub repository from which the issue will be retrieved.

### Repository Name
- **Type:** String
- **Description:** Specifies the name of the GitHub repository from which the issue will be retrieved.

### Issue ID
- **Type:** Integer
- **Description:** Specifies the ID of the issue to be retrieved from the repository.

### Timeout
- **Type:** Integer (in milliseconds)
- **Description:** Sets a timeout for the issue retrieval operation. If the retrieval process exceeds this timeout, an error will be generated.

## Outputs

### Issue
- **Type:** GitHub Issue object
- **Description:** Returns the retrieved GitHub issue, including details like title, description, comments, and more.

### Error
- **Type:** Error Message
- **Description:** Returns an error message if any issues occur during the retrieval process, such as connection problems or invalid input parameters.

## Example Usage

Here's an example of how you can use the GitHub Issue Retrieval component in Python:

```python

resource_config = "https://api.github.com"
owner = "example_user"
repository_name = "example_repo"
issue_id = 123
timeout = 5 seconds

# Call the GitHub Issue Retrieval component
issue, error = retrieve_github_issue(resource_config, owner, repository_name, issue_id, timeout)


if issue:
print("GitHub Issue Title:", issue["title"])
print("GitHub Issue Description:", issue["description"])
# Process the retrieved issue data here
else:
print("Error during GitHub issue retrieval:", error)