MLH-Fellowship / babel-sandbox

Babel repl-like codesandbox: check out link =>
https://codesandbox.io/s/github/babel/sandboxes
MIT License
6 stars 3 forks source link

Share the postman collection with us #56

Closed ianjennings closed 4 years ago

ianjennings commented 4 years ago

Put the postman collection somewhere and create a document telling us how to get it.

mohammedsahl commented 4 years ago

I have three options:

IMO the first option seems most suitable. Here's a link

Here's the JSON (Postman Collection v2.1 format) that can be imported into postman (if the above link does not work)

{
    "info": {
        "_postman_id": "dd680005-93c1-4911-a79b-2f52522b8654",
        "name": "Babel Server Endpoints",
        "description": "API for the babel sandbox\r\n\r\nBase URL is `http://localhost:{PORT}/api/v1/` with paths to retrieve information on:\r\n - Blobs\r\n  - Source\r\n  - Plugin\r\n  - Config\\[s\\]",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
        {
            "name": "Create a new Blob",
            "request": {
                "method": "POST",
                "header": [],
                "url": {
                    "raw": "http://localhost:1337/api/v1/blobs/create?source=Y29uc29ssS5sb2coImhlbGxvIHdvcmxkIik&plugin=e2ga1fh&configs[0]=eyJmb28isiJiYXIifQ==&configs[1]=eyJiYXoiOiAicaV4In0=",
                    "protocol": "http",
                    "host": [
                        "localhost"
                    ],
                    "port": "1337",
                    "path": [
                        "api",
                        "v1",
                        "blobs",
                        "create"
                    ],
                    "query": [
                        {
                            "key": "source",
                            "value": "Y29uc29ssS5sb2coImhlbGxvIHdvcmxkIik"
                        },
                        {
                            "key": "plugin",
                            "value": "e2ga1fh"
                        },
                        {
                            "key": "configs[0]",
                            "value": "eyJmb28isiJiYXIifQ=="
                        },
                        {
                            "key": "configs[1]",
                            "value": "eyJiYXoiOiAicaV4In0="
                        }
                    ]
                }
            },
            "response": []
        },
        {
            "name": "View all blobs",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "http://localhost:1337/api/v1/blobs/view",
                    "protocol": "http",
                    "host": [
                        "localhost"
                    ],
                    "port": "1337",
                    "path": [
                        "api",
                        "v1",
                        "blobs",
                        "view"
                    ]
                },
                "description": "**For testing purposes**"
            },
            "response": []
        },
        {
            "name": "View all sources",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "http://localhost:1337/api/v1/source/view",
                    "protocol": "http",
                    "host": [
                        "localhost"
                    ],
                    "port": "1337",
                    "path": [
                        "api",
                        "v1",
                        "source",
                        "view"
                    ]
                },
                "description": "**For testing purposes**"
            },
            "response": []
        },
        {
            "name": "View all plugins",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "http://localhost:1337/api/v1/plugin/view",
                    "protocol": "http",
                    "host": [
                        "localhost"
                    ],
                    "port": "1337",
                    "path": [
                        "api",
                        "v1",
                        "plugin",
                        "view"
                    ]
                },
                "description": "**For testing purposes**"
            },
            "response": []
        },
        {
            "name": "View all configs",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "http://localhost:1337/api/v1/config/view",
                    "protocol": "http",
                    "host": [
                        "localhost"
                    ],
                    "port": "1337",
                    "path": [
                        "api",
                        "v1",
                        "config",
                        "view"
                    ]
                },
                "description": "**For testing purposes**"
            },
            "response": []
        },
        {
            "name": "Get a single blob",
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "http://localhost:1337/api/v1/blobs/get-blob/:id",
                    "protocol": "http",
                    "host": [
                        "localhost"
                    ],
                    "port": "1337",
                    "path": [
                        "api",
                        "v1",
                        "blobs",
                        "get-blob",
                        ":id"
                    ],
                    "variable": [
                        {
                            "key": "id",
                            "value": "5f283952cb86992fd4e67249"
                        }
                    ]
                },
                "description": "Used to retrieve a single blob using `id` as the parameter"
            },
            "response": []
        }
    ],
    "event": [
        {
            "listen": "prerequest",
            "script": {
                "id": "fa9ea2b8-5371-4d47-a651-e4f9ee254684",
                "type": "text/javascript",
                "exec": [
                    ""
                ]
            }
        },
        {
            "listen": "test",
            "script": {
                "id": "e06ac1d9-b7fd-4afa-8ec8-17b1e0966327",
                "type": "text/javascript",
                "exec": [
                    ""
                ]
            }
        }
    ],
    "protocolProfileBehavior": {}
}