Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#25307 add migrating data with json page #283

Merged
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
4 changes: 1 addition & 3 deletions docs/API/content-type/listing-co.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ This is a basic request for listing content, without any additional parameters:

=== "CURL"

```
```
curl GET "https://api.flotiq.com/api/v1/content/blogposts" \
--header "X-AUTH-TOKEN: YOUR_API_KEY" \
--header "accept: application/json"
Expand Down Expand Up @@ -311,8 +311,6 @@ in what `order_direction`, whether to use `hydration`, and what `filters` to nar
```
{ data-search-exclude }



Request parameters

| Parameter | Description |
Expand Down
59 changes: 59 additions & 0 deletions docs/CLI/migrating-data-between-spaces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
tags:
- Developer
---

title: Migrating Flotiq data between Spaces | Flotiq docs
description: How to migrate data using CLI export&import through JSON features

# Migrating Flotiq data between Spaces

Flotiq CLI provides a convenient way to export and import data from your Flotiq account, including Content Types, Content Objects, and media files. This process allows for backup, migration, or sharing of data across environments.

## Exporting Data to JSON Files

You can export your data from Flotiq into local JSON files using the following command:

```
flotiq export [directory] [flotiqApiKey]
```
{ data-search-exclude }

This command exports data from your Flotiq account to the specified directory. If the API key is limited to specific Content Types, only the data available for that key will be exported.

**Parameters:**

- `directory`: The path to the directory where the exported files will be saved.
- `flotiqApiKey`: A read-only or read-and-write API key for your Flotiq account.

**Flags:**

- `--only-definitions`: Use this flag to export only the Content Type Definitions, ignoring the Content Objects.

The exported files will include JSON representations of your Content Types and Content Objects, allowing easy access and further processing.

## Importing Data from JSON Files

To import previously exported data back into your Flotiq account, or migrate data between accounts, use the following command:

```
flotiq import [projectName] [flotiqApiKey]
```
{ data-search-exclude }


This command reads Content Types and Content Objects from the specified directory and imports them into your Flotiq account. The directory structure must include folders such as `ContentType[0-9]` containing `ContentTypeDefinition.json` files and `contentObject[0-9].json` files.

The number at the end of the directory or file names defines the import order. Additionally, a `./images` directory within the project should store any images that will be imported into your Flotiq Media Library.

The `flotiq import` command ensures that your data is correctly structured and imported into Flotiq without data loss or corruption.

## Manual Import/Export via API

While the CLI provides a straightforward way to handle data export and import, you can also perform these operations manually using the Flotiq API. When choosing this approach, however, be aware that image URLs in your Content Objects will need to be updated manually. This is because images will receive new IDs during the import process, which can result in broken links if not handled properly.

For more details on how to adjust image URLs and manage the import/export process via API, please refer to the attached documentation.

---

Using Flotiq CLI simplifies the management of your data, enabling efficient migrations and backups. However, if your project requires more custom handling, the manual API method provides flexibility, with the caveat of manually updating image references.
6 changes: 5 additions & 1 deletion docs/panel/spaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,16 @@ When the administrator changes the plan:
* **From paid to another paid plan** - a confirmation will be displayed, and the details of the billing will be available in the `Manage Subscription` section on the Spaces list. Billing adjustment will occur at the end of the billing period.
* **From paid to free** - the subscription cancellation will be scheduled to coincide with the end of the current billing period.

### Migrating spaces

In Flotiq you can migrate your data between spaces using [Flotiq CLI import and export commands](../CLI/migrating-data-between-spaces.md). Using data migration between spaces allows you for easily setting up testing and production environments for your project, with one space being dedicated to testing and the second for running production.

## Manage Users in Organization

Administrators can manage users outside the Space context.
This allows Administrators to have an overview of all users within the Organization.

Users can be added independently of Spaces, without being assigned to a specific Space.
Users can be added independently of Spaces, without being assigned to a specific Space.

If a user is assigned to a Space, there are ways to manage their access to space content. If you wish to restrict user actions, consider adding a [Space Role](./user-roles.md) for the user. Users without any assigned role will have unrestricted access to all resources.

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ nav:
- Plugins API Reference: panel/PluginsDevelopment/PluginDocs/
- CLI:
- 'Overview': CLI/index.md
- 'Migrating Flotiq data between Spaces': CLI/migrating-data-between-spaces.md
- 'Starting new project with Gatsby and Flotiq': CLI/starting-new-project-gatsby.md
- 'Starting new project with Next.js and Flotiq': CLI/starting-new-project-nextjs.md
- 'Migrate WordPress blog content to Flotiq': CLI/wordpress-importer.md
Expand Down
Loading