Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Getting your requests:
    In order to get a list of your requests you have to make a request to https://api.botdoc.io/v1/module_container/container/ as GET and you can use 2 parameters:

    page to return the result set based on this page number (starting from 1, not 0), and page_size that is the number of results per page.

    If you don’t pass any parameter, page‘s default is 1 and page_size‘s default is 10.


    If you send a request like this: https://api.botdoc.io/v1/module_container/container/?page=2&page_size=5 (always remember sending token on header).
    The response will look like the example below:

    Code Block
    languagejson
    {
    	"links": {
    		"previous": "https://api.botdoc.io/v1/module_container/container/?page_size=5",
    		"next": "https://api.botdoc.io/v1/module_container/container/?page=3&page_size=5"
    	},
    	"count": 18,
    	"total_pages": 4,
    	"results": [{
    			"id": 5457,
    			"identifier": "820aeeb52ad0707xxxxxxxxxxxxxxxxx",
    			...
    		},
    		...{
    			"id": 5459,
    			"identifier": "b63202468ca4cb029fxxxxxxxxxxxxxxxxxb",
    			...
    		}
    	]
    }


    The links is an array of strings, that always contains previous and next.
    The previous is the URL to request the previous page, returns null when it’s the first page.
    The next is the URL to request the next page, returns null when it’s the last page.
    The total_pages returns the total of pages.
    The count returns the total requests.
    The results return an array of requests.

  2. Getting a specific request:
    In order to get a specific request you have to make a request to:
    https://api.botdoc.io/v1/module_container/container/{container_id}/ as GET and the response will look like the example below:

    Code Block
    languagejson
    {
        "id": 3144,
        "identifier": "0a43xxxxxxxxxxxxxxxxxx",
        "state": "completed",
        "callback_url": null,
        "expires_at": "2020-06-04T14:34:01.741277Z",
        "email_template_slug": null,
        "created": "2020-06-01T14:34:01.232906Z",
        "updated": "2020-06-01T14:34:01.762544Z",
        "allow_open_remote_addrs": [
            "*"
        ],
        "block_open_remote_addrs": [],
        "page_type": "p2"
    }

     

...