How To Setup API
How To Setup API
PDF Services API endpoints are authenticated endpoints. Getting an access token is a two-
step process :
Rest API
Copy
1curl --location 'https://pdf-services.adobe.io/token' \
2--header 'Content-Type: application/x-www-form-urlencoded' \
3--data-urlencode 'client_id={{Placeholder for Client ID}}' \
4--data-urlencode 'client_secret={{Placeholder for Client Secret}}'
After getting the access token, we need to upload the asset. Uploading an asset is a two-
step process :
1. First you need to get an upload pre-signed URI by using the following API.
2. On getting a 200 response status from the above API, use the uploadUri field in the
response body of the above API to upload the asset directly to the cloud provider
using a PUT API call. You will also get an assetID field which will be used in creating
the job.
Rest API
Copy
1curl --location -g --request PUT 'https://dcplatformstorageservice-prod-us-east-
1.s3-accelerate.amazonaws.com/b37fd583-1ab6-4f49-99ef-d716180b5de4?X-Amz-Security-
Token={{Placeholder for X-Amz-Security-Token}}&X-Amz-Algorithm={{Placeholder for
X-Amz-Algorithm}}&X-Amz-Date={{Placeholder for X-Amz-Date}}&X-Amz-
SignedHeaders={{Placeholder for X-Amz-SignedHeaders}}&X-Amz-Expires={{Placeholder
for X-Amz-Expires}}&X-Amz-Credential={{Placeholder for X-Amz-Credential}}&X-Amz-
Signature={{Placeholder for X-Amz-Signature}}' \
2--header 'Content-Type: application/pdf' \
3--data-binary '@{{Placeholder for file path}}'
To create a job for the operation, please use the assetID obtained in Step 2 in the API
request body. On successful job submission you will get a status code of 201 and a
response header location which will be used for polling.
For creating the job, please refer to the corresponding API spec for the particular PDF
Operation.
Once the job is successfully created, you need to poll the at the location returned in
response header of Step 3 by using the following API
On getting 200 response code from the poll API, you will receive a status field in the response
body which can either be in progress, done or failed.
If the status field is in progress you need to keep polling the location until it changes
to done or failed.
If the status field is done the response body will also have a download pre-signed URI in
the dowloadUri field, which will be used to download the asset directly from cloud provider
by making the following API call