API Endpoints Reference

This is a list of all SlidePack HTTP API Endpoints.

Authentication

All endpoints require authentication. Include your API token in the request header to authenticate.

Example request with authentication

curl "https://slidepack.io/sessions" \
  -H "Authorization: Bearer {API_TOKEN}"

You can create your API token in your Dashboard.


POST/sessions

Create a Session

Creates a Session and provides AWS S3 Pre-Signed POST parameters that you will need to upload your zip file.

Response

Request

POST
/sessions
curl -X POST "https://slidepack.io/sessions" \
      -H 'Authorization: Bearer {API_TOKEN}'

Response

201
Created
{
  "session": {
    "uuid": "f0155f9f-d3f3-4fa9-9f8d-70f8fd2f9c36",
    "created_at": "2020-08-13T13:14:32.000000Z",
    "rendered_at": null,
    "render_succeeded": null,
    "render_slide_count": null,
    "render_message": null
  },
  "upload": {
    "action": "https://slidepack-api.s3.ap-northeast-1.amazonaws.com",
    "method": "POST",
    "enctype": "multipart/form-data",
    "params": {
      "acl": "private",
      "key": "sessions/zip/f0155f9f-d3f3-4fa9-9f8d-70f8fd2f9c36.zip",
      "Content-Type": "application/zip",
      "X-Amz-Security-Token": "***",
      "X-Amz-Credential": "***",
      "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
      "X-Amz-Date": "20200813T131432Z",
      "Policy": "***",
      "X-Amz-Signature": "***"
    }
  }
}

GET/sessions

List Sessions

Retrieves a list of Sessions.

Response

  • Name
    sessions
    Type
    object[]
    Required?
    No
    Description
    Array of Session object summary subsets.

Request

GET
/sessions
curl "https://slidepack.io/sessions" \
    -H 'Authorization: Bearer {API_TOKEN}'

Response

200
OK
{
  "sessions": [
    {
      "uuid": "805bcdc8-4782-4673-9d69-47f7ed0696c8",
      "created_at": "2020-08-13T15:10:15.000000Z",
      "rendered_at": "2020-08-13T15:10:20.000000Z",
      "render_succeeded": true,
    },
    {
      "uuid": "f0155f9f-d3f3-4fa9-9f8d-70f8fd2f9c36",
      "created_at": "2020-08-13T13:14:32.000000Z",
      "rendered_at": null,
      "render_succeeded": null,
    }
  ]
}

GET/sessions/{uuid}

Retrive a Session

Retrieves detailed information about a Session.

Response

Request

GET
/sessions/{uuid}
curl "https://slidepack.io/sessions/{uuid}" \
    -H 'Authorization: Bearer {API_TOKEN}'

Response

200
OK
{
  "session": {
    "uuid": "f0155f9f-d3f3-4fa9-9f8d-70f8fd2f9c36",
    "created_at": "2020-08-13T13:14:32.000000Z",
    "rendered_at": null,
    "render_succeeded": null,
    "render_slide_count": null,
    "render_message": null
  },
  "upload": {
    "action": "https://slidepack-api.s3.ap-northeast-1.amazonaws.com",
    "method": "POST",
    "enctype": "multipart/form-data",
    "params": {
      "acl": "private",
      "key": "sessions/zip/f0155f9f-d3f3-4fa9-9f8d-70f8fd2f9c36.zip",
      "Content-Type": "application/zip",
      "X-Amz-Security-Token": "***",
      "X-Amz-Credential": "***",
      "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
      "X-Amz-Date": "20200813T131432Z",
      "Policy": "***",
      "X-Amz-Signature": "***"
    }
  }
}

POSTvariable url

Upload zip file

Uploads a zip file for a Session to be used for rendering. The upload request goes directly to our private Amazon S3 bucket using pre-signed parameters.

The input zip file must contain at least two files:

  • template.pptx - The template PPTX file.
  • data.json - Data to populate the template with.

