Skip to end of banner
Go to start of banner

Create an API in the API Manager

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 64 Next »

In this article

Overview

In SnapLogic Manager, the API Manager console provides a space where you can create APIs by referencing a specification. The new API asset acts as a container for the following SnapLogic assets.

  • Pipeline: The Pipeline is a representation of the API specification and provides the scaffolding of its implementation in the SnapLogic platform.

  • Tasks: The URI endpoints used to trigger Pipeline execution.

  • Files: A specification file. Both JSON and YAML file formats are supported.

  • Accounts: Accounts in Manager referenced by Pipelines used in the API.

You can create an API using one of four ways:

  • By uploading an Open API Specification (OAS) file (Design First) with either a JSON or YAML file extension.

  • By entering a URL that points to an Open API Specification file (Design First)

  • By creating an API from an existing project

  • By starting with an empty API

The first version is automatically created when you create the API. However, you can create additional versions of your API and manage them.

Prerequisites

  • APIM prerequisites for your Org

  • Your API specifications must be based on Open API Specification (OAS) 3.0 or 2.0.

  • You must have Write permissions to create an API.

API Manager

To navigate to the API Manager, go to Manager > API Management > API Manager.

APIM

APIs and Proxies appear in this list. You can view details about the API or Proxy by clicking it. You can also set permissions on your API.

Create the API using Design First

  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.

Create the API from Existing Project Assets

  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 Create from Existing Project and select the Project.

  3. Click Continue.

  4. In Create New API - Select Assets, select the types of assets you want to import to the new API. An Asset selected at the root level also imports the leaf-level Assets.

  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.

Create the API from a Git repository

  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 Create from Git Checkout.

    1. Repository: Select the Git repository from the dropdown list.

    2. Branches/Tags: Choose an existing branch or create a new branch:

      • Select the Branch or Tag to associate with your API.

      • (Optional) Enter a name to create a new branch from main.

    3. Click Continue.

  3. In Create New API - Details, specify 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.

  4. Click Create.

  5. Navigate to the Assets tab of the API version to view the Git repository associated with the API version assets.


    The following image shows a new branch:

  6. Select an asset and click (blue star) to view the available Git operations.

Creating an Empty API

  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 Create Empty API.

  3. Click Continue.

  4. 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.

  5. Click Create.

Creating an APIM API in IIP

You can create an APIM API in IIP through the following workflows:

  • Designer

    • Creating a Triggered Task

    • Creating an Ultra Task

  • Manager

    • From a project or Project Space shared folder dropdown list

    • Creating/editing a Triggered Task

    • Creating/editing an Ultra Task

  1. Choose one of the following ways to open the dialog for a Triggered or Ultra Task:

    • In the Designer tab, click the Task icon from the expanded toolbar.

    • In the Manager tab, navigate to the target project or global shared folder, and In the assets table, do one of the following:

      • To create an APIM API from a task:

        1. For an existing Task, click on the target Task.

        2. Click (blue star) and in the dropdown, select Task > Triggered or Task > Ultra. Alternatively, click the Tasks tab, then click (blue star) and in the dropdown, select Triggered or Ultra.
          The task dialog for the task type you selected appears.

        3. Fill out the Task form with the appropriate information, then click Save and create API.

      • To create an APIM API from a project or Project Space share folder, click (blue star) to display the dropdown list, select Create API:

  2. In the Create new API assets, select the target assets to include in your API, and then click Import and continue.

  3. In the Create new API details, enter the details.

    • 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.

  4. Click Create.

  5. Navigate to the API Manager to verify API creation.

Edit an API name

Rename the API to align with the company standards and best practices. Save the extra effort instead of copying the API to rename it and then deleting the old one.

  1. Navigate to API Manager > API > API details:

    rename-api-editdetails.png
  2. Click Edit Details to rename the API:

    edit-details-api.png
  3. Click Save. A message “API details has been updated successfully” displays in the UI.

  • You can only rename the unpublished APIs. Published APIs cannot be renamed because that would change the endpoint URL of the API.

  • Unpublish the API to edit the API name.

  • Special characters such as |, <, >, [, ], {, },#, ?, /, and \. cannot be used.

Enabling "Try It Out" for your API

To allow API users to try out your API,

The Try it out button appears only if these two requirements are met.

To test the Try it out button for your API: Discovering APIs in the API Catalog

Deleting an API from the API Manager Console

To delete an API, you must delete all versions and the assets in those versions. For details, see the following topics:

Related Content


  • No labels