# Attribution Catalog Endpoint

It is a licensing requirement (see 3.7.2 of our [Service Terms of Use](https://www.imin.co/terms/service-terms-of-use)) that any frontend that displays open data form the imin Platform must include the relevant open data attribution alongside it.

The Attribution Catalog Endpoint returns metadata of all OpenActive Datasets available through the imin Platform.

## Accessing the Attribution Catalog Endpoint

In keeping with the design philosophy of the Firehose API, the endpoints includes metadata for **all** datasets available through the imin Platform:

```url
https://firehose.imin.co/firehose/datasets
```

{% hint style="warning" %}
As with other imin endpoints, you must provide a valid API key as the `X-API-KEY` request header.
{% endhint %}

## Using the Attribution Catalog Endpoint with Firehose

The items within the Attribution Catalog Endpoint will include at least the following properties:

<pre class="language-json"><code class="lang-json">{
  "@context": [
    "https://schema.org/",
    "https://openactive.io/"
  ],
  "@type": "Dataset",
  "@id": "https://data.everyoneactive.com/OpenActive/",
  "identifier": "everyone-active",
<strong>  "name": "Everyone Active Sessions and Facilities",
</strong>  "publisher": {
    "@type": "Organization",
    "name": "Everyone Active",
    "legalName": "Sports and Leisure Management LTD",
    ...
  },
  "license": "https://creativecommons.org/licenses/by/4.0/",
  ...
}
</code></pre>

The data items within the Firehose feeds include the following properties:

<pre class="language-json"><code class="lang-json">"data": {
  ...
<strong>  "imin:dataSource": {
</strong>    "@type": "Dataset",
    "identifier": "everyone-active"
  }
  ...
}
</code></pre>

The value of the `data.imin:dataSource.identifier` in the Firehose feeds can be matched against the value of `identifier` in the Attribution Catalog Endpoint, and hence can be used to dereference the complete data for the `Dataset`.

## Displaying attribution to end users

It is a licensing requirement (see 3.7.2 of our [Service Terms of Use](https://www.imin.co/terms/service-terms-of-use)) that any frontend that displays open data from the imin Platform must include the relevant open data attribution alongside it.

The attribution should be included somewhere on the page where the data appears (i.e. the session or facility page).

The following HTML is recommended for attribution on any opportunity page, based on the data in the `Dataset` retrieved above:

<pre class="language-html"><code class="lang-html"><strong>Source: &#x3C;a href="{{Dataset.url}}" property="odrs:attributionURL">
</strong>    &#x3C;span property="odrs:attributionText">{{Dataset.publisher.name}}&#x3C;/span>
&#x3C;/a>
</code></pre>

For example, for data from Everyone Active, the attribution should be hyperlinked as follows somewhere on a page displaying that data, as stipulated at the bottom of its Dataset Site at <https://data.everyoneactive.com/OpenActive/>:

> Source: [Everyone Active](https://data.everyoneactive.com/OpenActive/)

## Full Example for Fusion Lifestyle

For a Firehose feed opportunity that includes a `Dataset.identifier` as follows:

```json
"imin:dataSource": {
  "@type": "Dataset",
  "identifier": "fusion-lifestyle"
}
```

The following matching data should be retrieved from the Attribution Catalog Endpoint:

```json
{
  "@type": "Dataset",
  "identifier": "fusion-lifestyle",
  "url": "https://opendata.fusion-lifestyle.com/OpenActive/",
  "publisher": {
    "@type": "Organization",
    "name": "Fusion Lifestyle",
    ...
  },
  ...
}
```

And rendered into the following HTML for display to the user:

```html
Source: <a href="https://opendata.fusion-lifestyle.com/OpenActive/" property="odrs:attributionURL">
    <span property="odrs:attributionText">Fusion Lifestyle</span>
</a>
```

Which is displayed as follows:

> Source: [Fusion Lifestyle](https://opendata.fusion-lifestyle.com/OpenActive/)
