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
24 changes: 24 additions & 0 deletions docs/01-getting-started/04-using-the-enjin-platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,30 @@ Once you're satisfied with the options, click the "**Create**" button at the bot

Click **View Transaction** to jump straight to the Transactions page and watch it move from `PENDING` → `BROADCAST` → `FINALIZED` as the daemon signs and the chain finalizes it.

### From the Dashboard to the API: View the GraphQL Request {#view-graphql-request}

Everything the dashboard does is just a GraphQL request under the hood. Any transaction you can build in the UI can show you the exact mutation it would send — so you can prototype an action visually, then lift the request straight into your app integration instead of writing it from scratch.

On any transaction form — whether a guided flow or the transaction builder — click the **dropdown caret (▾)** next to the **Create** (or **+ Add to Batch**) button and choose **View GraphQL Request**.

![The Create Token button with its dropdown open, showing the View GraphQL Request option](/img/getting-started/v3-view-graphql-request-button.png)

The popup gives you everything needed to reproduce the request programmatically:
Comment thread
Bradez marked this conversation as resolved.

- **URL** — the GraphQL endpoint the request is sent to (`https://platform.beta.enjin.io/graphql`).
- **Request** — the GraphQL mutation, including its variable definitions.
- **Variables** — the JSON variable values for this specific transaction.

Each block has its own **Copy** button. The **Copy** button's dropdown also offers **Copy as cURL**, and you can **Execute** the request directly from the popup to run it without leaving the page.

:::note
**Copy as cURL** doesn't include your API token — the copied command has a `<YOUR_TOKEN>` placeholder. Replace it with a valid API token generated under **Settings → API Tokens** before running the request.
:::

![The View GraphQL Request popup showing the URL, the mutation, and its variables](/img/getting-started/v3-view-graphql-request-popup.png)

This works for both single and batch transactions. Copy the **Request** and **Variables** to build the same mutation in your own code — see [Using the Enjin API](/01-getting-started/05-using-enjin-api/05-using-enjin-api.md) for how to send it.

### Option B. Using the Enjin API & SDKs

To create a Platform request programmatically, use the <GlossaryTerm id="graphql" /> API, or one of the <GlossaryTerm id="sdk" />s.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ To illustrate the differences between GraphQL and RESTful API calls, let's consi
In a typical RESTful API, you might have an endpoint like `/mintToken` with a POST request that includes the necessary data in the request body. This might look something like:

```http
POST https://platform.beta.enjin.io/api/mintToken
POST https://example.com/api/mint-token
Content-Type: application/json

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ If you're more familiar with REST APIs, it's important to understand that our AP
We recommend reviewing our [How to Use GraphQL guide](/01-getting-started/05-using-enjin-api/01-how-to-use-graphql.md) to get started quickly and effectively.
:::

:::tip Don't write mutations from scratch
Anything you can do in the Platform dashboard can reveal its exact GraphQL request. Build the action in the UI, then use **View GraphQL Request** to copy the mutation and variables straight into your app. See [From the Dashboard to the API](/01-getting-started/04-using-the-enjin-platform.md#view-graphql-request).
:::

## Authentication

API tokens are used to authenticate your application's requests to the Enjin Platform. They serve a dual purpose:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading