---
title: Replace All Passes
slug: jetstream-v2/replace-all-passes
docTags: 
createdAt: 2024-01-23T15:32:41.497Z
---

## About

Overwrite the access control list of the specified device with a new set of passes.

| **Command Type**       | **Device is Online**                                         | **Device is Offline**               |
| ---------------------- | ------------------------------------------------------------ | ----------------------------------- |
| Synchronous, Queueable | Immediate execution, Immediate results and published results | Queued execution, Published results |

## Parameters

| **Property**                                                         | **Location** | **Details**                                                                                                                                                                     |
| -------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **AccessKey**<br />:::BlockQuote
string&#xA;Required&#xA;Unique
:::  | Header       | The access key for your user account.<br />This value is a 36-character GUID provided during [user account sign up](https://jetstreamrfid.com/login/signup).                    |
| **DeviceName**<br />:::BlockQuote
string&#xA;Required&#xA;Unique
::: | URL          | The name of the device.<br />This value has a max length of 128 ASCII characters.<br />This value must adhere to this regular expression: ^\[a-zA-Z0-9-\_]\*$                   |
| **Passes**<br />:::BlockQuote
array(strings)&#xA;Required
:::        | Body         | The pass(es) to add to the access control list of the device.<br />Each value must adhere to this regular expression: ^\[A-F0-9]\{10}$<br />At least one value must be defined. |

## Example

### Request URL

**PUT** https\://api.jetstreamrfid.com/2/devices/\{Device Name}/accesscontrol

### Request Body

:::BlockQuote
\{
&#x9;"Passes": \["MyPassNumber1", "MyPassNumber2"]
}
:::

### Response Code

200 OK

### Response Body

:::BlockQuote
\{
&#x9;"CommandId": "d68d6a29-e8a1-48df-b44a-4365b8c2442c",
&#x9;"Status": "Completed",
&#x9;"ExceptionList": \[],
&#x9;"OutputParameterList": \[]
}
:::

### Published CommandQueuedEvent

:::BlockQuote
\{
&#x9;"Device": "MyDeviceName",
&#x9;"CommandId": "d68d6a29-e8a1-48df-b44a-4365b8c2442c",
&#x9;"CommandName": "UpdatePasses",
&#x9;"URI": "/2/Devices/MyDeviceName/AccessControl",
&#x9;"Verb": "Put",
&#x9;"User": "MyUserName",
&#x9;"Parameters": \[
&#x9;	\{
&#x9;		"Key": "Add",
&#x9;		"Value": "MyPassNumber1"
&#x9;	},
&#x9;	\{
&#x9;		"Key": "Add",
&#x9;		"Value": "MyPassNumber2"
&#x9;	},
&#x9;	\{
&#x9;		"Key": "Remove",
&#x9;		"Value": "\*"
&#x9;	}
&#x9;],
&#x9;"Type": "CommandQueuedEvent",
&#x9;"EventId": "b302b789-0fba-42bd-98c4-bc732401aff8",
&#x9;"EventTime": "2017-05-17T15:16:59Z"
}
:::

### Published CommandCompletionEvent

:::BlockQuote
\{
&#x9;"CommandId": "d68d6a29-e8a1-48df-b44a-4365b8c2442c",
&#x9;"CommandName": "UpdatePasses",
&#x9;"OutputParameterList": \[],
&#x9;"ExceptionList": \[],
&#x9;"Device": "MyDeviceName",
&#x9;"ReceivedTime": "2017-05-17T15:16:48Z",
&#x9;"Type": "CommandCompletionEvent",
&#x9;"EventId": "a15ea1a4-3e5e-47a3-bf91-03ea77416a98",
&#x9;"EventTime": "2017-05-17T15:17:08Z"
}
:::

## Version Changes

None – this is a new endpoint
