Skip to content

Commit b73b177

Browse files
committed
Many more docs changes
1 parent 72921fe commit b73b177

File tree

5 files changed

+132
-158
lines changed

5 files changed

+132
-158
lines changed

docs-v2/pages/connect/index.mdx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ import VideoPlayer from "@/components/VideoPlayer";
1313
Please reach out at `[email protected]` or our [Slack community](https://pipedream.com/support) to let us know how you're using it, what's not working, and what else you'd like to see.
1414
</Callout>
1515

16-
<VideoPlayer
17-
src="https://www.youtube.com/embed/xhUagMsogkQ"
18-
title="Pipedream Connect Public Preview"
19-
/>
20-
2116
Pipedream Connect is the easiest way for your users to connect to [over {process.env.PUBLIC_APPS}+ APIs](https://pipedream.com/apps), **right in your product**. You can build in-app messaging, CRM syncs, AI-driven products, [and much more](/connect/use-cases), all in a few minutes. Visit [the quickstart](/connect/quickstart) to build your first integration.
2217

2318
Connect lets your users authorize access to any API, directly in your app. You can then retrieve fresh credentials for any account, making requests on their behalf. Pipedream handles the security of credentials and the whole OAuth flow — **no need to manage authorization grants or token refresh yourself.**
@@ -73,9 +68,7 @@ All credentials and tokens are sent to Pipedream securely over HTTPS, and encryp
7368
## Product roadmap for Connect
7469

7570
- Address bugs and feedback during the preview phase
76-
- Use Pipedream OAuth clients while in development, to make it easier to get started
7771
- Invoke Pipedream workflows on behalf of your end users
78-
- Improve error handling for Connect developers and end users
7972
- And more!
8073

8174
## Glossary of terms

docs-v2/pages/connect/quickstart.mdx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import VideoPlayer from "@/components/VideoPlayer";
77

88
Pipedream Connect is the easiest way for your users to connect to [over {process.env.PUBLIC_APPS}+ APIs](https://pipedream.com/apps), **right in your product**. You can build in-app messaging, CRM syncs, AI-driven products, [and much more](/connect/use-cases), all in a few minutes.
99

10-
If you prefer videos to text, this demo walks through this quickstart:
11-
12-
<VideoPlayer
13-
src="https://www.youtube.com/embed/xhUagMsogkQ"
14-
title="Pipedream Connect Public Preview"
15-
/>
16-
1710
## Visual overview
1811

1912
Here's a high-level overview of how Connect works with your app:

docs-v2/pages/privacy-and-security/best-practices.mdx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Security Best Practices
22

3-
Pipedream implements a range of [privacy and security measures](/privacy-and-security/) meant to protect your data from unauthorized access. Since Pipedream [workflows](/workflows/), [event sources](/sources/), and other resources can run any Node.js code and process any event data, you also have a responsibility to ensure you handle that code and data securely. We've outlined a handful of best practices for that below.
3+
Pipedream implements a range of [privacy and security measures](/privacy-and-security/) meant to protect your data from unauthorized access. Since Pipedream [workflows](/workflows/), [event sources](/sources/), and other resources can run any code and process any event data, you also have a responsibility to ensure you handle that code and data securely. We've outlined a handful of best practices for that below.
44

55
## Store secrets as Pipedream connected accounts or environment variables
66

7-
Even if your workflow code is private, you should never store secrets like API keys in code. These secrets should be stored in one of two ways:
7+
Never store secrets like API keys directly in code. These secrets should be stored in one of two ways:
88

99
- [If Pipedream integrates with the app](https://pipedream.com/apps), use [connected accounts](/connected-accounts/) to link your apps / APIs.
1010
- If you need to store credentials for an app Pipedream doesn't support, or you need to store arbitrary configuration data, use [environment variables](/environment-variables/).
@@ -13,21 +13,19 @@ Read more about how Pipedream secures connected accounts / environment variables
1313

1414
## Deliver data to Pipedream securely
1515

16-
Whenever possible, encrypt data in transit to Pipedream. For example, use HTTPS endpoints when sending HTTP traffic to a workflow.
16+
Always send data over HTTPS to Pipedream endpoints.
1717

1818
## Send data out of Pipedream securely
1919

2020
When you connect to APIs in a workflow, or deliver data to third-party destinations, encrypt that data in transit. For example, use HTTPS endpoints when sending HTTP traffic to third parties.
2121

22-
## Add authentication to incoming event data
22+
## Require authorization for HTTP triggers
2323

24-
You can add many public-facing triggers to your workflows. For example, when you add an HTTP trigger to your workflow, anyone with the associated trigger URL can invoke it. You should protect your workflow with an authentication mechanism like [Basic Auth](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication), JWT, or others.
24+
HTTP triggers are public by default, and require no authorization or token to invoke.
2525

26-
The easiest way to do this is to use the [Validate Webhook Auth action](https://pipedream.com/apps/http/actions/validate-webhook-auth). This supports common auth options, and you don't have to write any code to configure it.
26+
For many workflows, you should [configure authorization](/workflows/triggers#authorizing-http-requests) to ensure that only authorized parties can invoke your HTTP trigger.
2727

28-
If you need to implement custom logic in code, see [this workflow](https://pipedream.com/new?h=tch_OaJfNv) for a shared API key example. This reads the header `x-api-key` and compares it to the [environment variable](/environment-variables/) called `YOUR_WEBHOOK_API_KEY`. If the `x-api-key` header does not match this variable, it returns a `401 Unauthorized` error and exits the workflow early.
29-
30-
This pattern is typical for protecting workflows: add the authentication logic in a step at the top of your workflow, ending early if auth fails. If auth succeeds, Pipedream runs the remaining steps of your workflow.
28+
For third-party services like webhooks, that authorize requests using their own mechanism, use the [Validate Webhook Auth action](https://pipedream.com/apps/http/actions/validate-webhook-auth). This supports common auth options, and you don't have to write any code to configure it.
3129

3230
## Validate signatures for incoming events, where available
3331

docs-v2/pages/rest-api/index.mdx

Lines changed: 15 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,18 @@ including all fields). Pass as a string of comma-separated values:
6363

6464
---
6565

66+
`org_id` **string**
67+
6668
<Callout>
67-
The `workspace_id` parameter is only required when using [User API keys](/rest-api/auth#user-api-keys). When authenticating with OAuth tokens, the API will automatically use the workspace associated with the token.
69+
The `org_id` parameter is only required when using [User API keys](/rest-api/auth#user-api-keys). When authenticating with OAuth tokens, the API will automatically use the workspace associated with the token.
6870
</Callout>
6971

70-
`workspace_id` **string**
71-
7272
When using [User API keys](/rest-api/auth#user-api-keys), some endpoints require you to specify [your workspace ID](/workspaces/#finding-your-workspace-s-id) you want the operation to take effect in:
7373

74-
- When _fetching_ specific resources (for example, when you [retrieve events for a specific source](#get-source-events)), **you should not need to pass your workspace's ID**. If your user is a part of the workspace, and you have access to that resource, and the API will return the details of the resource.
75-
- When _creating_ new resources, you'll need to specify the `workspace_id` in which you want to create the resource.
74+
- When _fetching_ specific resources (for example, when you [retrieve events for a specific source](#get-source-events)), **you should not need to pass `org_id`**. If your user is a part of the workspace, and you have access to that resource, and the API will return the details of the resource.
75+
- When _creating_ new resources, you'll need to specify the `org_id` in which you want to create the resource.
7676

77-
[Find your workspace's ID here](/workspaces/#finding-your-workspace-s-id).
77+
[Find your workspace / org ID here](/workspaces/#finding-your-workspace-s-id).
7878

7979
## Pagination
8080

@@ -1117,6 +1117,10 @@ curl "https://api.pipedream.com/v1/subscriptions?emitter_id=dc_def456&listener_i
11171117

11181118
## Users
11191119

1120+
<Callout>
1121+
These endpoints only work when using [user API keys](/rest-api/auth#user-api-keys), and will not work with workspace-level OAuth clients.
1122+
</Callout>
1123+
11201124
### Get Current User Info
11211125

11221126
Retrieve information on the authenticated user.
@@ -1194,103 +1198,6 @@ Paid user:
11941198
}
11951199
```
11961200

1197-
### Get Current User's Subscriptions
1198-
1199-
Retrieve all the [subscriptions](#subscriptions) configured for the
1200-
authenticated user.
1201-
1202-
#### Endpoint
1203-
1204-
```
1205-
GET /users/me/subscriptions
1206-
```
1207-
1208-
#### Parameters
1209-
1210-
_No parameters_
1211-
1212-
#### Example Request
1213-
1214-
```shell
1215-
curl 'https://api.pipedream.com/v1/users/me/subscriptions' \
1216-
-H 'Authorization: Bearer <token>'
1217-
```
1218-
1219-
#### Example Response
1220-
1221-
```json
1222-
{
1223-
"data": [
1224-
{
1225-
"id": "sub_abc123",
1226-
"emitter_id": "dc_abc123",
1227-
"listener_id": "p_abc123",
1228-
"event_name": ""
1229-
},
1230-
{
1231-
"id": "sub_def456",
1232-
"emitter_id": "dc_def456",
1233-
"listener_id": "p_def456",
1234-
"event_name": ""
1235-
}
1236-
]
1237-
}
1238-
```
1239-
1240-
### Get Current User's Webhooks
1241-
1242-
Retrieve all the [webhooks](#webhooks) configured for the authenticated user.
1243-
1244-
#### Endpoint
1245-
1246-
```
1247-
GET /users/me/webhooks
1248-
```
1249-
1250-
#### Parameters
1251-
1252-
_No parameters_
1253-
1254-
#### Example Request
1255-
1256-
```shell
1257-
curl 'https://api.pipedream.com/v1/users/me/webhooks' \
1258-
-H 'Authorization: Bearer <token>'
1259-
```
1260-
1261-
#### Example Response
1262-
1263-
```json
1264-
{
1265-
"page_info": {
1266-
"total_count": 2,
1267-
"count": 2,
1268-
"start_cursor": "d2hfMjlsdUd6",
1269-
"end_cursor": "d2hfb3dHdWVv"
1270-
},
1271-
"data": [
1272-
{
1273-
"id": "wh_abc123",
1274-
"name": null,
1275-
"description": null,
1276-
"url": "https://endpoint.m.pipedream.net",
1277-
"active": true,
1278-
"created_at": 1611964025,
1279-
"updated_at": 1611964025
1280-
},
1281-
{
1282-
"id": "wh_def456",
1283-
"name": "Test webhook",
1284-
"description": "just a test",
1285-
"url": "https://endpoint2.m.pipedream.net",
1286-
"active": true,
1287-
"created_at": 1605835136,
1288-
"updated_at": 1605835136
1289-
}
1290-
]
1291-
}
1292-
```
1293-
12941201
## Webhooks
12951202

12961203
Pipedream supports webhooks as a way to deliver events to a endpoint you own.
@@ -1946,7 +1853,7 @@ Programmatically view your workspace's current credit usage for the billing peri
19461853
#### Endpoint
19471854

19481855
```
1949-
GET /v1/workspaces/<workspace_id>
1856+
GET /v1/workspaces/<org_id>
19501857
```
19511858

19521859
#### Path Parameters
@@ -1977,12 +1884,12 @@ Retrieve all the connected accounts for a specific workspace.
19771884
#### Endpoint
19781885

19791886
```
1980-
GET /workspaces/<workspace_id>/accounts
1887+
GET /workspaces/<org_id>/accounts
19811888
```
19821889

19831890
#### Path Parameters
19841891

1985-
`workspace_id` **string**
1892+
`org_id` **string**
19861893

19871894
[Switch to your workspace's context](/workspaces/#switching-between-workspaces) and [find your org's ID](/workspaces/#finding-your-workspace-s-id).
19881895

@@ -2025,7 +1932,7 @@ Retrieve all the [subscriptions](#subscriptions) configured for a specific works
20251932
#### Endpoint
20261933

20271934
```
2028-
GET /workspaces/<workspace_id>/subscriptions
1935+
GET /workspaces/<org_id>/subscriptions
20291936
```
20301937

20311938
#### Path Parameters
@@ -2069,7 +1976,7 @@ Retrieve all the [event sources](#sources) configured for a specific workspace.
20691976
#### Endpoint
20701977

20711978
```
2072-
GET /orgs/<workspace_id>/sources
1979+
GET /orgs/<org_id>/sources
20731980
```
20741981

20751982
#### Path Parameters

0 commit comments

Comments
 (0)