MCPcopy Index your code
hub / github.com/estruyf/spfx-rest-api-tester

github.com/estruyf/spfx-rest-api-tester @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
53 symbols 75 edges 11 files 6 documented · 11% updated 8y agov1.1.1-BETA · 2018-04-28★ 332 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

SharePoint Framework - Rest API Tester

A web part that can be used for testing out SharePoint APIs without the hassle of using another application and configuring the right headers.

Rest API Tester

Features

The web part has the following built-in features:

  • Stores the last used query in local browser storage.
  • Ability to store your favorite queries (currently stored in local storage as well).
  • Ability to use tokens in the API URL. These are coming from the this.context.pageContext object from SPFx.
  • API URL Suggestions
  • Allows you to set custom headers and body. The body disabled for GET and HEAD requests.
  • For every request you get the JSON response.
  • Automated conversion of the JSON response to a TypeScript interface.
  • SPFx code snippet for the performed query.

Ready to use this web part?

To make it easier, I have created an automated release process to this repository so that you do not have to clone the repository / bundle / package the solution. The latest version will always be available here: all releases.

Info: automated release process is achieved with VSTS and an Azure Function.

To install it to your tenant, you have to follow the next steps: - Download the estruyf-rest-api-tester.sppkg package from a release - Upload the solution package to your tenant/site-collection app catalog - Trust the solution to be available in your environment

Trust the solution

  • Create a page, and add the web part on it

Add web part to the page

Changelog

For the latest changes, please check out the changelog.

Info: changelog is driven by the changelog.json file. This file will also be used during the automated release process to insert the right information for the release.

Want to contribute?

Contributions are more than welcome! Please target your PRs to the DEV branch.

A great way to contribute is to enrich the known APIs file. This file is used for the API URL suggestions. The structure of this file looks like this:

{
  "api": [
    { "method": "<METHOD-TYPE>", "url": "_api/..." }
  ]
}

The file is located here: ./src/webparts/restTester/components/known-apis.json.

Minimal path to awesome / running your own development version

So you want to run your own version of the web part. Great! Here is what you have to do:

  • Clone this repository
  • Install the project dependencies: npm i
  • Start running the local version: gulp serve
  • Start testing out the web part

Ideas / feedback / issues

Got ideas, feedback, or discovered a bug / issue? Please add these via an issue to the issue list of this repository: issue list.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 21
Interface 17
Class 12
Enum 3

Languages

TypeScript100%

Modules by API surface

src/webparts/restTester/components/RestTester.tsx13 symbols
src/webparts/restTester/components/ApiSuggestions.tsx11 symbols
src/webparts/restTester/components/SnippetBuilder.tsx8 symbols
src/webparts/restTester/components/HeadersInput.tsx8 symbols
src/webparts/restTester/RestTesterWebPart.ts6 symbols
src/webparts/restTester/components/ResponseInfo.tsx5 symbols
src/webparts/restTester/loc/mystrings.d.ts1 symbols
src/webparts/restTester/components/IRestTesterProps.ts1 symbols

For agents

$ claude mcp add spfx-rest-api-tester \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page