Introduction

About the Swagger documentation

Central Governance provides a set of Swagger REST APIs that you can use to perform necessary Central Governance tasks. Each available API command provides a command description that includes viable parameters. The documentation provides an example for commands that require a body, as well as a description of possible error codes.

As of Central Governance 1.1.3 SP11, REST API usage is based on Swagger 3.0. For more information, you can visit swagger.io.

Swagger 3.0 uses class hierarchies, and is an OpenAPI format.

Audience

You require a working knowledge of Central Governance and an understanding of basic REST API concepts to implement Central Governance APIs. Refer to the Central Governance documentation for product details.

Get started

Log on Central Governance using the same browser that you are going to use for the API operations. You must be an authorized Central Governance user, and have the correct privileges (such as Partner manager) on the API resources to continue. See Add a user for more information.

Operations

This section describes the REST API operations that you can use to perform Central Governance tasks, including working with resources.

Set HEADERS

  • Accept=application/json
  • Content-type=application/json

GET retrieves data for a resource or a set of resources

  • A resource can be identified by a business id or by a name: /api/v2/resource/businessId or /api/v2/resource?name=value
  • Several resources are retrieved when filtering by name or tags: /api/v2/resource?name=%value% or /api/v2/resource?tags=%value%
  • You can also filter resources, such as names, tags, products, or hosts, using the following methods:
    • Add the percent character % after the search value to return all items that start with a given string: /api/v2/resource?name=value%
    • Add the percent character % before the search value to return all items that end with a given string: /api/v2/resource?name=%value
    • Enclose the search value between percent characters % to return items that contain a given string: /api/v2/resource?name=%value%
  • All resources are retrieved when no option is used: /api/v2/resource
  • If several resources are retrieved, you can opt to retrieve just the business id and the name using the _brief option: /api/v2/resource?_brief=true
  • Retrieves properties at the Source or Target > step > commonProperties level

POST creates a new resource

  • To obtain the syntax for POST, do a GET and remove the business id
  • The POST must contain a body with the mandatory fields from the UI
    • Non-mandatory fields take the UI default values if not completed. For example for creating an application group:

      /api/v2/applicationgroups

      {"name": "group1"}

  • When creating a new flow, we recommend that you use all mandatory and non-mandatory fields returned by GET
  • Supports properties at the Source or Target > properties and source/target step > commonProperties levels

HEAD checks if the resource, identified by business id, exists: /api/v2/resource/businessId

PUT updates a resource identified by business id

  • The body is required and the syntax is obtained by doing a GET on the resource that will be updated
  • The update completely overwrites the resource:
    • For example, if a partner's server communication profile is not included in the PUT body, and it exists on the partner, as the result of PUT the server communication profile is deleted
  • Supports properties at the Source or Target > properties and source/target step > commonProperties levels

DELETE removes a resource or a set of resources

  • A resource can be identified by business id or by name: /api/v2/resource/businessId or /api/v2/resource?name=value
  • Several resources are retrieved when filtering by name or tags: /api/v2/resource?name=%value%
  • All resources are retrieved and removed if the _forced option is used: /api/v2/resource?_forced=true
  • Deletes several resources identified by businessId: /api/v2/resource?businessId=id1&?businessId=id2
  • You can also filter resources, a name or host, using the following methods:
    • Add the percent character % after the search value to select all items that start with a given string: /api/v2/resource?name=value%
    • Add the percent character % before the search value to select all items that end with a given string: /api/v2/resource?name=%value
    • Enclose the search value between percent characters % to select items that contain a given string: /api/v2/resource?name=%value%

Impact on flows

If the delete or the update operations have an impact on flows, the same checks are performed as when you are working in the UI.

  • If either the _forced option is not used or _forced=false, then the resource is not updated or removed, and there is an error stating the impact.
  • If _forced=true, the resource is updated or removed, and the impact on flows is the same as if in the UI you clicked the OK button in the flow impact warning. /api/v2/resource?name=value&_forced=true

 

Central Governance | Document Directory

Related Links