Convert Diagram File To Another Format

Introduction

With POST /diagram/{name}/SaveAs API you can convert diagram file to another format.

Resource URI

Aspose.Diagram Cloud APIs Swagger UI lets you call this REST API directly from the browser. The description of the API and its parameters are also given there.

cURL Example


// First get Access Token
// Get App Key and App SID from https://dashboard.aspose.cloud/

curl -v "https://api.aspose.cloud/oauth2/token" \
-X POST \
-d 'grant_type=client_credentials&client_id=0B17F60A-6D69-426B-9ABD-79F35A6E9F7B&client_secret=53b8b19adffa41a3e87dbbd8858977ae' \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json"



// cURL example to convert Diagram file to another format

curl -v "https://api.aspose.cloud/v1.1/diagram/file_get_1.vdx/SaveAs?IsOverwrite=true&newfilename=file_get_1.pdf" \
-X POST \
-d '{"Format":"pdf"}' \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer Ddc-erbNb_b1GGm-s0T_vATc72hQdgCPlmsWQJzSiuLWiYYLa1aIZQC2p64xDV5rjdVCYaR-4PIy_Djgvc2mqlN6uu13O90fvu66TKKAPWLJi-50D0WxpZr1l-7en2VkkDUnMgkMphdmGGN3IWRgc22XxMXab72oh0njvfDVoAskGjbFDrl3jxDBYnGDbfqGF5_YHnliYJ2gq40uc2_rVgoDNJoGz6PMs2bNDm2zuUXTD7Hy07qxE5nWxNkaYNMY3RxuDXvLrQommIB9Nboyt8v40G5yJ0nDCFUKgsmM6BhEGe9afDFLd3vQQTRqfWYlWSsi8kfhKW5pCqNqaHe_NJkzkmhYdqFxrUJhaJrp5xEGUAh2eH8V3G_sTaP0DxhMRQB7VSCIqyHsUgqPBVrHH5pujM-nEaPCPQK9gsiblvkPjXka"


{

  "SaveResult": {

    "SourceDocument": {

      "Href": "file_get_1.vdx",

      "Rel": null,

      "Title": null,

      "Type": null

    },

    "DestDocument": {

      "Href": "file_get_1.pdf",

      "Rel": null,

      "Title": null,

      "Type": null

    },

    "AdditionalItems": null

  },

  "Code": 200,

  "Status": "OK"

}

SDKs

Using an SDK (API client) is the quickest way for a developer to speed up the development. An SDK takes care of a lot of low-level details of making requests and handling responses and lets you focus on writing code specific to your particular project. Checkout our GitHub repository for a complete list of Aspose.Diagram Cloud SDKs along with working examples, to get you started in no time. Please check Available SDKs article to learn how to add an SDK to your project.

SDK Examples