TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Get the profile in the version chosen by header, query string or media type

GEThttps://api.testingapis.com/api/versioned/profileSign in to see this endpoint's URL

Version selectors, in order of precedence: <list type="number"><item><description>Header: X-API-Version: 1</description></item><item><description>Query: ?api-version=1</description></item><item><description>Media type: Accept: application/vnd.apibee.v1+json (the response uses the same content type)</description></item><item><description>Default: the latest version (2)</description></item></list> The response headers X-API-Version and X-API-Version-Source show which version was chosen and how.

Parameters 2

NameTypeDescription
api-versionquery · stringVersion, sent as the api-version query parameter, e.g. 1, 2, v2 or 2.0.
X-API-Versionheader · stringAPI version to use (1 or 2). Takes precedence over ?api-version= and the Accept media type.

Responses

200
Profile in the requested version.
400
Unsupported version; the body lists supported versions.

Example

Request
curl -X GET "https://api.testingapis.com/api/versioned/profile" \
  -H "X-API-Version: 2" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
X-API-Version: 2

{
  "id": 101,
  "firstName": "Ava",
  "lastName": "Thompson",
  "displayName": "Ava T.",
  "contact": {"email": "ava.thompson@example.com", "phone": {"countryCode": "+1", "number": "555-0101"}},
  "address": {
    "street": "742 Evergreen Terrace",
    "city": "Springfield",
    "state": "IL",
    "postalCode": "62704",
    "country": "US"
  },
  "preferences": {"language": "en-US", "timezone": "America/Chicago", "newsletter": true},
… (3 more lines)

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.