Skip to content

C8 api intermediate tutorial #5636

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

christinaausley
Copy link
Contributor

@christinaausley christinaausley commented Apr 25, 2025

Description

Docs aligned with tutorial camunda/camunda-api-tutorials#13. This PR should not be merged until the actual tutorial is merged.

When should this change go live?

  • This is a bug fix, security concern, or something that needs urgent release support. (add bug or support label)
  • This is already available but undocumented and should be released within a week. (add available & undocumented label)
  • This is on a specific schedule and the assignee will coordinate a release with the Documentation team. (create draft PR and/or add hold label)
  • This is part of a scheduled alpha or minor. (add alpha or minor label)
  • There is no urgency with this change (add low prio label)

PR Checklist

  • My changes are for an upcoming minor release and are in the /docs directory (version 8.8).
  • My changes are for an already released minor and are in a /versioned_docs directory.

Copy link
Contributor

github-actions bot commented Apr 25, 2025

👋 🤖 🤔 Hello, @christinaausley! Did you make your changes in all the right places?

These files were changed only in docs/. You might want to duplicate these changes in versioned_docs/version-8.7/.

  • docs/apis-tools/camunda-api-rest/intermediate-tutorial.md
  • docs/apis-tools/camunda-api-rest/sidebar-schema.js
  • docs/apis-tools/camunda-api-rest/tutorial.md

You may have done this intentionally, but we wanted to point it out in case you didn't. You can read more about the versioning within our docs in our documentation guidelines.

@christinaausley christinaausley changed the title WIP: C8 api intermediate tutorial C8 api intermediate tutorial Apr 28, 2025
@christinaausley christinaausley requested review from tmetzke, pepopowitz and a team April 28, 2025 17:53
@akeller akeller moved this to 👀 In Review in Documentation Team Apr 28, 2025
@christinaausley christinaausley marked this pull request as ready for review April 28, 2025 17:54
@christinaausley christinaausley added epic:api-interactivity theme:api-streamline Issues related to the theme of streamlining APIs component:api Issues related to the C8 REST API labels Apr 28, 2025
Copy link
Contributor

@pepopowitz pepopowitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ No blocking feedback, this is fantastic!!!! Great work.

tmetzke
tmetzke previously approved these changes Apr 29, 2025
Copy link
Member

@tmetzke tmetzke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Really cool, nothing to add besides what @pepopowitz already suggested 🚀

Copy link
Contributor

@mesellings mesellings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @christinaausley, this is really helpful for users! 🚀

Just some nitpicky, non-blocking suggestions you can either adopt or ignore, depending on your preference! 😊

id: camunda-8-api-intermediate-tutorial
title: Intermediate tutorial
sidebar_label: Intermediate
description: "Step through our intermediate Camunda 8 API tutorial to deploy resources, create and start a process instance, and view a process instance by its key."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: "Step through our intermediate Camunda 8 API tutorial to deploy resources, create and start a process instance, and view a process instance by its key."
description: "Step through this intermediate Camunda 8 API tutorial to deploy resources, create and start a process instance, and view a process instance by its key."

Rewording suggestion

---

In this tutorial, we'll step through examples to highlight the capabilities of the Camunda 8 API, such as deploying resources, creating and starting a process instance, and viewing a process instance by its key.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could add an "About this tutorial" section here, that includes who this is aimed at, link back to the beginner tutorial for example, and describe what is achieved at the end of the tutorial - like a learning statement at the beginning of a lesson (already covered in the intro sentence, but perhaps more detail).

sidebar_label: Intermediate
description: "Step through our intermediate Camunda 8 API tutorial to deploy resources, create and start a process instance, and view a process instance by its key."
---

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could add an intermediate badge, as per the Get Started guides?


In this tutorial, we'll step through examples to highlight the capabilities of the Camunda 8 API, such as deploying resources, creating and starting a process instance, and viewing a process instance by its key.

## Prerequisites
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could make this section into a table layout to make it easier to see, as it is quite cluttered atm with a lot of information. For example, https://docs.camunda.io/docs/next/components/modeler/web-modeler/idp/idp-configuration/#prerequisites.

Make sure you keep the generated client credentials in a safe place. The **Client secret** will not be shown again. For your convenience, you can also download the client information to your computer.
:::

- In this tutorial, we utilize a JavaScript-written [GitHub repository](https://github.com/camunda/camunda-api-tutorials) to write and run requests. Clone this repo before getting started.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- In this tutorial, we utilize a JavaScript-written [GitHub repository](https://github.com/camunda/camunda-api-tutorials) to write and run requests. Clone this repo before getting started.
- In this tutorial, we use a JavaScript-written [GitHub repository](https://github.com/camunda/camunda-api-tutorials) to write and run requests. Clone this repo before getting started.

Rewording suggestion for plain English - I always trya nd avoid utilize where use can do the same job 😊


If you're interested in how we use a library to handle auth for our code, or to get started, examine the `auth.js` file in the GitHub repository. This file contains a function named `getAccessToken` which executes an OAuth 2.0 protocol to retrieve authentication credentials based on your client ID and client secret. Then, we return the actual token that can be passed as an authorization header in each request.

To set up your credentials, create an `.env` file which will be protected by the `.gitignore` file. You will need to add the following:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To set up your credentials, create an `.env` file which will be protected by the `.gitignore` file. You will need to add the following:
To set up your credentials, create an `.env` file which will be protected by the `.gitignore` file. Add the following environment variables:


These keys will be consumed by the `auth.js` file to execute the OAuth protocol, and should be saved when you generate your client credentials in [prerequisites](#prerequisites).

Examine the existing `.env.example` file for an example of how your `.env` file should look upon completion. Do not place your credentials in the `.env.example` file, as this example file is not protected by the `.gitignore`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Examine the existing `.env.example` file for an example of how your `.env` file should look upon completion. Do not place your credentials in the `.env.example` file, as this example file is not protected by the `.gitignore`.
See the existing `.env.example` file for an example of how your `.env` file should look upon completion. Do not place your credentials in the `.env.example` file, as this example file is not protected by the `.gitignore`.

9. In your terminal, run `node cli.js processInstances deploy`.

:::note
This `deploy` command is connected to the `deployResources` function at the bottom of the `camunda-process-instances.js` file, and executed by the `cli.js` file. While we will work with roles in this tutorial, you may add additional arguments depending on the API calls you would like to make.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This `deploy` command is connected to the `deployResources` function at the bottom of the `camunda-process-instances.js` file, and executed by the `cli.js` file. While we will work with roles in this tutorial, you may add additional arguments depending on the API calls you would like to make.
This `deploy` command is connected to the `deployResources` function at the bottom of the `camunda-process-instances.js` file, and executed by the `cli.js` file. While we will work with roles in this tutorial, you may add additional arguments depending on the API requests you want to make.

Should we use request in place of call?


4. In your terminal, run `node cli.js processInstances view <key>`, where `<key>` is the process instance key. The `processDefinitionName` and `state` will then display in the output.

## If you get stuck
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## If you get stuck
## Troubleshooting

- If you haven't done so already, [create a cluster](/guides/create-cluster.md).
- Upon cluster creation, [create your first client](/guides/setup-client-connection-credentials.md). Ensure you check the `Zeebe` client scope box.

:::note
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:::note
:::caution

Is it worth making this a caution as this is important for them to capture first-time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:api Issues related to the C8 REST API epic:api-interactivity theme:api-streamline Issues related to the theme of streamlining APIs
Projects
Status: 👀 In Review
Development

Successfully merging this pull request may close these issues.

4 participants