generated from AdobeDocs/dev-site-documentation-template
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* updated security related docs * added docs for SDK utilities Co-authored-by: mahour <[email protected]> Co-authored-by: parasn <[email protected]>
- Loading branch information
1 parent
56087de
commit 4a0b652
Showing
8 changed files
with
295 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: Adobe PDF Services Open API spec | ||
description: The OpenAPI spec for Adobe PDF Services API endpoints, parameters, and responses. | ||
openAPISpec: https://raw.githubusercontent.com/AdobeDocs/pdfservices-api-documentation/develop/src/pages/resources/openapi.json | ||
openAPISpec: https://raw.githubusercontent.com/AdobeDocs/pdfservices-api-documentation/main/src/pages/resources/openapi.json | ||
--- |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions
90
src/pages/overview/pdf-services-api/howtos/sdk-utilities.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
title: SDK Utilities | How Tos | PDF Services API | Adobe PDF Services | ||
--- | ||
|
||
# SDK Utilities | ||
|
||
This page covers various utilities provided by the Adobe PDF Services SDKs, including operations such as refreshing | ||
download URIs, deleting assets, and streamline your workflows. | ||
|
||
## Important Note on Expiry | ||
|
||
- Asset Expiry : Assets uploaded to Adobe internal storage are transiently stored for 24 hours. | ||
|
||
- Pre-signed URI Expiry : The pre-signed URI provided for uploading or downloading the content has an expiry of 1 hour. | ||
|
||
See our public API Reference for assets [here](../../../apis/#tag/Assets). | ||
|
||
## Refresh Download URI | ||
|
||
This function will create a new download URI for your asset. This is useful for scenarios where the asset needs to be | ||
downloaded after its URI has expired. | ||
|
||
<CodeBlock slots="heading, code" repeat="3" languages="Java, Node.js, Python" /> | ||
|
||
### Java | ||
|
||
```javascript | ||
CreatePDFResult result = pdfServicesResponse.getResult(); | ||
Asset asset = result.getAsset(); | ||
|
||
// refresh the download URI in case it expires or is null for the uploaded asset | ||
Asset refreshedAsset = pdfServices.refreshDownloadURI(asset); | ||
``` | ||
|
||
### Node.js | ||
|
||
```javascript | ||
const result = pdfServicesResponse.result; | ||
const asset = result.asset; | ||
|
||
// refresh the download URI in case it expires or is null for the uploaded asset | ||
const refreshedAsset = await pdfServices.refreshDownloadURI({asset}); | ||
``` | ||
|
||
### Python | ||
|
||
```python | ||
result = pdf_services_response.getResult() | ||
asset = result.getAsset() | ||
|
||
# refresh the download URI in case it expires or is null for the uploaded asset | ||
refreshed_asset = pdf_services.refreshDownloadURI(asset); | ||
``` | ||
|
||
## Delete Asset | ||
|
||
This function deletes an asset from Adobe internal storage. If you prefer not to store your asset on Adobe's storage, | ||
where assets are transiently stored for 24 hours, you can use this function to delete the asset immediately. | ||
|
||
<CodeBlock slots="heading, code" repeat="3" languages="Java, Node.js, Python" /> | ||
|
||
### Java | ||
|
||
```javascript | ||
CreatePDFResult result = pdfServicesResponse.getResult(); | ||
Asset asset = result.getAsset(); | ||
|
||
// delete asset | ||
pdfServices.deleteAsset(asset); | ||
``` | ||
|
||
### Node.js | ||
|
||
```javascript | ||
const result = pdfServicesResponse.result; | ||
const asset = result.asset; | ||
|
||
// delete asset | ||
await pdfServices.deleteAsset({asset}); | ||
``` | ||
|
||
### Python | ||
|
||
```python | ||
create_pdf_result = pdf_services_response.getResult() | ||
output_asset = create_pdf_result.getAsset() | ||
|
||
# delete asset | ||
pdf_services.deleteAsset(output_asset); | ||
``` |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters