Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sile16 committed Jul 17, 2018
1 parent a5f03e6 commit 5230c4c
Show file tree
Hide file tree
Showing 15 changed files with 98 additions and 87 deletions.
14 changes: 4 additions & 10 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pure FA Swagger Generator
# Pure Swagger

This is a tool that converts the Pure FlashArray API pdf documentation into an interactive Swagger UI. This lets you browse the API documentation in a convienent format and even execute API calls interactively directly to a FlashArray!
This is a tool that provides the Pure FlashArray and Flashblade API documentation into the popular interactive Swagger UI. This lets you browse the API documentation in a convienent format and even execute API calls interactively directly to a FlashArray or FlashBlade!


## Try It:
Expand All @@ -9,15 +9,13 @@ Requires [docker](https://docs.docker.com/install/) to be installed
> docker run -it --rm -p 80:5000 sile16/pureswagger
Then open your browser to http://127.0.0.1
Then load a [FlashArray REST pdf from Pure Support](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides)

Then select an API spec and enter your FlashArray or FlashBlade IP
That's it!

## To stop run:
just ctrl^c on the console docker container



## Screenshots

### Documentation in collapsable easy to read format
Expand All @@ -44,9 +42,5 @@ just ctrl^c on the console docker container
## Notes:

In order to send API calls to an array you must
1. Have a FlashArray




1. Have a FlashArray or FlashBlade

5 changes: 5 additions & 0 deletions html/specs/FB1.0.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ info: {description: '## Confidential and Proprietary. Subject to NDA and End Use
and added by the built in proxy server.


Use "pureadmin create" on the CLI to create an API Token. Or use "pureadmin list
--api-token --expose" to show a token already created. Note, it will only shows
tokens for the logged in user.


## Proxy

This Swagger tool includes a proxy server that forwards API calls to the array. In
Expand Down
5 changes: 5 additions & 0 deletions html/specs/FB1.1.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ info: {description: '## Confidential and Proprietary. Subject to NDA and End Use
and added by the built in proxy server.


Use "pureadmin create" on the CLI to create an API Token. Or use "pureadmin list
--api-token --expose" to show a token already created. Note, it will only shows
tokens for the logged in user.


## Proxy

This Swagger tool includes a proxy server that forwards API calls to the array. In
Expand Down
5 changes: 5 additions & 0 deletions html/specs/FB1.2.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ info: {description: '## Confidential and Proprietary. Subject to NDA and End Use
and added by the built in proxy server.


Use "pureadmin create" on the CLI to create an API Token. Or use "pureadmin list
--api-token --expose" to show a token already created. Note, it will only shows
tokens for the logged in user.


## Proxy

This Swagger tool includes a proxy server that forwards API calls to the array. In
Expand Down
5 changes: 5 additions & 0 deletions html/specs/FB1.3.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ info: {description: '## Confidential and Proprietary. Subject to NDA and End Use
and added by the built in proxy server.


Use "pureadmin create" on the CLI to create an API Token. Or use "pureadmin list
--api-token --expose" to show a token already created. Note, it will only shows
tokens for the logged in user.


## Proxy

This Swagger tool includes a proxy server that forwards API calls to the array. In
Expand Down
19 changes: 9 additions & 10 deletions html/specs/FlashArray REST v1.11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1441,17 +1441,16 @@ components:
ex1: {type: object}
info: {description: "## Confidential and Proprietary. Subject to NDA and End User\
\ Agreement.\n\nA light weight API for FlashArray, developed by Pure Storage,\
\ Inc. (http://www.purestorage.com/).\n\n## Authentication\nUse an API-Token to\
\ start a session, that returns an session cookie which expires in 30 minutes\
\ by default.\n\n## Error Codes\nUse HTTP Response codes to determine command\
\ results. Error message json formats are different depending on the endpoint.\n\
\n## Best practices\nBest practices for building applications [Best Practices](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/Pure_Storage_REST_API_Best_Practices).\
\ Inc. (http://www.purestorage.com/).\n\n## Authenticate (uses API Key and returns\
\ a cookie)\nTo get an API Key, you can do POST /auth/apitoken with your user/pass,\
\ then use your API key with POST /auth/session. The array returns \na session\
\ cookie which is handled by the browser automatically. Session cookies expire\
\ by default after 30 minutes.\n\n## Error Codes\nUse HTTP Response codes to determine\
\ command results. Error message json formats are different depending on the\
\ endpoint.\n\n## Best practices\nBest practices for building applications [Best\
\ Practices](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/Pure_Storage_REST_API_Best_Practices).\
\ \n\n## Pagenation\nPagenation/filtering information is not shown here. However,\
\ it is available for some endpoints. Please see [the PDF docs](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides).\n\
\n## Authenticate (uses API Key and returns a cookie)\nTo get an API Key, you\
\ can do POST /auth/apitoken with your user/pass, then use your API key with POST\
\ /auth/session The array returns \na session cookie which is handled by the\
\ browser automatically. Session cookies expire by default after 30 minutes.",
\ it is available for some endpoints. Please see [the PDF docs](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides).",
title: Pure FlashArray API, version: '1.11'}
openapi: 3.0.1
paths:
Expand Down
19 changes: 9 additions & 10 deletions html/specs/FlashArray REST v1.12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1482,17 +1482,16 @@ components:
ex1: {type: object}
info: {description: "## Confidential and Proprietary. Subject to NDA and End User\
\ Agreement.\n\nA light weight API for FlashArray, developed by Pure Storage,\
\ Inc. (http://www.purestorage.com/).\n\n## Authentication\nUse an API-Token to\
\ start a session, that returns an session cookie which expires in 30 minutes\
\ by default.\n\n## Error Codes\nUse HTTP Response codes to determine command\
\ results. Error message json formats are different depending on the endpoint.\n\
\n## Best practices\nBest practices for building applications [Best Practices](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/Pure_Storage_REST_API_Best_Practices).\
\ Inc. (http://www.purestorage.com/).\n\n## Authenticate (uses API Key and returns\
\ a cookie)\nTo get an API Key, you can do POST /auth/apitoken with your user/pass,\
\ then use your API key with POST /auth/session. The array returns \na session\
\ cookie which is handled by the browser automatically. Session cookies expire\
\ by default after 30 minutes.\n\n## Error Codes\nUse HTTP Response codes to determine\
\ command results. Error message json formats are different depending on the\
\ endpoint.\n\n## Best practices\nBest practices for building applications [Best\
\ Practices](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/Pure_Storage_REST_API_Best_Practices).\
\ \n\n## Pagenation\nPagenation/filtering information is not shown here. However,\
\ it is available for some endpoints. Please see [the PDF docs](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides).\n\
\n## Authenticate (uses API Key and returns a cookie)\nTo get an API Key, you\
\ can do POST /auth/apitoken with your user/pass, then use your API key with POST\
\ /auth/session The array returns \na session cookie which is handled by the\
\ browser automatically. Session cookies expire by default after 30 minutes.",
\ it is available for some endpoints. Please see [the PDF docs](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides).",
title: Pure FlashArray API, version: '1.12'}
openapi: 3.0.1
paths:
Expand Down
19 changes: 9 additions & 10 deletions html/specs/FlashArray REST v1.13.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1285,17 +1285,16 @@ components:
ex1: {type: object}
info: {description: "## Confidential and Proprietary. Subject to NDA and End User\
\ Agreement.\n\nA light weight API for FlashArray, developed by Pure Storage,\
\ Inc. (http://www.purestorage.com/).\n\n## Authentication\nUse an API-Token to\
\ start a session, that returns an session cookie which expires in 30 minutes\
\ by default.\n\n## Error Codes\nUse HTTP Response codes to determine command\
\ results. Error message json formats are different depending on the endpoint.\n\
\n## Best practices\nBest practices for building applications [Best Practices](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/Pure_Storage_REST_API_Best_Practices).\
\ Inc. (http://www.purestorage.com/).\n\n## Authenticate (uses API Key and returns\
\ a cookie)\nTo get an API Key, you can do POST /auth/apitoken with your user/pass,\
\ then use your API key with POST /auth/session. The array returns \na session\
\ cookie which is handled by the browser automatically. Session cookies expire\
\ by default after 30 minutes.\n\n## Error Codes\nUse HTTP Response codes to determine\
\ command results. Error message json formats are different depending on the\
\ endpoint.\n\n## Best practices\nBest practices for building applications [Best\
\ Practices](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/Pure_Storage_REST_API_Best_Practices).\
\ \n\n## Pagenation\nPagenation/filtering information is not shown here. However,\
\ it is available for some endpoints. Please see [the PDF docs](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides).\n\
\n## Authenticate (uses API Key and returns a cookie)\nTo get an API Key, you\
\ can do POST /auth/apitoken with your user/pass, then use your API key with POST\
\ /auth/session The array returns \na session cookie which is handled by the\
\ browser automatically. Session cookies expire by default after 30 minutes.",
\ it is available for some endpoints. Please see [the PDF docs](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides).",
title: Pure FlashArray API, version: '1.13'}
openapi: 3.0.1
paths:
Expand Down
19 changes: 9 additions & 10 deletions html/specs/FlashArray REST v1.14.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1300,17 +1300,16 @@ components:
ex1: {type: object}
info: {description: "## Confidential and Proprietary. Subject to NDA and End User\
\ Agreement.\n\nA light weight API for FlashArray, developed by Pure Storage,\
\ Inc. (http://www.purestorage.com/).\n\n## Authentication\nUse an API-Token to\
\ start a session, that returns an session cookie which expires in 30 minutes\
\ by default.\n\n## Error Codes\nUse HTTP Response codes to determine command\
\ results. Error message json formats are different depending on the endpoint.\n\
\n## Best practices\nBest practices for building applications [Best Practices](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/Pure_Storage_REST_API_Best_Practices).\
\ Inc. (http://www.purestorage.com/).\n\n## Authenticate (uses API Key and returns\
\ a cookie)\nTo get an API Key, you can do POST /auth/apitoken with your user/pass,\
\ then use your API key with POST /auth/session. The array returns \na session\
\ cookie which is handled by the browser automatically. Session cookies expire\
\ by default after 30 minutes.\n\n## Error Codes\nUse HTTP Response codes to determine\
\ command results. Error message json formats are different depending on the\
\ endpoint.\n\n## Best practices\nBest practices for building applications [Best\
\ Practices](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/Pure_Storage_REST_API_Best_Practices).\
\ \n\n## Pagenation\nPagenation/filtering information is not shown here. However,\
\ it is available for some endpoints. Please see [the PDF docs](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides).\n\
\n## Authenticate (uses API Key and returns a cookie)\nTo get an API Key, you\
\ can do POST /auth/apitoken with your user/pass, then use your API key with POST\
\ /auth/session The array returns \na session cookie which is handled by the\
\ browser automatically. Session cookies expire by default after 30 minutes.",
\ it is available for some endpoints. Please see [the PDF docs](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides).",
title: Pure FlashArray API, version: '1.14'}
openapi: 3.0.1
paths:
Expand Down
19 changes: 9 additions & 10 deletions html/specs/FlashArray REST v1.7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1457,17 +1457,16 @@ components:
ex1: {type: object}
info: {description: "## Confidential and Proprietary. Subject to NDA and End User\
\ Agreement.\n\nA light weight API for FlashArray, developed by Pure Storage,\
\ Inc. (http://www.purestorage.com/).\n\n## Authentication\nUse an API-Token to\
\ start a session, that returns an session cookie which expires in 30 minutes\
\ by default.\n\n## Error Codes\nUse HTTP Response codes to determine command\
\ results. Error message json formats are different depending on the endpoint.\n\
\n## Best practices\nBest practices for building applications [Best Practices](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/Pure_Storage_REST_API_Best_Practices).\
\ Inc. (http://www.purestorage.com/).\n\n## Authenticate (uses API Key and returns\
\ a cookie)\nTo get an API Key, you can do POST /auth/apitoken with your user/pass,\
\ then use your API key with POST /auth/session. The array returns \na session\
\ cookie which is handled by the browser automatically. Session cookies expire\
\ by default after 30 minutes.\n\n## Error Codes\nUse HTTP Response codes to determine\
\ command results. Error message json formats are different depending on the\
\ endpoint.\n\n## Best practices\nBest practices for building applications [Best\
\ Practices](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/Pure_Storage_REST_API_Best_Practices).\
\ \n\n## Pagenation\nPagenation/filtering information is not shown here. However,\
\ it is available for some endpoints. Please see [the PDF docs](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides).\n\
\n## Authenticate (uses API Key and returns a cookie)\nTo get an API Key, you\
\ can do POST /auth/apitoken with your user/pass, then use your API key with POST\
\ /auth/session The array returns \na session cookie which is handled by the\
\ browser automatically. Session cookies expire by default after 30 minutes.",
\ it is available for some endpoints. Please see [the PDF docs](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides).",
title: Pure FlashArray API, version: '1.7'}
openapi: 3.0.1
paths:
Expand Down
19 changes: 9 additions & 10 deletions html/specs/FlashArray REST v1.8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1460,17 +1460,16 @@ components:
ex1: {type: object}
info: {description: "## Confidential and Proprietary. Subject to NDA and End User\
\ Agreement.\n\nA light weight API for FlashArray, developed by Pure Storage,\
\ Inc. (http://www.purestorage.com/).\n\n## Authentication\nUse an API-Token to\
\ start a session, that returns an session cookie which expires in 30 minutes\
\ by default.\n\n## Error Codes\nUse HTTP Response codes to determine command\
\ results. Error message json formats are different depending on the endpoint.\n\
\n## Best practices\nBest practices for building applications [Best Practices](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/Pure_Storage_REST_API_Best_Practices).\
\ Inc. (http://www.purestorage.com/).\n\n## Authenticate (uses API Key and returns\
\ a cookie)\nTo get an API Key, you can do POST /auth/apitoken with your user/pass,\
\ then use your API key with POST /auth/session. The array returns \na session\
\ cookie which is handled by the browser automatically. Session cookies expire\
\ by default after 30 minutes.\n\n## Error Codes\nUse HTTP Response codes to determine\
\ command results. Error message json formats are different depending on the\
\ endpoint.\n\n## Best practices\nBest practices for building applications [Best\
\ Practices](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/Pure_Storage_REST_API_Best_Practices).\
\ \n\n## Pagenation\nPagenation/filtering information is not shown here. However,\
\ it is available for some endpoints. Please see [the PDF docs](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides).\n\
\n## Authenticate (uses API Key and returns a cookie)\nTo get an API Key, you\
\ can do POST /auth/apitoken with your user/pass, then use your API key with POST\
\ /auth/session The array returns \na session cookie which is handled by the\
\ browser automatically. Session cookies expire by default after 30 minutes.",
\ it is available for some endpoints. Please see [the PDF docs](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides).",
title: Pure FlashArray API, version: '1.8'}
openapi: 3.0.1
paths:
Expand Down
19 changes: 9 additions & 10 deletions html/specs/FlashArray REST v1.9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1452,17 +1452,16 @@ components:
ex1: {type: object}
info: {description: "## Confidential and Proprietary. Subject to NDA and End User\
\ Agreement.\n\nA light weight API for FlashArray, developed by Pure Storage,\
\ Inc. (http://www.purestorage.com/).\n\n## Authentication\nUse an API-Token to\
\ start a session, that returns an session cookie which expires in 30 minutes\
\ by default.\n\n## Error Codes\nUse HTTP Response codes to determine command\
\ results. Error message json formats are different depending on the endpoint.\n\
\n## Best practices\nBest practices for building applications [Best Practices](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/Pure_Storage_REST_API_Best_Practices).\
\ Inc. (http://www.purestorage.com/).\n\n## Authenticate (uses API Key and returns\
\ a cookie)\nTo get an API Key, you can do POST /auth/apitoken with your user/pass,\
\ then use your API key with POST /auth/session. The array returns \na session\
\ cookie which is handled by the browser automatically. Session cookies expire\
\ by default after 30 minutes.\n\n## Error Codes\nUse HTTP Response codes to determine\
\ command results. Error message json formats are different depending on the\
\ endpoint.\n\n## Best practices\nBest practices for building applications [Best\
\ Practices](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/Pure_Storage_REST_API_Best_Practices).\
\ \n\n## Pagenation\nPagenation/filtering information is not shown here. However,\
\ it is available for some endpoints. Please see [the PDF docs](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides).\n\
\n## Authenticate (uses API Key and returns a cookie)\nTo get an API Key, you\
\ can do POST /auth/apitoken with your user/pass, then use your API key with POST\
\ /auth/session The array returns \na session cookie which is handled by the\
\ browser automatically. Session cookies expire by default after 30 minutes.",
\ it is available for some endpoints. Please see [the PDF docs](https://support.purestorage.com/FlashArray/PurityFA/Purity_FA_REST_API/Reference/REST_API_PDF_Reference_Guides).",
title: Pure FlashArray API, version: '1.9'}
openapi: 3.0.1
paths:
Expand Down
Loading

0 comments on commit 5230c4c

Please sign in to comment.