SOAP APIs (GQL PAPI)

Creating a SOAP API

Use the createApisFromSpecs mutation, specifying a specType variable value of WSDL. In this mutation, you specify a WSDL file when creating the API.

Successful API creation will return an apiId and trackingId for viewing the asynchronous upload progress (see screenshot below). Use the apiSpecImportProgresses query to track the asynchronous progress of the API creation.

mutation createApisFromSpecs($creations: [ApiCreateFromSpecInput!]!) {
  createApisFromSpecs(creations: $creations) {
		apiId
		trackingId
  }
}
{
  "creations": {
    "spec": null,
    "specType": "WSDL",
    "category": "Other",
    "name": "SOAP test"
  }
}

๐Ÿ“˜

Creating a SOAP API without a WSDL file

If you want to create a SOAP API before having the final WSDL file, create your API with any simple WSDL file and replace it later using the updateApisFromSpecs mutation described below.

Using the API playground to create a SOAP API

Click the Files tab in the middle frame, click + to add a file, and select your local WSDL file. In the Path to variable textbox above the filename, enter creations.spec (assuming your GraphQL variable is named creations, as in the example above).

Creating a SOAP API using the GraphQL Platform API in the playground.

Creating a SOAP API using the GraphQL Platform API in the playground.

Programmatically creating a SOAP API

The following sample Node.js Axios code executes the Mutation.createApisFromSpecs operation programmatically.

TBD

Updating a SOAP API

Use the updateApisFromSpecs mutation, specifying a specType variable value of WSDL. You must also specify the apiVersionId for the API.

Successful API update will return the original apiId and trackingId for viewing the asynchronous upload progress (see screenshot below). Use the apiSpecImportProgresses query to track the asynchronous progress of the API creation.

mutation updateApisFromSpecs($updates: [ApiUpdateFromSpecInput!]!) {
  updateApisFromSpecs(updates: $updates) {
		apiId
		trackingId
  }
}
{
  "updates": {
    "spec", null,
    "apiVersionId": "apiversion_078c0415-41a0-4d3f-a042-49c1ee027a7b",
    "specType": "WSDL"
  }
}

Using the API playground to update a SOAP API

Click the Files tab in the middle frame, click + to add a file, and select your local WSDL file. In the Path to variable textbox above the filename, enter updates.spec (assuming your GraphQL variable is named updates, as in the example above).

Updating the WSDL file for a SOAP API using the GraphQL Platform API in the playground.

Updating the WSDL file for a SOAP API using the GraphQL Platform API in the playground.