diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index e5820afa..810cc6f2 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -37,7 +37,6 @@ ** xref:connected-app-authentication.adoc[] * xref:about-documenting-an-api.adoc[] ** xref:generating-documentation-with-ai.adoc[] - ** xref:to-use-api-notebook.adoc[] ** xref:to-configure-api-settings.adoc[] * xref:about-portals.adoc[] ** xref:enable-and-disable-a-public-portal.adoc[] diff --git a/modules/ROOT/pages/about-api-use.adoc b/modules/ROOT/pages/about-api-use.adoc index d4dca535..d89dc1ca 100644 --- a/modules/ROOT/pages/about-api-use.adoc +++ b/modules/ROOT/pages/about-api-use.adoc @@ -9,13 +9,11 @@ Anypoint Exchange provides significant features for API providers to easily publ Exchange helps API consumers understand API functionality and test features with: * API console to view API functions. This console appears to the right of a REST API detail screen. -* API Notebook to view API documentation and to test API features. -* Simulate data to an API using the mocking service. +* A mocking service to simulate data to an API. * GraphQL console to view GraphQL schemas and run queries. == See Also * xref:asset-details.adoc#view-rest-api-elements-in-an-asset[View REST API Elements in an Asset] -* xref:asset-details.adoc#test-an-api-with-api-notebook[Test an API with API Notebook] * xref:ex2-to-simulate-api-data.adoc[] * xref:view-graphql-api-schemas-and-run-queries.adoc[] \ No newline at end of file diff --git a/modules/ROOT/pages/about-documenting-an-api.adoc b/modules/ROOT/pages/about-documenting-an-api.adoc index 4a34b4fc..6c0aab1d 100644 --- a/modules/ROOT/pages/about-documenting-an-api.adoc +++ b/modules/ROOT/pages/about-documenting-an-api.adoc @@ -4,19 +4,13 @@ include::_attributes.adoc[] endif::[] :imagesdir: ../assets/images/ -Anypoint Exchange lets you create API Notebooks which let you describe each function in your API and provide a test area so that users can experiment with sending different values to the API and receiving output. +Anypoint Exchange helps API providers document and manage APIs. After you publish a REST API in Exchange, use Einstein generative AI to create API documentation. For all other APIs, you can configure whether API instances to be public or private. You can also configure non-managed instances. -After creating your API Notebook you can optionally create an API instance to control whether the notebook is private or public. By setting the notebook's instance to private, others in your organization can review it. When you are ready, you can set the API instance to make the API Notebook public. -NOTE: API Notebooks are independent of the use of an API instance. -If you don't use a base URI in your RAML, or use an API instance, you can use the mocking service to generate test data. - -Topics: - -* xref:to-use-api-notebook.adoc[To Document an Asset Using API Notebook] -* xref:to-configure-api-settings.adoc[To Configure API Instances] +* xref:generating-documentation-with-ai.adoc[] +* xref:to-configure-api-settings.adoc[] == See Also -* xref:to-describe-an-asset.adoc[To Describe an Asset] -* xref:generating-documentation-with-ai.adoc[] +* xref:to-describe-an-asset.adoc[] + diff --git a/modules/ROOT/pages/asset-details.adoc b/modules/ROOT/pages/asset-details.adoc index f194c3fa..522e2da4 100644 --- a/modules/ROOT/pages/asset-details.adoc +++ b/modules/ROOT/pages/asset-details.adoc @@ -103,17 +103,6 @@ include::partial$task-view-conformance-status.adoc[] include::exchange::partial$task-view-governed-apis-for-rulesets.adoc[] - -== Test an API with API Notebook - -Many APIs have an API notebook for interactive testing. - -. Click *API Notebook* in the content page. -. Read the description and usage information. -. Click *Play* to test the method in the code example. -. Exchange shows the results in real time. -. Experiment with the example in the code block to try different parameters and values. - == See Also * xref:access-management::permissions-by-product.adoc#exchange[Permissions Available in Anypoint Platform for Exchange] diff --git a/modules/ROOT/pages/index.adoc b/modules/ROOT/pages/index.adoc index 94bf1880..c01562fd 100644 --- a/modules/ROOT/pages/index.adoc +++ b/modules/ROOT/pages/index.adoc @@ -9,9 +9,9 @@ Anypoint Exchange is a curated catalog of reusable assets. APIs, API groups, API image:exchange-landing-page.png["Exchange catalog showing assets provided by MuleSoft"] -Use Exchange to discover, share, incorporate assets and resources into your applications, and view asset usage and engagement metrics. You can create API developer portals, view and test APIs, simulate sending data to APIs by using the mocking service, create assets, and use API Notebooks to describe and test API functions. +Use Exchange to discover, share, incorporate assets and resources into your applications, and view asset usage and engagement metrics. You can create API developer portals, view API documentation and test functions, simulate sending data to APIs by using the mocking service, and create assets. -Exchange assets are accessible from many places, such as Anypoint Studio (connectors, templates, and examples), API Manager (APIs, API groups, and policies), or Runtime Manager (applications). APIs can be published from Design Center to Exchange. +Exchange assets are accessible from many places, such as Anypoint Studio (connectors, templates, and examples), API Manager (APIs, API groups, and policies), or Runtime Manager (applications). APIs can be published from Anypoint Code Builder to Exchange. Assets in the *Provided by MuleSoft* organization are created by MuleSoft and its partners and certified by MuleSoft. These assets are publicly available to all customers. However, assets that are created by an organization other than *Provided by MuleSoft* and published in that organization's instance of Exchange are private and not visible outside that organization. Customers are responsible for any private assets they publish within their Exchange instance. @@ -44,7 +44,7 @@ You can get started either by searching for an existing asset or creating a new . Select an asset from the search results view. . Review the description of the asset. -To create assets for APIs, connectors, templates, examples, API Notebooks, and custom assets, log into Exchange. See xref:workflow-sharing-assets.adoc[Workflow: Publish APIs] for more information. +To create assets for APIs, connectors, templates, examples, and custom assets, log into Exchange. See xref:workflow-sharing-assets.adoc[Workflow: Publish APIs] for more information. == Test APIs diff --git a/modules/ROOT/pages/to-use-api-notebook.adoc b/modules/ROOT/pages/to-use-api-notebook.adoc deleted file mode 100644 index f7d953b1..00000000 --- a/modules/ROOT/pages/to-use-api-notebook.adoc +++ /dev/null @@ -1,103 +0,0 @@ -= Documenting an Asset Using API Notebook -ifndef::env-site,env-github[] -include::_attributes.adoc[] -endif::[] -:imagesdir: ../assets/images/ - -API Notebook lets you document an API's functionality with explanations that accompany code windows. Users can -change the code and execute it by clicking the Play button in each code block. You can create a new API Notebook -from the Exchange editor and use JavaScript code in the code blocks. - - -Use API Designer in Anypoint Platform to improve and test your RAML, OAS, or AsyncAPI API specification, and to publish the API specification to Anypoint Exchange. - -NOTE: An OAS specification is converted into RAML so you can follow the RAML conventions in API Notebook. Also, the RAMl specification is converted when you upload an OAS. - -. Click the asset to view details. -. Click *Edit documentation* and click the API Notebook icon image:ex2-api-notebook-icon.png["API Notebook icon in the editor"] in the editor. -. Add a description for the asset. -. In the Visual editor, the API Notebook icon creates a panel where you can add JavaScript code items. Enter the first letter of the function you want to add and Notebook lists the available functions starting with that letter. -+ -If you are using Markdown, each notebook entry is enclosed in a block of 3 tick marks, for example: -+ -[source,javascript,linenums] ----- -```notebook -// Authenticate client -API.authenticate(myclient); -``` ----- - -== API Notebook Program Flow for External APIs - -If you are accessing an external API such as the Instagram API, fetch the client using the Anypoint Asset -Portal Service at the `+https://anypoint.mulesoft.com/exchange/api/v1/health+` URL. - -The fetch code is: - -[source,javascript] ----- -fetch('https://anypoint.mulesoft.com/exchange/api/v1/health').then((res) => res.json()) ----- - -Enable users to authenticate with the API: - -[source,text,linenums] ----- -// Authenticate Instagram. -// This asks you to authenticate with your personal account. -// Don't worry, we have no idea who you are. -API.authenticate(instagramApi); ----- - -You can then construct your notebook to use the API. - -== API Notebook Program Flow for API Manager APIs - -. Create a client in the notebook to initialize access to your API using the API.createClient function. -+ -Syntax: `API.createClient('CLIENT_NAME', 'URL_TO_API_MANAGER_API');` -+ -. Authenticate the client with Anypoint Platform using the API.authenticate function. -+ -Syntax: `API.authenticate(CLIENT_NAME);` -+ -. Create your notebook based on the functionality in your REST API. Each function is based on the names -of your RAML descriptor blocks. For example, for the `getdetails` client and with a block called `/info`, to document the GET call, the function description in the notebook is: `getdetails.info.get();` -+ -You can add extra parameters to function call with an array, for example: -+ -`me.function.post[{ orgId: 'myorg'}) ...]` -+ -. Test the API in Exchange by setting elements in the code blocks and clicking Play. Ensure all code blocks -work without causing errors in the code. - -[NOTE] -==== -The create and authentication calls must be in separate notebook calls: - -[source,javascript,linenums] ----- -```notebook -fetch(’https://anypoint.mulesoft.com/exchange/api/v1/health').then((res) => res.json()) -API.createClient(‘github’, ‘https://anypoint.mulesoft.com/apiplatform/repository/v2/organizations/ORG_ID/public/apis/7782/versions/7918/files/root’); - -``` - -```notebook - -API.authenticate(github); -``` (edited) ----- -==== - -== API Notebook Security - -API notebooks run plain JavaScript in the browser. To ensure sensitive data does not leak, API Notebook disables certain JavaScript functionality: - -* All global functions, including `alert` and `prompt` -* All global variables, including `window`, `document`, `localStorage`, and `XMLHttpRequest` - -== See Also - -* https://docs.mulesoft.com/design-center/v/1.0/upload-raml-task[Upload an Existing RAML File to Exchange].