From ee6100a89dfae4ce974ffaaa896e53088679ddd7 Mon Sep 17 00:00:00 2001 From: Yuriy Tolstykh Date: Thu, 8 Aug 2024 14:43:56 -0700 Subject: [PATCH 1/2] adding auth to warehouse connectors --- .../authentication.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 reference/Warehouse Connectors API/authentication.md diff --git a/reference/Warehouse Connectors API/authentication.md b/reference/Warehouse Connectors API/authentication.md new file mode 100644 index 0000000000..cbb0703777 --- /dev/null +++ b/reference/Warehouse Connectors API/authentication.md @@ -0,0 +1,28 @@ +--- +title: "Authentication" +slug: "warehouse-connectors-api-authentication" +hidden: false +createdAt: "2024-08-08T19:31:43.295Z" +updatedAt: "2024-08-08T19:31:43.295Z" +categorySlug: "warehouse-connectors-api" +--- + +A [service account](https://developer.mixpanel.com/reference/service-accounts) is necessary to authenticate Warehouse Connectors API requests. Once you have created a service account and obtained your user name and secret, you can make a request to trigger a warehouse import. + +```bash cURL Basic Auth +curl -X PUT https://mixpanel.com/api/app/projects//warehouse-sources/imports//manual-sync \ + --user ":" +``` + +```shell cURL Header +curl -X PUT https://mixpanel.com/api/app/projects//warehouse-sources/imports//manual-sync \ + --header 'authorization: Basic :' +``` + +```python Python Requests +import requests +requests.put( + 'https://mixpanel.com/api/app/projects//warehouse-sources/imports/', + auth=('', ''), +) +``` From 910f72dde01e5452b17ad7b77ad1372857a59d29 Mon Sep 17 00:00:00 2001 From: Yuriy Tolstykh Date: Thu, 8 Aug 2024 15:31:30 -0700 Subject: [PATCH 2/2] removing blank lines --- reference/Warehouse Connectors API/authentication.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/reference/Warehouse Connectors API/authentication.md b/reference/Warehouse Connectors API/authentication.md index cbb0703777..4546094820 100644 --- a/reference/Warehouse Connectors API/authentication.md +++ b/reference/Warehouse Connectors API/authentication.md @@ -13,12 +13,10 @@ A [service account](https://developer.mixpanel.com/reference/service-accounts) i curl -X PUT https://mixpanel.com/api/app/projects//warehouse-sources/imports//manual-sync \ --user ":" ``` - ```shell cURL Header curl -X PUT https://mixpanel.com/api/app/projects//warehouse-sources/imports//manual-sync \ --header 'authorization: Basic :' ``` - ```python Python Requests import requests requests.put(