Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. In the API Manager page, under the APIs & Proxies tab, click the add icon ( (blue star) ) and choose New API.

  2. In Create New API, choose the source of the OAS file.

    • Upload File. Click Choose File to specify the location of the specification file to upload.

    • Enter URL. Enter a valid URL pointing to the location of the specification file.

  3. Click Continue.

  4. In Create New API - Options, select your API Import Configurations.

    • Create Specification. If selected, the imported specification is included as a File Asset in the API.

    • Create Endpoints from Path. If selected, endpoints for the new API are created based on its path to one of the following:

      • Triggered Task: Choose to make the API endpoint a Triggered Task.

      • Ultra Task: Choose to make the API endpoint an Ultra Task.

  5. Click Import and Continue.

  6. In Create New API - Details, fill in the details for the new API.

    • General Info

      • Name (Title)The name of the new API.

        The name must meet the following requirements:

        • Must be unique.

        • Must begin with alphanumeric characters A-Z, a-z, or 0-9.

        • Cannot contain the reserved keyword shared.

        • Cannot contain |, <, >, [, ], {, }, #, ?, /, and \.

        • Must be no more than 256 characters. If the name includes double-byte characters, the maximum length is shorter.

      • Description. A description of the new API.

      • Version. The version number for the first version of the API.
        Default: 1.0.
        Learn more: Managing Versions of Your APIs

      • Tags. Enter any tags associated with your API. You can create the tags as required. 

    • Endpoint Configuration » Path to Endpoint. (Read-only) The base path for the endpoint.

    • Server Configuration » Snaplex. The Snaplex to associate with the new API.

  7. Click Create.

Troubleshooting Section for API Specification file

...

Any structural or syntax issues in the API, API Version, or Proxy specification file will give an error in the SnapLogic UI. You can change the specifications according to the error message in Swager Swagger editor or any other editor tool.

Entity

Error Messages for incorrect JSON or YAML (OAS2.0 or OAS3.0) Specifications

Description and Resolution

API and Proxy

Expand
titleStructural Error Message 1

Spec Contains Error

Structural error

Expecting property name enclosed in double quotes: line 33 column 29 (char 782)

Line 33

Column 29

Expand
titleInvalid or Incorrect Data Error Message 2

Spec Contains Errors

Structural error at $

'invalidField' does not match any of the regexes: '^x-'

Expand
titleInvalid or Incorrect Data Error Message 3

Spec Contains Errors

Structural error

Invalid API specification: 'str' object has no attribute 'get

  • If the API Specification has incorrect structure, then the error message displays a missing path where the syntax is broken along with the line and column number.

  • If the API Specification file has incorrect or invalid data then it specifies the incorrect data.

  • You can edit the specs in any editor such as Swagger and upload the edited specification file to create the API, API Version or Proxy.

Example Workflow

...

  1. Create an API in the API Manager using upload option. Upload OAS 2.0 or 3.0 YAML or JSON API Specification file:

    example-apispec.png

     

  2. If the file contains an incorrect data or has a broken code structure then it gives an error:

    example-error-apispec.png

     

  3. You can edit the specification file in Swagger editor:

    example-apispec-swaggereditor.png

...