Skip to content

Commit ed619a2

Browse files
Merge pull request #871 from AdobeDocs/develop
Security doc and asset expiry updates (#865)
2 parents 2fb583f + 4a0b652 commit ed619a2

File tree

7 files changed

+294
-8
lines changed

7 files changed

+294
-8
lines changed

gatsby-config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ module.exports = {
201201
title: 'Webhook Notification for APIs',
202202
path: 'overview/pdf-services-api/howtos/webhook-notification.md'
203203
},
204+
{
205+
title: 'SDK Utilities',
206+
path: 'overview/pdf-services-api/howtos/sdk-utilities.md'
207+
},
204208
{
205209
title: 'Create PDF',
206210
path: 'overview/pdf-services-api/howtos/create-pdf.md'
41.8 KB
Loading
77.4 KB
Loading
41.6 KB
Loading
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: SDK Utilities | How Tos | PDF Services API | Adobe PDF Services
3+
---
4+
5+
# SDK Utilities
6+
7+
This page covers various utilities provided by the Adobe PDF Services SDKs, including operations such as refreshing
8+
download URIs, deleting assets, and streamline your workflows.
9+
10+
## Important Note on Expiry
11+
12+
- Asset Expiry : Assets uploaded to Adobe internal storage are transiently stored for 24 hours.
13+
14+
- Pre-signed URI Expiry : The pre-signed URI provided for uploading or downloading the content has an expiry of 1 hour.
15+
16+
See our public API Reference for assets [here](../../../apis/#tag/Assets).
17+
18+
## Refresh Download URI
19+
20+
This function will create a new download URI for your asset. This is useful for scenarios where the asset needs to be
21+
downloaded after its URI has expired.
22+
23+
<CodeBlock slots="heading, code" repeat="3" languages="Java, Node.js, Python" />
24+
25+
### Java
26+
27+
```javascript
28+
CreatePDFResult result = pdfServicesResponse.getResult();
29+
Asset asset = result.getAsset();
30+
31+
// refresh the download URI in case it expires or is null for the uploaded asset
32+
Asset refreshedAsset = pdfServices.refreshDownloadURI(asset);
33+
```
34+
35+
### Node.js
36+
37+
```javascript
38+
const result = pdfServicesResponse.result;
39+
const asset = result.asset;
40+
41+
// refresh the download URI in case it expires or is null for the uploaded asset
42+
const refreshedAsset = await pdfServices.refreshDownloadURI({asset});
43+
```
44+
45+
### Python
46+
47+
```python
48+
result = pdf_services_response.getResult()
49+
asset = result.getAsset()
50+
51+
# refresh the download URI in case it expires or is null for the uploaded asset
52+
refreshed_asset = pdf_services.refreshDownloadURI(asset);
53+
```
54+
55+
## Delete Asset
56+
57+
This function deletes an asset from Adobe internal storage. If you prefer not to store your asset on Adobe's storage,
58+
where assets are transiently stored for 24 hours, you can use this function to delete the asset immediately.
59+
60+
<CodeBlock slots="heading, code" repeat="3" languages="Java, Node.js, Python" />
61+
62+
### Java
63+
64+
```javascript
65+
CreatePDFResult result = pdfServicesResponse.getResult();
66+
Asset asset = result.getAsset();
67+
68+
// delete asset
69+
pdfServices.deleteAsset(asset);
70+
```
71+
72+
### Node.js
73+
74+
```javascript
75+
const result = pdfServicesResponse.result;
76+
const asset = result.asset;
77+
78+
// delete asset
79+
await pdfServices.deleteAsset({asset});
80+
```
81+
82+
### Python
83+
84+
```python
85+
create_pdf_result = pdf_services_response.getResult()
86+
output_asset = create_pdf_result.getAsset()
87+
88+
# delete asset
89+
pdf_services.deleteAsset(output_asset);
90+
```

src/pages/overview/security.md

Lines changed: 197 additions & 5 deletions
Large diffs are not rendered by default.

src/pages/resources/openapi.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
{
2222
"name": "Assets",
23-
"description": "Upload and download assets to Adobe internal storage. <br> Uploading and downloading of assets is not required when using a custom <a href = \"https://developer.adobe.com/document-services/docs/overview/pdf-services-api/howtos/pdf-external-storage-sol\">external storage solution</a> with signed URLs."
23+
"description": "Upload and download assets to Adobe internal storage. <br> Uploading and downloading of assets is not required when using a custom <a href = \"https://developer.adobe.com/document-services/docs/overview/pdf-services-api/howtos/pdf-external-storage-sol\">external storage solution</a> with signed URLs. <div><small><b>Note:</b> Assets uploaded to Adobe internal storage are transiently stored for 24 hours.</small></div>"
2424
},
2525
{
2626
"name": "Create PDF",
@@ -330,7 +330,7 @@
330330
"Assets"
331331
],
332332
"summary": "Get upload pre-signed URI. ",
333-
"description": "Get the pre-signed URI to directly upload the content to the adobe's internal cloud provider. \n\nOutput: Response will have the asset URI of created asset and pre-signed URI for uploading the content.",
333+
"description": "Get the pre-signed URI to directly upload the content to the adobe's internal cloud provider. \n\nOutput: Response will have the asset URI of created asset and pre-signed URI for uploading the content.<div><small><b>Note:</b> The pre-signed URI provided for uploading or downloading the content has an expiry of 1 hour.</small></div>",
334334
"operationId": "asset.uploadpresignedurl",
335335
"parameters": [
336336
{
@@ -487,7 +487,7 @@
487487
"Assets"
488488
],
489489
"summary": "Get download pre-signed URI.",
490-
"description": "Get the pre-signed URI to fetch the content directly from the cloud provider.",
490+
"description": "Get the pre-signed URI to fetch the content directly from the cloud provider.<div><small><b>Note:</b> The pre-signed URI provided for uploading or downloading the content has an expiry of 1 hour.</small></div>",
491491
"operationId": "asset.get",
492492
"parameters": [
493493
{

0 commit comments

Comments
 (0)