API Documentation

GET /subscribers

The API endpoint URL for this service is:

/subscribers

Request

To make a request to the API, send a GET request to the endpoint.

Response

The API will respond with an array of JSON objects containing the following fields:

  • _id: Unique id of Subscriber.
  • name: Name of Subscriber.
  • subscribedChannel: Name of channel.
  • subscribedDate: Date of Subscription.

Example Request


                GET /subscribers HTTP/1.1
                Content-Type: application/json
                

Example Response


                HTTP/1.1 200 OK
                Content-Type: application/json
                
                [
                    {
                        "_id":"64b419aec955ac4094ebec2e",
                        "name":"Jeread Krus",
                        "subscribedChannel":"CNET",
                        "subscribedDate":"2023-07-16T16:24:14.457Z"
                    }
                    ...
                ]
                

GET /subscribers/name

The API endpoint URL for this service is:

/subscribers/name

Request

To make a request to the API, send a GET request to the endpoint.

Response

The API will respond with an array of JSON objects containing the following fields:

  • name: Name of Subscriber.
  • subscribedChannel: Name of channel.

Example Request


                GET /subscribers/name HTTP/1.1
                Content-Type: application/json
                

Example Response


                HTTP/1.1 200 OK
                Content-Type: application/json
                
                [
                    {
                        "name":"Jeread Krus",
                        "subscribedChannel":"CNET"
                    }
                    ...
                ]
                

GET /subscribers/{id}

The API endpoint URL for this service is:

/subscribers/{id}

Request

To make a request to the API, send a GET request to the endpoint.

Response

The API will respond with an array of JSON objects containing the following fields:

  • _id: Unique id of Subscriber.
  • name: Name of Subscriber.
  • subscribedChannel: Name of channel.
  • subscribedDate: Date of Subscription.

Example Request


                GET /subscribers/name HTTP/1.1
                Content-Type: application/json
                

Example Response


                HTTP/1.1 200 OK
                Content-Type: application/json
                
                [
                    {
                       "_id":"{id}",
                       "name":"Name Crosspond to Document",
                       "subscribedChannel":"Channel Crosspond to Document",
                       "subscribedDate":"Date Crosspond to Document"
                    }
                ]