Skip to content
Merged
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
22 changes: 22 additions & 0 deletions 14/umbraco-cms/reference/content-delivery-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,19 @@ The Delivery API is an opt-in feature in Umbraco. It must be explicitly enabled

### Enable the Content Delivery API

When creating your project, you can enable the Delivery API using the `--use-delivery-api` or `-da` flag. This will automatically add the necessary configuration to your project.

```bash
dotnet new umbraco -n MyProject -da
```

You can also enable the Delivery API at a later point by following these steps:

1. Open your project's `appsettings.json`.
2. Insert the `DeliveryApi` configuration section under `Umbraco:CMS`.
3. Add the `Enabled` key and set its value to `true`.
4. Open `Program.Cs`
5. Add `.AddDeliveryApi()` to `builder.CreateUmbracoBuilder()`

{% code title="appsettings.json" %}
```json
Expand All @@ -32,6 +42,18 @@ The Delivery API is an opt-in feature in Umbraco. It must be explicitly enabled
```
{% endcode %}

{% code title="Program.cs" %}
```csharp
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();

```
{% endcode %}

Once the Content Delivery API is enabled, the next step is to rebuild the Delivery API content index (_DeliveryApiContentIndex_). This can be done using the **Examine Management** dashboard in the **Settings** section of the Umbraco Backoffice.

1. Access the Umbraco Backoffice.
Expand Down
22 changes: 22 additions & 0 deletions 15/umbraco-cms/reference/content-delivery-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,19 @@ The Delivery API is an opt-in feature in Umbraco. It must be explicitly enabled

### Enable the Content Delivery API

When creating your project, you can enable the Delivery API using the `--use-delivery-api` or `-da` flag. This will automatically add the necessary configuration to your project.

```bash
dotnet new umbraco -n MyProject -da
```

You can also enable the Delivery API at a later point by following these steps:

1. Open your project's `appsettings.json`.
2. Insert the `DeliveryApi` configuration section under `Umbraco:CMS`.
3. Add the `Enabled` key and set its value to `true`.
4. Open `Program.Cs`
5. Add `.AddDeliveryApi()` to `builder.CreateUmbracoBuilder()`

{% code title="appsettings.json" %}
```json
Expand All @@ -32,6 +42,18 @@ The Delivery API is an opt-in feature in Umbraco. It must be explicitly enabled
```
{% endcode %}

{% code title="Program.cs" %}
```csharp
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();

```
{% endcode %}

Once the Content Delivery API is enabled, the next step is to rebuild the Delivery API content index (_DeliveryApiContentIndex_). This can be done using the **Examine Management** dashboard in the **Settings** section of the Umbraco Backoffice.

1. Access the Umbraco Backoffice.
Expand Down
Loading