API: Difference between revisions

From Fishbowl Advanced
No edit summary
 
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
The API allows developers to integrate with Fishbowl Advanced. Fishbowl provides documentation and examples, but no official support for the API.__TOC__
The API allows developers to integrate with Fishbowl Advanced. Fishbowl only provides documentation for the API. Fishbowl Support will not troubleshoot the API, but several resources are listed below to help you get started.__TOC__


== FAQs ==
= FAQs =
* '''What alternatives are there to using the API?'''
==What alternatives are there to using the API?==
: Many customers that are interested in the API are looking for ways to import data, view tables, automate reports, or perform basic functions. This can all be done '''''without''''' the API.
Many customers that are interested in the API are looking for ways to import data, run queries, automate reports, or update orders. This can all be done '''''without''''' the API.
:# The {{Module|Data Import}} allows files to be imported, even if the column headers don't match the Fishbowl format. This allows many external files to be imported into Fishbowl without modification.
# The {{Module|Data Import}} allows files to be imported, even if the column headers don't match the Fishbowl format. This allows many external files to be imported into Fishbowl without modification.
:# New data can be imported and basic functions can be performed using [[Imports and Exports]].
# Nearly all functions can be performed using Fishbowl's built-in [[Imports and Exports]].
:# All of the database tables can be viewed, queried, and exported from the {{Module|Data}}.
# All of the database tables can be viewed, queried, and exported from the {{Module|Data}}.
:# The {{Module|Schedule}} can automatically email reports, run data queries, import local files, or import files on a server, such as an FTP server.
# The {{Module|Schedule}} can automatically email reports, run data queries, import local files, or import files on a server, such as an FTP server.


