2024-06-05 12:19:46 +02:00
|
|
|
---
|
|
|
|
sidebar_position: 2
|
|
|
|
---
|
|
|
|
|
|
|
|
# Unpublish folder
|
|
|
|
Cancels the public access mode for the directory
|
|
|
|
|
|
|
|
|
|
|
|
*Function CancelFolderPublication(Val Token, Val FolderID) Export*
|
|
|
|
|
|
|
|
| Parameter | CLI option | Type | Destination |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Token | --token | String | Token |
|
|
|
|
| FolderID | --folder | String | ID of the public catalog (shared folder ID) |
|
|
|
|
|
|
|
|
|
|
|
|
Returns: Key-Value Pair - serialized JSON response from Dropbox
|
|
|
|
|
|
|
|
```bsl title="Code example"
|
|
|
|
|
|
|
|
Token = "sl.B2ieEHcB9I9BTwJFjbf_MQtoZMKjGYgkpBqzQkvBfuSz41Qpy5r3d7a4ax22I5ILWhd9KLbN5L...";
|
|
|
|
Folder = "5022319569";
|
|
|
|
|
|
|
|
Result = OPI_Dropbox.CancelFolderPublication(Token, Folder);
|
|
|
|
CurrentStatus = "in_progress";
|
|
|
|
JobID = Result["async_job_id"];
|
|
|
|
|
|
|
|
WHile CurrentStatus = "in_progress" Do
|
|
|
|
Result = OPI_Dropbox.GetAsynchronousChangeStatus(Token, JobID);
|
|
|
|
CurrentStatus = Result[".tag"];
|
|
|
|
OPI_Tools.Pause(3);
|
|
|
|
EndDo;
|
2024-06-05 12:35:05 +02:00
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```sh title="CLI command example"
|
|
|
|
|
|
|
|
oint dropbox CancelFolderPublication --token "sl.B2ieEHcB9I9BTwJFjbf_MQtoZMKjGYgkpBqzQkvBfuSz41Qpy5r3d7a4ax22I5ILWhd9KLbN5L..." --folder %folder%
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
```json title="Result"
|
|
|
|
|
|
|
|
{
|
|
|
|
".tag": "complete"
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|