Projects
Projects represent your applications that use Prisma ORM. Each individual project is associated with an Organization and may be configured separately from the other projects in that organization.
View an organization's projects
On the Overview section of your organization you will see a list of the projects associated with that organization. Clicking any of these projects will bring you into that project's details.
A project's details page is where you can:
- View the project's settings
- Generate project API keys
- Configure applications such as Pulse and Accelerate in your project
Project API Keys
A project API key is required to validate requests from Prisma Client to products such as Accelerate and Pulse. You may generate multiple project API keys per project and manage those via the Settings tab of a project's page.
View API keys
Within a project's Settings tab, you can find your existing project API keys under the Project API keys tab.
You can also get to this section from the project page's Dashboard view by hitting the Manage API keys link if your project has any associated API keys.
Create an API key
Project API keys can be created within the Settings section of a project's details page under the Project API keys tab.
Once on this tab, click the New API Key button.
You will be prompted for a name for the new API key. After filling in that field, click Create API Key.
The generated API key is only accessible when it is first created, so be sure to copy it and store it in a safe place before closing the popup or clicking I've stored it securely.
Use an API key
A project API key must be provided to validate requests through products such as Accelerate and Pulse. With an API key in place, Prisma will be able to validate requests and associate usage with the project the project API key belongs to.
Below are examples of how to use a project API key with each product:
Accelerate
Accelerate requires your project API key to be passed via the prisma://
connection string as a URL parameter.
To apply your project API key to an Accelerate connection string, add the api_key
parameter with the API key as the value:
.env
1ACCELERATE_URL=prisma://accelerate.prisma-data.net/?api_key=__API_KEY__
For more information about setting up and using Accelerate, see the Accelerate documentation.
Pulse
Pulse requires the project API key to be passed when extending Prisma Client with the withPulse
client extension.
To apply your project API key, create an environment variable that holds your API key:
.env
1PRISMA_API_KEY=__API_KEY__
Then use that environment variable when initializing the withPulse
extension by providing it as the value of the argument object's apiKey
field:
import { PrismaClient } from '@prisma/client'import { withPulse } from '@prisma/extension-pulse'const prisma = new PrismaClient().$extends(withPulse({apiKey: process.env.PRISMA_API_KEY,}))
For more information about setting up and using Pulse, see the Pulse documentation.
Delete an API key
To delete an API key, head into the Settings tab of your project and select the Project API keys tab on that page.
The table here displays all of your API keys associated with the selected project. This table's Action column contains a trash can symbol for each record. Clicking this symbol on any record will open a popup asking if you are sure you want to delete the project API key.
Click Remove API key to remove the key.
Deleting an API key is irreversible. Any applications using that API key will need to be updated to a valid key to continue functioning as expected.
Settings
In a project's Settings page, you can:
- Update a project's name
- Delete a project
- Manage a project's API keys (see Project API Keys)
In the General tab of the settings page, you will find an input field labeled Project name. You can update the name of your project by filling in this field and clicking Update.
You can also get to this section from the project page's Dashboard tab by hitting the Manage API keys link if your project has any associated API keys.
Delete a project
You can also delete a project from the Settings page. On the General tab of any project's settings, click Delete project. You will then be prompted whether or not you really want to delete the project.
Deleting a project will delete all project API keys associated with that project and remove any database connection strings stored with that project.
Deleting a project is irreversible.Accelerate
Within each Cloud Project you can set up and configure Accelerate, Prisma's global database cache.
Accelerate is currently in Preview. If you want to learn more about it, check out the Accelerate webpage and read the Accelerate documentation.
Configure Accelerate
To set up Accelerate in your project, enter the Accelerate tab on your project's details page.
Alternatively, if you have been given access to Accelerate, you can click Configure Accelerate under the Get Started section of your project's Dashboard page.
The form on the Accelerate tab will prompt you for two pieces of information needed to set up Accelerate:
- Your database connection string
- The region where you would like to host Accelerate's connection pool
It is recommended to choose a region closest to your database as this will minimize latency between the connection pooler and the database itself.
Once those fields are filled in, click Configure Accelerate at the bottom of the form. This will configure Accelerate to be used by your project.
After this completes, the view will display instructions on how to begin using Accelerate in your application.
Specifically, you will be prompted to:
- Copy the Accelerate connection string
- Set up Accelerate in your application
- Get a Project API Key if you do not already have one to use in your Accelerate connection string
Disable Accelerate
At any time, you may disable Accelerate and no longer use it in your project. To do this, head to the Accelerate tab of your project's Dashboard page.
On this tab, if Accelerate is already enabled you will see a Disable Accelerate button on the top right of the page.
Clicking this button and accepting the resulting prompt will disable Accelerate, making it unusable by the associated project.
View Accelerate usage
If Accelerate is configured for your project, you will find a View usage link on the top right of the Accelerate page next to the Disable Accelerate button.
Clicking this link will take you to the Usage section of the organization the project is associated with.
See Usage for details about the metrics available in your organization's Usage section.
Pulse
Within each Cloud Project, you can set up and configure Pulse, Prisma's manage change data capture (CDC) service.
Set up Pulse
From your Cloud Project dashboard select Enable Pulse
This option will look slightly different if you have not yet been given Early Access to Pulse. In that scenario the link will prompt you to join the wait list.
On this page, there are two important sections with instructions to follow to set up Pulse:
Prepare your database
First is the Prepare your database section. Here, a set of instructions are defined that guide you on preparing your database for supporting real-time functionality.
These configurations are not Prisma-specific, but rather are database configurations Pulse relies on. For more detailed instructions, see the Pulse documentation.
Pulse currently works with PostgreSQL databases and MySQL support is coming soon.
Enable Pulse
This section will prompt you for two pieces of information needed to set up Pulse:
- Your database connection string
- The region where you would like to host Pulse
It is recommended to choose a region nearest your database as this will minimize latency between Pulse and the database itself.
Once those fields are filled in, click Enable Pulse at the bottom of the form. This will configure Pulse to be used by your project.
After this completes, the view will display instructions on how to add Pulse to your application and start your first subscription.
Specifically, you will be prompted to:
- Add a Project API Key if you do not already have one to use in the Pulse extension
- Add Pulse to your application
Disable Pulse
At any time, you may disable Pulse and no longer use it in your project. To do this, head to the Pulse tab of your project's Dashboard page.
From this view, if Pulse is already enabled, navigate to Settings where you will be able to Disable Pulse. Clicking this button will open a dialog with instructions on the changes that should be made to your database to drop the replication slot Pulse was configured to use.
Once that change is made, clicking the Disable Pulse button on that panel will disable Pulse, making it unusable by the associated project.
View Pulse usage
Usage for Pulse is coming soon.
We are currently working on providing usage statistics for Pulse.