* '''How do I connect to the API?'''
==Is Fishbowl Advanced an on-premise application, or is it in the cloud?==
** The API is automatically installed when you install the Fishbowl server. It can be accessed anywhere from your local network, or configured to allow connections from anywhere in the world. The easiest way to get started is to use our [[#Postman|Postman collection]].
* Traditionally, Fishbowl Advanced is installed on your computer as an on-premise solution that can be accessed from your local network. You can also open ports and configure the Fishbowl Server to allow connections from anywhere in the world.
* With [[Fishbowl Hosted Services]], we install Fishbowl Advanced for you on our high-performance servers, and configure it so that you can access it from anywhere in the world.
* [https://help.fishbowlonline.com/s/article/Drive-Getting-Started Fishbowl Drive] is a similar, but separate product that is 100% web based and hosted in the cloud with its own API.


* '''Is Fishbowl Advanced an on-premise application, or is it in the cloud?'''
==How do I connect to the API?==
** Traditionally, Fishbowl Advanced is installed on your computer as an on-premise solution that can be accessed from your local network. You can also open ports and configure the Fishbowl Server to allow connections from anywhere in the world.
* The API is automatically installed when you install the Fishbowl server. It can be accessed anywhere from your local network, or configured to allow connections from anywhere in the world. The easiest way to get started is to use our [[#Postman|Postman collection]].
** With [[Fishbowl Hosted Services]], we install Fishbowl Advanced for you on our high-performance servers, and configure it so that you can access it from anywhere in the world.
** [https://help.fishbowlonline.com/s/article/Drive-Getting-Started Fishbowl Drive] is a similar, but separate product that is 100% web based and hosted in the cloud with its own API.


* '''Do I need a certificate to encrypt the API traffic?'''
==Do I need a certificate to encrypt the API traffic?==
** Yes. For security, you must have a [https://en.wikipedia.org/w/index.php?title=Java_KeyStore .JKS certificate file] for the [[Fishbowl_Server_Administration#Server_tab|Fishbowl Server]]. The certificate can be self-signed or purchased online from a Certificate Authority.
* Yes. For security, we recommend that you use a [https://en.wikipedia.org/w/index.php?title=Java_KeyStore .JKS certificate file] for the [[Fishbowl_Server_Administration#Server_tab|Fishbowl Server]]. The certificate can be self-signed or purchased online from a Certificate Authority.


* '''Is there another version of the API?'''
==What is the difference between a parameter, an attribute, and a variable?==
** The previous version of the API uses a socket connection. It does not provide as much data validation and it is not recommended. If needed, resources for the previous version of the API can be downloaded by clicking [https://fishbowlhelp.com/files/Legacy-API.zip here].
* These are all ways to pass information to the API.
** A path variable is typically an ID that is part of the URL path: '''/api/parts/:id/inventory/add'''
** A parameter comes after the path in the URL, often as part of a search filter: '''?vendorId=25&quantity=5'''
** An attribute is sent in the body of the request and is often included in the JSON to add information to an object: '''"name": "FG2100"'''


* '''What is the logout API call for?'''
==How can I test the API without altering my production database?==
** Your license key determines the number of users that can be logged in to Fishbowl Advanced at the same time. The logout API call closes the connection so that more users can connect if needed.
* When testing the API, you should make a copy of your database to use as a [[Sandbox]].


== Documentation ==
==How do I import and modify orders with the REST API?==
* Nearly all Fishbowl functions can be performed through the API by using the '''Import''' endpoint to bring in CSV or JSON data: [[Imports_and_Exports#List_of_imports_and_exports|List of imports]].
 
==What is the logout API call for?==
* Your license key determines the number of users that can be logged in to Fishbowl Advanced at the same time. The logout API call closes the connection so that more users can connect if needed.
 
==Is there another version of the API?==
* The previous version of the API uses a socket connection. It does not provide as much data validation and it is not recommended. If needed, resources for the previous version of the API can be downloaded by clicking [https://help.fishbowlinventory.com/advanced/s/Legacy-API.zip here].
 
= Documentation =
The REST API documentation is automatically installed on your Fishbowl Server. This allows you to see the documentation that is intended for your version of Fishbowl Advanced.
The REST API documentation is automatically installed on your Fishbowl Server. This allows you to see the documentation that is intended for your version of Fishbowl Advanced.
* To see the documentation from the Fishbowl Server computer, click the following link: http://localhost:80/apidocs<br>[[File:REST API.png|class=noinvert|600px]]
* To see the API documentation, you will need to which '''Port''' your server is using. By default, this is '''2456''' or '''80'''. You can confirm this by double-clicking the Fishbowl Server tray icon and then selecting the '''Server''' tab.<br>[[File:Web Port.png]]
* To see the documentation from other computers on the network, enter the IP address of the Fishbowl Server computer, replacing '''80''' with your '''Web Port'''. For example: '''<nowiki>192.168.29.37:80/apidocs</nowiki>'''
* If you are using the default port of '''2456''' and you are on the <u>Fishbowl Server</u> computer, you can view the documentation by clicking this link: http://localhost:2456/apidocs<br>[[File:REST API.png|class=noinvert|600px]]
* An example of the API documentation can be accessed [https://fishbowlhelp.com/files/apidocs/introduction.html here].
* To see the documentation from <u>other computers</u> on the network, enter the IP address of the Fishbowl Server computer, replacing '''2456''' with your '''Web Port'''. For example: '''<nowiki>192.168.29.37:2456/apidocs</nowiki>'''
* An example of the API documentation can be accessed [https://help.fishbowlinventory.com/advanced/s/apidocs/introduction.html here].


== Postman ==
= Postman =


Postman is a free application that can help you explore many APIs, including the API for Fishbowl Advanced. Follow the instructions below to get started.
Postman is a free application that can help you explore many APIs, including the API for Fishbowl Advanced. If you've configured your server to allow remote access, you can use the web version of Postman. Otherwise, you can install the free app and connect over your local network. Follow the instructions below to get started.


# Download and install '''Postman''' from this page: https://postman.com/downloads
# Download and install '''Postman''' from this page: https://postman.com/downloads
# Open '''Postman''' and sign in to your free account.
# Open '''Postman''' and sign in to your free account.
# Open your '''Workspace''', go to the '''Collections''' tab, click the '''Import''' button, and then ''paste'' the following URL: '''https''':'''//fishbowlhelp'''.'''com/postman'''.'''json'''
# Open your '''Workspace''', go to the '''Collections''' tab, click the '''Import''' button, and then ''paste'' the following URL: '''https''':'''//fishbowlhelp'''.'''com/pm
# If you are not on the Fishbowl Server computer, highlight '''Fishbowl Advanced''', click the '''Variables''' tab, and change the '''Current Value''' for the '''URL''' to the IP address of your Fishbowl Server. Then click '''Save'''.
# If you are not on the Fishbowl Server computer, highlight '''Fishbowl Advanced''', click the '''Variables''' tab, and change the '''URL Current Value''' to the IP address of your Fishbowl Server. Then click '''Save'''.
# Expand the '''Login''' folder and select the line that says '''POST Login'''.<br>[[File:Postman Login.png|border]]
# Expand the '''Login''' folder and select the line that says '''POST Login'''.<br>[[File:Postman Login.png|border]]
# Click the '''Body''' tab and change the username and password if needed. Then click '''Save'''.
# Click the '''Body''' tab and change the username and password if needed. Then click '''Save'''.
# Click the '''Send''' button near the top-right corner.
# Click the '''Send''' button near the top-right corner.
# Open the {{Module|Settings|Integrated_Apps_tab}} in Fishbowl Advanced, and [[Settings#Integrated_Apps_tab|approve the integrated app]].
# Open the {{Module|Settings|Integrated_Apps_tab}} in Fishbowl Advanced and [[Settings#Integrated_Apps_tab|approve the integrated app]].
# Return to the '''Login''' request in Postman, and send it again using the keyboard shortcut ('''CTRL+Enter''' or '''CMD+Enter''').
# Return to the '''Login''' request in Postman, and send it again using the keyboard shortcut ('''CTRL+Enter''' or '''CMD+Enter''').
# Double-click the Fishbowl Server tray icon and select the '''Connections''' tab to see your new connection. Each login request will add a new connection.<br>[[File:Postman Connection.png]]
# On the Fishbowl Server computer you can double-click the Fishbowl Server tray icon and select the '''Connections''' tab to see your new connection. Each login request will add a new connection.<br>[[File:Postman Connection.png]]
# Open Postman and send a few example requests, like the ones below:
# Open Postman and send a few example requests, like the ones below:
#* Expand '''Vendors''', select the line that says '''GET Search Vendors''', and then send the request. You should get a JSON response with your vendors.
#* Expand '''Vendors''', select the line that says '''GET Search Vendors''', and then send the request. You should get a JSON response listing your vendors.
#* Expand '''Inventory''', select the line that says '''GET Inventory''', and then click the '''Params''' tab. Change '''B201''' to one of your part numbers, and then send the request.
#* Expand '''Inventory''', select the line that says '''GET Inventory''', and then click the '''Params''' tab. Change '''B201''' to one of your part numbers, and then send the request.
#* Expand '''Parts''', select the line that says '''GET Part Best Cost''', and then click the '''Params''' tab. Notice the difference between '''Query Params''' and '''Path Variables'''.
#* Expand '''Parts''', select the line that says '''GET Part Best Cost''', and then click the '''Params''' tab. Notice the difference between '''Query Params''' and '''Path Variables'''.
# Expand '''Login''', select the line that says '''POST Logout''', and then send the request.
# Expand '''Login''', select the line that says '''POST Logout''', and then send the request.
# Double-click the Fishbowl Server tray icon, select the '''Connections''' tab, and then click the '''Refresh''' button. Your connection should be removed from the list.
# On the Fishbowl Server computer, double-click the Fishbowl Server tray icon, select the '''Connections''' tab, and then click the '''Refresh''' button. Your connection will be removed from the list.

Latest revision as of 05:30, 13 March 2025

The API allows developers to integrate with Fishbowl Advanced. Fishbowl only provides documentation for the API. Fishbowl Support will not troubleshoot the API, but several resources are listed below to help you get started.

FAQs

What alternatives are there to using the API?

Many customers that are interested in the API are looking for ways to import data, run queries, automate reports, or update orders. This can all be done without the API.

  1. The Icon.Data Import.png Data Import module allows files to be imported, even if the column headers don't match the Fishbowl format. This allows many external files to be imported into Fishbowl without modification.
  2. Nearly all functions can be performed using Fishbowl's built-in Imports and Exports.
  3. All of the database tables can be viewed, queried, and exported from the Icon.Data.png Data module.
  4. The Icon.Schedule.png Schedule module can automatically email reports, run data queries, import local files, or import files on a server, such as an FTP server.

Is Fishbowl Advanced an on-premise application, or is it in the cloud?

  • Traditionally, Fishbowl Advanced is installed on your computer as an on-premise solution that can be accessed from your local network. You can also open ports and configure the Fishbowl Server to allow connections from anywhere in the world.
  • With Fishbowl Hosted Services, we install Fishbowl Advanced for you on our high-performance servers, and configure it so that you can access it from anywhere in the world.
  • Fishbowl Drive is a similar, but separate product that is 100% web based and hosted in the cloud with its own API.

How do I connect to the API?

  • The API is automatically installed when you install the Fishbowl server. It can be accessed anywhere from your local network, or configured to allow connections from anywhere in the world. The easiest way to get started is to use our Postman collection.

Do I need a certificate to encrypt the API traffic?

What is the difference between a parameter, an attribute, and a variable?

  • These are all ways to pass information to the API.
    • A path variable is typically an ID that is part of the URL path: /api/parts/:id/inventory/add
    • A parameter comes after the path in the URL, often as part of a search filter: ?vendorId=25&quantity=5
    • An attribute is sent in the body of the request and is often included in the JSON to add information to an object: "name": "FG2100"

How can I test the API without altering my production database?

  • When testing the API, you should make a copy of your database to use as a Sandbox.

How do I import and modify orders with the REST API?

  • Nearly all Fishbowl functions can be performed through the API by using the Import endpoint to bring in CSV or JSON data: List of imports.

What is the logout API call for?

  • Your license key determines the number of users that can be logged in to Fishbowl Advanced at the same time. The logout API call closes the connection so that more users can connect if needed.

Is there another version of the API?

  • The previous version of the API uses a socket connection. It does not provide as much data validation and it is not recommended. If needed, resources for the previous version of the API can be downloaded by clicking here.

Documentation

The REST API documentation is automatically installed on your Fishbowl Server. This allows you to see the documentation that is intended for your version of Fishbowl Advanced.

  • To see the API documentation, you will need to which Port your server is using. By default, this is 2456 or 80. You can confirm this by double-clicking the Fishbowl Server tray icon and then selecting the Server tab.
    Web Port.png
  • If you are using the default port of 2456 and you are on the Fishbowl Server computer, you can view the documentation by clicking this link: http://localhost:2456/apidocs
    REST API.png
  • To see the documentation from other computers on the network, enter the IP address of the Fishbowl Server computer, replacing 2456 with your Web Port. For example: 192.168.29.37:2456/apidocs
  • An example of the API documentation can be accessed here.

Postman

Postman is a free application that can help you explore many APIs, including the API for Fishbowl Advanced. If you've configured your server to allow remote access, you can use the web version of Postman. Otherwise, you can install the free app and connect over your local network. Follow the instructions below to get started.

  1. Download and install Postman from this page: https://postman.com/downloads
  2. Open Postman and sign in to your free account.
  3. Open your Workspace, go to the Collections tab, click the Import button, and then paste the following URL: https://fishbowlhelp.com/pm
  4. If you are not on the Fishbowl Server computer, highlight Fishbowl Advanced, click the Variables tab, and change the URL Current Value to the IP address of your Fishbowl Server. Then click Save.
  5. Expand the Login folder and select the line that says POST Login.
    Postman Login.png
  6. Click the Body tab and change the username and password if needed. Then click Save.
  7. Click the Send button near the top-right corner.
  8. Open the Icon.Settings.png Settings module in Fishbowl Advanced and approve the integrated app.
  9. Return to the Login request in Postman, and send it again using the keyboard shortcut (CTRL+Enter or CMD+Enter).
  10. On the Fishbowl Server computer you can double-click the Fishbowl Server tray icon and select the Connections tab to see your new connection. Each login request will add a new connection.
    Postman Connection.png
  11. Open Postman and send a few example requests, like the ones below:
    • Expand Vendors, select the line that says GET Search Vendors, and then send the request. You should get a JSON response listing your vendors.
    • Expand Inventory, select the line that says GET Inventory, and then click the Params tab. Change B201 to one of your part numbers, and then send the request.
    • Expand Parts, select the line that says GET Part Best Cost, and then click the Params tab. Notice the difference between Query Params and Path Variables.
  12. Expand Login, select the line that says POST Logout, and then send the request.
  13. On the Fishbowl Server computer, double-click the Fishbowl Server tray icon, select the Connections tab, and then click the Refresh button. Your connection will be removed from the list.