Skip to content

Commit

Permalink
Security doc updates (#865)
Browse files Browse the repository at this point in the history
* updated security related docs
* added docs for SDK utilities

Co-authored-by: mahour <[email protected]>
Co-authored-by: parasn <[email protected]>
  • Loading branch information
3 people authored Jun 3, 2024
1 parent 56087de commit 4a0b652
Show file tree
Hide file tree
Showing 8 changed files with 295 additions and 9 deletions.
4 changes: 4 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ module.exports = {
title: 'Webhook Notification for APIs',
path: 'overview/pdf-services-api/howtos/webhook-notification.md'
},
{
title: 'SDK Utilities',
path: 'overview/pdf-services-api/howtos/sdk-utilities.md'
},
{
title: 'Create PDF',
path: 'overview/pdf-services-api/howtos/create-pdf.md'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/apis/index.md
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
---
Binary file added src/pages/overview/images/copy-not-allowed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/pages/overview/images/data-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/pages/overview/images/no-permission.png
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 src/pages/overview/pdf-services-api/howtos/sdk-utilities.md
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);
```
202 changes: 197 additions & 5 deletions src/pages/overview/security.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/pages/resources/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
{
"name": "Assets",
"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."
"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>"
},
{
"name": "Create PDF",
Expand Down Expand Up @@ -330,7 +330,7 @@
"Assets"
],
"summary": "Get upload pre-signed URI. ",
"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.",
"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>",
"operationId": "asset.uploadpresignedurl",
"parameters": [
{
Expand Down Expand Up @@ -487,7 +487,7 @@
"Assets"
],
"summary": "Get download pre-signed URI.",
"description": "Get the pre-signed URI to fetch the content directly from the cloud provider.",
"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>",
"operationId": "asset.get",
"parameters": [
{
Expand Down

0 comments on commit 4a0b652

Please sign in to comment.