https://api.thorn-hub.com/api/keywords
https://api.thorn-hub.com/api
You will be provided an access token that is used to authenticate with the API. You can either pass this authentication token via an HTTP header or via a URL query parameter:
Authorization: token <TOKEN>
https://api.thorn-hub.com/api?token=<TOKEN>
The API is available in two variants, a simple HTTP JSON API and as a GraphQL endpoint. The JSON API offers all essential functionality via simple HTTP calls, and the GraphQL endpoint offers a more structured response. The HTTP API is simpler, while the GraphQL API can be used with existing client libraries for fast integration.
This returns the list of all keywords.
GET https://api.thorn-hub.com/api/keywords
{
"data": {
"keywords": [
{
"id": "af0cba51-ccc0-434f-a1b2-53906fdd4c74",
"isOwnKeyword": false,
"sourceID": null,
"keyword": "...",
"category": null,
"language": "...",
"translation": "...",
"description": null,
"isAmbiguous": false,
"isAmbiguousNote": "..."
},
...
]
}
}
The only required fields are
id
and
keyword
, all other fields may be unspecified.
Field | Description |
---|---|
id
|
A unique ID identifying this keyword. |
isOwnKeyword
|
If true, this keyword was created by your organization, and you are able to modify or delete it. |
sourceID
|
If this keyword was created by your organization, it may optionally have a sourceID, which is an ID referencing your internal ID for this keyword. Your keyword source IDs are not visiable to any other organization. |
category
|
The keyword category. |
language
|
The keyword language. |
translation
|
The keyword translation. |
description
|
A description of the keyword. |
isAmbiguous
|
Is the keyword ambiguous? |
isAmbiguousNote
|
If the keyword is ambiguous, a note about why. |
This adds or updates keywords. When sending keywords to this list, they will update existing keywords if they match keywords already in the list. The keywords are identified as matching if one of the following is true:
sourceID
fields matchkeyword
and
language
fields matchkeyword
fields match and the
language
field is emptyIf an existing keyword is not found that matches, a new keyword will be added to the list.
POST https://api.thorn-hub.com/api/keywords
{
"keywords": [
{
"sourceID": null,
"keyword": "...",
"category": null,
"language": "...",
"translation": "...",
"description": null,
"isAmbiguous": false,
"isAmbiguousNote": "..."
},
{
"sourceID": null,
"keyword": "...",
"category": null,
"language": "...",
"translation": "...",
"description": null,
"isAmbiguous": false,
"isAmbiguousNote": "..."
},
...
]
}
{
"data": {
"keywords": [
{
"id": "af0cba51-ccc0-434f-a1b2-53906fdd4c74",
"isOwnKeyword": false,
"sourceID": null,
"keyword": "...",
"category": null,
"language": "...",
"translation": "...",
"description": null,
"isAmbiguous": false,
"isAmbiguousNote": "..."
},
...
]
}
}
This removes existing keywords. The keywords to remove are identified as matching if one of the following is true:
sourceID
fields matchkeyword
and
language
fields matchkeyword
fields match and the
language
field is empty
POST https://api.thorn-hub.com/api/keywords/remove
{
"keywords": [
{
"sourceID": "123"
},
{
"keyword": "abc",
"language": "abc"
},
{
"keyword": "xyz"
},
...
]
}
{
"success": true,
}
The GraphQL endpoint is located at:
POST https://api.thorn-hub.com/api
For your convenience, there is a visual GraphQL interface located at:
https://api.thorn-hub.com/api/graphiql
Please see the schema documentation for the full details about the available queries and mutations. You may also wish to use one of the available client libraries to interface with the GraphQL API.