ves-io-schema-signup-CustomAPI-ListCities

Examples of performing signup CustomAPI ListCities

Usecase:

Perform ListCities on signup

Request:

Request using vesctl:

vesctl request rpc signup.CustomAPI.ListCities -i request.yaml --uri /no_auth/countries/country_code-literal/states/state_code-literal/cities/prefix-literal --http-method GET

where file request.yaml has following contents:

{}

vesctl yaml response:

cities:
- additionalInfo:
    additional_name: Madras
  cityName: Channai

Request using curl:

curl -X 'GET' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build381173587_b001_apidocs.test/host=docker-desktop' 'https://localhost:60209/no_auth/countries/country_code-literal/states/state_code-literal/cities/prefix-literal?country_code=&prefix=&state_code='

curl response:

HTTP/1.1 200 OK
Content-Length: 162
Content-Type: application/json
Date: Wed, 14 Jul 2021 08:08:19 GMT
Vary: Accept-Encoding

{
  "error_code": "EUNKNOWN",
  "cities": [
    {
      "city_name": "Channai",
      "additional_info": {
        "additional_name": "Madras"
      }
    }
  ]
}