It may also contain images and videos to embed. The zip file can be named anything you like.

Construct a multipart/form-data request so that:

  • The URL is upload.action from POST /sessions.
  • All key-value pairs from upload.params from POST /sessions are included as parameters (form fields).
  • Append a file field at the end that points to your desired input file.

Response

204 No Content

Request

POST
Dynamic URL
curl -X POST "{URL}" \
  -F "{KEY}={VALUE}" \
  -F "{KEY}={VALUE}" \
     ...
  -F "file=@{ZIP_FILE_PATH}"

Response

204
No Content

POST/sessions/{uuid}/render

Render

Renders your session into an output pptx file and returns the download URL.

Replace {uuid} with your session uuid.

You need to have uploaded your input zip file for your session beforehand.

Response

  • Name
    session
    Type
    object
    Required?
    No
    Description
    The Session object.
  • Name
    download_url
    Type
    string
    Required?
    No
    Description
    Download URL for your rendered PPTX file.

Request

POST
/sessions/{uuid}/render
curl -X POST "https://slidepack.io/sessions/{uuid}/render" \
     -H 'Authorization: Bearer {API_TOKEN}'

Response

200
OK
{
  "session": {
    "uuid": "f0155f9f-d3f3-4fa9-9f8d-70f8fd2f9c36",
    "created_at": "2020-08-13T13:14:32.000000Z",
    "rendered_at": "2020-08-13T13:16:18.000000Z",
    "render_succeeded": true,
    "render_slide_count": 5,
    "render_message": null
  },
  "download_url": "https://slidepack-api.s3.ap-northeast-1.amazonaws.com/..."
}

POST/sessions/{uuid}/download_url

Re-issue download URL

Issues a fresh download URL for your rendered output file.

Replace {uuid} with your session uuid.

You need to have rendered your session beforehand.

Response

  • Name
    session
    Type
    object
    Required?
    No
    Description
    The Session object.
  • Name
    download_url
    Type
    string
    Required?
    No
    Description
    Download URL for your rendered PPTX file.

Request

POST
/sessions/{uuid}/download_url
curl -X POST "https://slidepack.io/sessions/{uuid}/download_url" \
     -H 'Authorization: Bearer {API_TOKEN}'

Response

200
OK
{
  "session": {
    "uuid": "f0155f9f-d3f3-4fa9-9f8d-70f8fd2f9c36",
    "created_at": "2020-08-13T13:14:32.000000Z",
    "rendered_at": "2020-08-13T13:16:18.000000Z",
    "render_succeeded": true,
    "render_slide_count": 5,
    "render_message": null
  },
  "download_url": "https://slidepack-api.s3.ap-northeast-1.amazonaws.com/..."
}

The Session object

  • Name
    uuid
    Type
    string
    Required?
    No
    Description
    Unique identifier for the object.
  • Name
    created_at
    Type
    string
    Required?
    No
    Description
    Creation timestamp.
  • Name
    rendered_at
    Type
    string or null
    Required?
    No
    Description
    Rendered timestamp.
    null if session has not been rendered yet.
  • Name
    render_succeeded
    Type
    boolean or null
    Required?
    No
    Description
    true if render was successful, false if not.
    null if session has not been rendered yet.
  • Name
    render_slide_count
    Type
    integer or null
    Required?
    No
    Description
    Number of slides rendered if render was successful.
    null if session has not been rendered yet.
  • Name
    render_message
    Type
    string or null
    Required?
    No
    Description
    Error message if render was unsuccessful.
    null if session has not been rendered yet, or render was successful.

The Session object

{
  "uuid": "f0155f9f-d3f3-4fa9-9f8d-70f8fd2f9c36",
  "created_at": "2020-08-13T13:14:32.000000Z",
  "rendered_at": "2020-08-13T14:16:20.000000Z",
  "render_succeeded": true,
  "render_slide_count": 5,
  "render_message": null
}