Skip to content
phw edited this page Oct 12, 2012 · 5 revisions

GET /topic/{topicId}

Request: GET /topic/{topicId}

Returns a single topic area with the given ID.

Request headers

Header Description
Authorize oAuth 2 authentication header
Accept application/json or application/xml
Accept-Language The language in which the localized topic area name is returned. Currently the API supports de and en as valid language codes.

Response status codes

HTTP status Description
200 Ok Successful request.
400 Bad Request The topic ID was not a valid UUID.
404 Not Found The topic with the given ID does not exist.

Example

Load the “Technology / Engineering” topic area in German:

GET /v1/topic/8576549a-097f-45b3-8c59-fb3d6a03147d HTTP/1.1
Host: api.textking.com
Accept: application/json
Accept-Language: de
Authorize: Bearer youraccesstoken

Response:

HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8

{
    "id": "8576549a-097f-45b3-8c59-fb3d6a03147d",
    "name": "Technik / Technologie",
    "localization_language": "deu",
    "links": [
        {
            "rel": "self",
            "href": "https://api.textking.dev/v1/topic/8576549a-097f-45b3-8c59-fb3d6a03147d"
        }
    ]
}

Clone this wiki locally