Organization Scripts

Manage scripts associated with an organization on the API platform.

For general information on using scripts, refer to:

API Platform Version: 8.4 and later

Table of Contents

  1. What is a script?
  2. How do I manage scripts for my business organization on the platform?
  3. How do I add a script to an organization on the API platform?
  4. How do I view scripts for an organization on the API platform?
  5. How do I modify a script associated with an organization on the API platform?
  6. How do I move a script from one organization to another?
  7. How do I delete a script associated with an organization on the API platform?
  8. What roles can manage scripts for my business organization on the platform?
  9. Related Topics

What is a script?

In the API Platform, a script is a reusable sequence of commands that can be used to automate the execution of tasks associated with managing the platform and its resources.

You can build scripts for automating common tasks relating to your APIs. You can build a library of reusable scripts that you can then import into a process.

A process is an ordered sequence of activities performed by an API Gateway that supports the virtualization capability. For example, the logic performed in a virtual service operation is defined as a process. When a message is received by the container, once the virtual service operation is identified, its process is executed. As determined by the activities in the process, down-stream services might be invoked. When the process is complete, a response to the original message is generated.

In Policy Manager or in the developer portal, you can define one or more scripts that can be assigned to one or more processes to assist in automation.

In Policy Manager, the Add Process Wizard allows you to define a library of reusable scripts with common activities. For example, you might define a script to retrieve user information based on an account number, or to build a custom form, and you could use the same script in multiple processes.

In the developer portal, you can do exactly the same thing. You can define a custom process:

Using the Process Palette, you can:

  • Define the sequence of messages as they flow through for each virtual service operation.
  • Configure a variety of different types of activities, each represented by a separate icon in the Process Palette user interface, for achieving the results required for each operation.

How do I manage scripts for my business organization on the platform?

The API platform allows you to manage the scripts that are available for your business organization. You can:

All the scripts available for your business organization are available for all child organizations also.

Back to top

How do I add a script for my organization?

There are two steps to adding a script:

  • Define the basic information about the script, such as name, description, and script type: see To add a script below.
  • Configure the script to define what it actually does: see To configure a script below.
To add a script
  1. In the Developer Portal, go to the Organizations List (see To access the Organizations List).
  2. Find your organization on the list, and then click the title to view the Details page for the organization.
  3. On the left navigation bar, choose Scripts. All scripts associated with the organization are displayed.
  4. Click Add.
  5. In the Add script page, specify:
    • Script Name: A short, descriptive name for the script; for example, Get-User-Info-For-AccountNo or Build-Custom-Form-Request. Used on the script summary page.
    • Script Type: The scripting language you want to use to write the script. Supported types: BeanShell Engine, Jython, or JavaScript.
    • Script Description: A brief description of the script. Include any key information relating to how the script is used and what it does.
  6. Click Save. The script is added to the list of scripts for the organization.
To configure a script
  1. First, add the script; see To add a script above.
  2. Go to the scripts list for the organization (Organizations > organization > Scripts).
  3. Find the script on the list and click the title to access the details page for the script.
  4. In the second section, Script Summary, click Edit. The Script Editor appears. Here, you can use all the features of the Script Editor to build the script you want.
  5. When done, click Finish.

Some things you can do in the Script Editor:

  • Import scripts that you've already defined.
  • Use default methods: Type CTRL+Spacebar and then choose from the list of available objects; in most cases, type a period after the object to view available methods. Options vary according to the selected scripting language.

For more information on using the Script Editor, see Getting Started with Scripts).

Back to top

How do I view scripts for an organization on the API platform?

If you're a Business Admin, you have full rights to add, view, edit, or delete scripts that are set up for your organization.

To view scripts for a business organization
  1. In the Developer Portal, go to the Organizations List (see To access the Organizations List).
  2. Find your organization on the list, and then click the title to view the Details page for the organization.
  3. In the left menu, click Scripts. All scripts associated with the organization are displayed. An example is shown below.

    Scripts List

  4. To view details of a specific script, click the link in the title to access the Details page for the script. The script is displayed in the bottom section.

Back to top

How do I modify a script associated with an organization on the API platform?

If you're a Business Admin, you have full rights to add, view, edit, or delete scripts that are set up for your organization.

To modify a script associated with a business organization
  1. In the Developer Portal, go to the Organizations List (see To access the Organizations List).
  2. Find your organization on the list, and then click the title to view the Details page for the organization.
  3. In the left menu, click Scripts. All scripts associated with the organization are displayed.
  4. Find the script on the list, and click the link in the title. The Details page for the script is displayed, as shown below.

    Script Details page

  5. You can edit in two ways:
    • To edit the script name, type (scripting language), and description, click Edit in the top panel.
    • To edit the script details, click Edit in the second panel to access the Script Editor. See To configure a script above.

 

Back to top

How do I move a script from one organization to another?

You can move a script that's in the context of one of your business organizations into another organization, as long as you are a Business Admin for both organizations. For example, you might have created the script in the context of a child organization by mistake. You can easily move it to the parent organization. Follow the steps below.

To move a script from one business organization to another
  1. In the Developer Portal, go to the Organizations List (see To access the Organizations List).
  2. Find the organization that the script currently exists under, and then click the title to view the Details page for the organization.
  3. On the left navigation bar, choose Scripts. All scripts associated with the organization are displayed.
  4. Find the script that you want to move, and then click the title to view the Details page for the script.
  5. In the top section, click Edit.
  6. In the Organization Name field, start typing the name of the organization you want to move it to. After the first three characters, the platform displays a list of matching organizations for you to choose from.
  7. Click the entry for the new organization so that the full name is displayed in the field.
  8. Click Save. The script is moved to the new organization.

Back to top

How do I delete a script associated with an organization on the API platform?

If you're a Business Admin, you have full rights to add, view, edit, or delete scripts that are set up for your organization.

To delete a script associated with a business organization
  1. In the Developer Portal, go to the Organizations List (see To access the Organizations List).
  2. Find your organization on the list, and then click the title to view the Details page for the organization.
  3. In the left menu, click Scripts. All scripts associated with the organization are displayed.
  4. Find the script on the list, and click the link in the title. The Script Details page is displayed.
  5. Click Delete.
  6. At the confirmation prompt, click OK. The script is deleted.

Back to top

What roles can manage scripts for my business organization on the platform?

The Business Admin has full responsibility for all scripts, created at the organization level. The API Admin can create and manage scripts at the API level, but only the Business Admin can manage scripts for the organization.

Back to top