API Platform API

(4 reviews)

Extended search API

This Notebook explains how to use the API Platform API V2 to search through the APIs within your organization

##Documentation

The following RAML fragment describes the search method parameters

/organizations/{organizationId}/public/portals:
  description: |
    A collection of API portals within organization. When performing a search by passing in 'query=foo' as a string, it is equivalent to passing in the following combination: 'query[name]=foo&query[version]=foo&query[description]=foo&query[tags]=foo&query[matchAll]=false'
  get:
    queryParameters:

      requireRaml:
        type:     boolean
        required: false
        default:  true

      query[name]:
        type:        string
        required:    false
        description: |
          A list of keywords for matching API name in a search. Used in conjunction with other 'query[xxx]' to perform advanced search. Note: when any of 'query[xxx]' is used, the query parameter 'query' would be disregarded.

      query[version]:
        type:        string
        required:    false
        description: |
          A list of keywords for matching API version name in a search. Used in conjunction with other 'query[xxx]' to perform advanced search. Note: when any of 'query[xxx]' is used, the query parameter 'query' would be disregarded.

      query[tags]:
        type:        string
        required:    false
        description: |
          A list of keywords for matching API version tags in a search. Used in conjunction with other 'query[xxx]' to perform advanced search. Note: when any of 'query[xxx]' is used, the query parameter 'query' would be disregarded.

      query[description]:
        type:        string
        required:    false
        description: |
          A list of keywords for matching API version description in a search. Used in conjunction with other 'query[xxx]' to perform advanced search. Note: when any of 'query[xxx]' is used, the query parameter 'query' would be disregarded.

      query[matchAll]:
        type:        boolean
        required:    false
        default:     false
        description: |
          A boolean value that determines how other 'query[xxx]' values should work together in an advanced search. When 'matchAll' is true, all other 'query[xxx]' would be chained with an 'AND' when performing a search, otherwise they are chained with an 'OR'. Note: when any of 'query[xxx]' is used, the query parameter 'query' would be disregarded.

      organizationId:
        type:        string
        required:    false
        description: |
          The organization ID that the search should be run in. If not provided, search would be performed within the organization which the login user is under.

##Using the API

First we need to setup the API client

Now we obtain the active organizationId

And now we setup the public search API endpoint which is located at:

GET /organizations/{organizationId}/public/portals

###Examples

Querying by tags = 'public api'

Querying by tags = 'public api' and name = 'CloudHub'

query[matchAll]=true means AND

Querying by tags = 'public' or description = 'public'

query[matchAll]=false means OR

Reviews