ves-io-schema-signup-CustomAPI-ListCountries

Examples of performing signup CustomAPI ListCountries

Usecase:

Perform ListCountries on signup

Request:

Request using vesctl:

vesctl request rpc signup.CustomAPI.ListCountries -i request.yaml --uri /no_auth/countries/prefix-literal --http-method GET

where file request.yaml has following contents:

{}

vesctl yaml response:

countries:
- additionalInfo:
    zip_code_validation: ^\d{5}$
  countryCode: US
  countryName: USA

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:55461/no_auth/countries/prefix-literal?prefix='

curl response:

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

{
  "countries": [
    {
      "country_code": "US",
      "country_name": "USA",
      "additional_info": {
        "zip_code_validation": "^\d{5}$"
      }
    }
  ]
}