Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

feat: cutover to use new BT-API-KEY header authentication #141

Merged
merged 4 commits into from
Jan 10, 2022
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
18 changes: 9 additions & 9 deletions source/includes/api-reference/_applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Your ability to authenticate to the API is granted by creating Applications, eac

```shell
curl "https://api.basistheory.com/applications" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
Expand Down Expand Up @@ -137,7 +137,7 @@ Returns an [Application](#applications-application-object) if the application wa

```shell
curl "https://api.basistheory.com/applications" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down Expand Up @@ -218,7 +218,7 @@ Returns a [paginated object](#pagination) with the `data` property containing an

```shell
curl "https://api.basistheory.com/applications/fe1f9ba4-474e-44b9-b949-110cdba9d662" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down Expand Up @@ -290,7 +290,7 @@ Returns an [Application](#applications-application-object) with the `id` provide

```shell
curl "https://api.basistheory.com/applications/key" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down Expand Up @@ -337,7 +337,7 @@ var application = await client.GetByKeyAsync();
`https://api.basistheory.com/applications/key`
</span>

Get an application by key in the Tenant. Will use the `X-API-KEY` header to lookup the application.
Get an application by key in the Tenant. Will use the `BT-API-KEY` header to lookup the application.

### Permissions

Expand All @@ -347,7 +347,7 @@ Get an application by key in the Tenant. Will use the `X-API-KEY` header to look

### Response

Returns an [Application](#applications-application-object) for the provided `X-API-KEY`. Returns [an error](#errors) if the application could not be retrieved.
Returns an [Application](#applications-application-object) for the provided `BT-API-KEY`. Returns [an error](#errors) if the application could not be retrieved.


## Update Application
Expand All @@ -356,7 +356,7 @@ Returns an [Application](#applications-application-object) for the provided `X-A

```shell
curl "https://api.basistheory.com/applications/fb124bba-f90d-45f0-9a59-5edca27b3b4a" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "Content-Type: application/json"
-X "PUT" \
-d '{
Expand Down Expand Up @@ -462,7 +462,7 @@ Returns an [Application](#applications-application-object) if the application wa

```shell
curl "https://api.basistheory.com/applications/fb124bba-f90d-45f0-9a59-5edca27b3b4a/regenerate" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-X "POST"
```

Expand Down Expand Up @@ -542,7 +542,7 @@ Returns an [Application](#applications-application-object) with the new `key` pr

```shell
curl "https://api.basistheory.com/applications/fb124bba-f90d-45f0-9a59-5edca27b3b4a" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-X "DELETE"
```

Expand Down
14 changes: 7 additions & 7 deletions source/includes/api-reference/_atomic_banks.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

```shell
curl "https://api.basistheory.com/atomic/banks" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
Expand Down Expand Up @@ -130,7 +130,7 @@ Returns an [Atomic Bank](#atomic-banks-atomic-bank-object) with masked [bank dat

```shell
curl "https://api.basistheory.com/atomic/banks" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down Expand Up @@ -207,7 +207,7 @@ Returns [an error](#errors) if Atomic Banks could not be retrieved.

```shell
curl "https://api.basistheory.com/atomic/banks/1485efb9-6b1f-4248-a5d1-cf9b3907164c" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```csharp
Expand Down Expand Up @@ -283,7 +283,7 @@ Returns [an error](#errors) if the Atomic Bank could not be retrieved.

```shell
curl "https://api.basistheory.com/atomic/banks/1485efb9-6b1f-4248-a5d1-cf9b3907164c" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "Content-Type: application/json" \
-X "PATCH" \
-d '{
Expand Down Expand Up @@ -376,7 +376,7 @@ Returns an [Atomic Bank](#atomic-banks-atomic-bank-object) with masked [bank dat

```shell
curl "https://api.basistheory.com/atomic/banks/1485efb9-6b1f-4248-a5d1-cf9b3907164c" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-X "DELETE"
```

Expand Down Expand Up @@ -438,7 +438,7 @@ Returns [an error](#errors) if the Atomic Bank failed to delete.

```shell
curl "https://api.basistheory.com/atomic/banks/1485efb9-6b1f-4248-a5d1-cf9b3907164c/decrypt" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down Expand Up @@ -514,7 +514,7 @@ Returns an [Atomic Bank](#atomic-banks-atomic-bank-object) with plaintext [bank]

```shell
curl "https://api.basistheory.com/atomic/banks/1485efb9-6b1f-4248-a5d1-cf9b3907164c/react" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-X "POST" \
-d '{
"reactor_id": "5b493235-6917-4307-906a-2cd6f1a90b13",
Expand Down
12 changes: 6 additions & 6 deletions source/includes/api-reference/_atomic_cards.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

```shell
curl "https://api.basistheory.com/atomic/cards" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
Expand Down Expand Up @@ -141,7 +141,7 @@ Returns an [Atomic Card](#atomic-cards-atomic-card-object) with masked [card dat

```shell
curl "https://api.basistheory.com/atomic/cards" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down Expand Up @@ -216,7 +216,7 @@ Returns a [paginated object](#pagination) with the `data` property containing an

```shell
curl "https://api.basistheory.com/atomic/cards/c1e565009-1984-4638-8fca-dce8a82cc2af" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down Expand Up @@ -290,7 +290,7 @@ Returns an [Atomic Card](#atomic-cards-atomic-card-object) with the `id` provide

```shell
curl "https://api.basistheory.com/atomic/cards/c1e565009-1984-4638-8fca-dce8a82cc2af" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "Content-Type: application/json" \
-X "PATCH" \
-d '{
Expand Down Expand Up @@ -390,7 +390,7 @@ Returns an [Atomic Card](#atomic-cards-atomic-card-object) with masked [card dat

```shell
curl "https://api.basistheory.com/atomic/cards/c1e565009-1984-4638-8fca-dce8a82cc2af" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-X "DELETE"
```

Expand Down Expand Up @@ -448,7 +448,7 @@ Returns [an error](#errors) if the Atomic Card failed to delete.

```shell
curl "https://api.basistheory.com/atomic/cards/c1e565009-1984-4638-8fca-dce8a82cc2af/react" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-X "POST" \
-d '{
"reactor_id": "5b493235-6917-4307-906a-2cd6f1a90b13",
Expand Down
4 changes: 2 additions & 2 deletions source/includes/api-reference/_authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```shell
curl "https://api.basistheory.com" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down Expand Up @@ -51,7 +51,7 @@ Basis Theory uses API keys to allow access to the API.

Basis Theory requires the API key to be included in all API requests to the server in a header that looks like the following:

`X-API-KEY: key_N88mVGsp3sCXkykyN2EFED`
`BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED`

<aside class="notice">
<span>You must replace <code>key_N88mVGsp3sCXkykyN2EFED</code> with your API key supplied when you <a href="#applications-create-application">created an Application</a>.</span>
Expand Down
8 changes: 4 additions & 4 deletions source/includes/api-reference/_correlation_id.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

```shell
curl "https://api.basistheory.com" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "bt-trace-id: aa5d3379-6385-4ef4-9fdb-ca1341572153"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-TRACE-ID: aa5d3379-6385-4ef4-9fdb-ca1341572153"
```

```javascript
Expand Down Expand Up @@ -42,6 +42,6 @@ client.list(request_options=basistheory.RequestOptions(correlation_id="aa5d3379-

Basis Theory utilizes Correlation IDs to assist with request tracing, logging, and debugging.

All API endpoints accept a client-provided Correlation ID if sent with the `bt-trace-id` HTTP header within POST, PUT, PATCH, DELETE methods.
All API endpoints accept a client-provided Correlation ID if sent with the `BT-TRACE-ID` HTTP header within POST, PUT, PATCH, DELETE methods.

If a `bt-trace-id` Correlation ID is not provided by the client, a new Correlation ID will be generated by the Basis Theory API.
If a `BT-TRACE-ID` Correlation ID is not provided by the client, a new Correlation ID will be generated by the Basis Theory API.
1 change: 1 addition & 0 deletions source/includes/api-reference/_deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ The following table lists deprecated features and their respective shutdown date

| Feature | Deprecated | Shutdown Date | Details |
|----------------------------------------------|-----------------|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `X-API-KEY` has been replaced with `BT-API-KEY` | January 9, 2022 | March 9, 2022 | In order to prevent potential conflicts with the `X-API-KEY` header while using the [Proxy](#proxy) feature, the authentication header for the Basis Theory API has been replaced with `BT-API-KEY`. |
| `token:*`, `bank:*` and `card:*` permissions | January 3, 2022 | January 3, 2022 | The following permissions have been removed as of January 3, 2022 (see table for removed permissions and their replacement). New token permissions provide more granular access control based on [Data Classification](#tokens-token-classifications) and [Impact Level](#tokens-token-impact-levels). For more information, see [Token Permissions](#permissions-permission-types-token-permissions). <table><thead><tr><th>Legacy Permission</th><th>Migrated To</th></tr></thead><tbody><tr><td>`token:create`</td><td>`token:general:create`</td></tr><tr><td>`token:read`</td><td>`token:general:read:low`</td></tr><tr><td>`token:decrypt`</td><td>`token:general:read:high`</td></tr><tr><td>`token:update`</td><td>`token:general:update`</td></tr><tr><td>`token:delete`</td><td>`token:general:delete`</td></tr><tr><td>`token:use`</td><td>`token:general:use:proxy`</td></tr><tr><td>`bank:create`</td><td>`token:bank:create`</td></tr><tr><td>`bank:read`</td><td>`token:bank:read:low`</td></tr><tr><td>`bank:decrypt`</td><td>`token:bank:read:high`</td></tr><tr><td>`bank:update`</td><td>`token:bank:update`</td></tr><tr><td>`bank:delete`</td><td>`token:bank:delete`</td></tr><tr><td>`bank:use`</td><td>`token:bank:use:proxy`</td></tr><tr><td>`card:create`</td><td>`token:pci:create`</td></tr><tr><td>`card:read`</td><td>`token:pci:read:low`</td></tr><tr><td>`card:update`</td><td>`token:pci:update`</td></tr><tr><td>`card:delete`</td><td>`token:pci:delete`</td></tr><tr><td>`card:use`</td><td>`token:pci:use:proxy`</td></tr></tbody></table> |
4 changes: 2 additions & 2 deletions source/includes/api-reference/_errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ Attribute | Type | Description
Error Code | Meaning
---------- | -------
`400` | Invalid request body
`401` | A missing or invalid `X-API-KEY` was provided
`403` | The provided `X-API-KEY` does not have the required permissions
`401` | A missing or invalid `BT-API-KEY` was provided
`403` | The provided `BT-API-KEY` does not have the required permissions
`404` | Request entity was not found
`422` | Request does not satisfy requirements for processing
`429` | Request has been [rate limited](#limits)
Expand Down
2 changes: 1 addition & 1 deletion source/includes/api-reference/_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Attribute | Type | Description

```shell
curl "https://api.basistheory.com/logs" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down
2 changes: 1 addition & 1 deletion source/includes/api-reference/_pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```shell
curl "https://api.basistheory.com/applications?page=2&size=10" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down
2 changes: 1 addition & 1 deletion source/includes/api-reference/_permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ All Token permissions follow the form of `token:<classification>:<operation>:<sc

```shell
curl "https://api.basistheory.com/permissions" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down
4 changes: 2 additions & 2 deletions source/includes/api-reference/_proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Basis Theory token identifiers included in the request will be replaced with the

```shell
curl "https://api.basistheory.com/proxy" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-PROXY-URL: https://example.com/api" \
-X "POST" \
-d '{
Expand Down Expand Up @@ -63,7 +63,7 @@ Proxy a request to a third party API.

**Authentication**

Proxy requests must be authenticated using an `X-API-KEY` header (see [Authentication](#authentication)).
Proxy requests must be authenticated using an `BT-API-KEY` header (see [Authentication](#authentication)).

**Permissions**

Expand Down
10 changes: 5 additions & 5 deletions source/includes/api-reference/_reactor_formulas.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Type | Description

```shell
curl "https://api.basistheory.com/reactor-formulas" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
Expand Down Expand Up @@ -286,7 +286,7 @@ Returns an [Reactor Formula](#reactor-formulas-reactor-formula-object) if the Re

```shell
curl "https://api.basistheory.com/reactor-formulas" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down Expand Up @@ -398,7 +398,7 @@ Returns a [paginated object](#pagination) with the `data` property containing an

```shell
curl "https://api.basistheory.com/reactor-formulas/17069df1-80f4-439e-86a7-4121863e4678" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down Expand Up @@ -502,7 +502,7 @@ Returns an [Reactor Formula](#reactor-formulas-reactor-formula-object) with the

```shell
curl "https://api.basistheory.com/reator-formula/17069df1-80f4-439e-86a7-4121863e4678" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "Content-Type: application/json" \
-X "PUT" \
-d '{
Expand Down Expand Up @@ -729,7 +729,7 @@ Returns an [Reactor Formula](#reactor-formulas-reactor-formula-object) if the Re

```shell
curl "https://api.basistheory.com/reactor-formulas/17069df1-80f4-439e-86a7-4121863e4678" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-X "DELETE"
```

Expand Down
10 changes: 5 additions & 5 deletions source/includes/api-reference/_reactors.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Attribute | Type | Description

```shell
curl "https://api.basistheory.com/reactors" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
Expand Down Expand Up @@ -120,7 +120,7 @@ Returns an [reactor](#reactors-reactor-object) if the Reactor was created. Retur

```shell
curl "https://api.basistheory.com/reactors" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down Expand Up @@ -200,7 +200,7 @@ Returns a [paginated object](#pagination) with the `data` property containing an

```shell
curl "https://api.basistheory.com/reactors/5b493235-6917-4307-906a-2cd6f1a90b13" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED"
```

```javascript
Expand Down Expand Up @@ -271,7 +271,7 @@ Returns an [reactor](#reactors-reactor-object) with the `id` provided. Returns [

```shell
curl "https://api.basistheory.com/reactors/5b493235-6917-4307-906a-2cd6f1a90b13" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "Content-Type: application/json" \
-X "PUT" \
-d '{
Expand Down Expand Up @@ -369,7 +369,7 @@ Returns an [reactor](#reactors-reactor-object) if the Reactor was updated. Retur

```shell
curl "https://api.basistheory.com/reactors/fb124bba-f90d-45f0-9a59-5edca27b3b4a" \
-H "X-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-H "BT-API-KEY: key_N88mVGsp3sCXkykyN2EFED" \
-X "DELETE"
```

Expand Down
Loading