Active IQ and AutoSupport Discussions

Highlighted

ActiveIQ and swagger_client

According to the code examples, you have to use the swagger_client:

 

The following is the getAccessToken API in Python:

from __future__ import print_statement

import time

import swagger_client

from swagger_client.rest import ApiException

from pprint import pprint

 

# create an instance of the API class

api_instance = swagger_client.AccessTokenApi()

tokenManageraccessToken =  # TokenManageraccessToken |

 

try:

    # Generates a new access token using a valid refresh token.

    api_response = api_instance.get_access_token(tokenManageraccessToken)

    pprint(api_response)

except ApiException as e:

    print("Exception when calling AccessTokenApi->getAccessToken: %s\n" % e)

 

After some googling I found that swagger_client needs to be custom built: https://github.com/swagger-api/swagger-codegen/#generating-libraries-from-your-server

What command do I use to install swagger_client? I have tried pip install swagger_client and it does not work.

1 REPLY 1
Highlighted

Re: ActiveIQ and swagger_client

I don't know the answer to this, but I just wanted to make sure you saw the answer in the other thread you posted. You don't have to use the swagger client.

Check out the KB!
NetApp Insights To Action
All Community Forums