Gathering parameters
Information on topics and models.
Listing available topics
Before coding against a topic (classification), you must confirm that the topic is supported by the application. You will also need to record its corresponding uriName for further calls to the API.
Request syntax
GET /v1/topics HTTP/1.1
Host: string
Content-type: application/json
Authorization: stringURI request parameters
The request does not use any URI parameters.
Request body
The request does not have a request body.
Response syntax
HTTP/1.1 200 OK
Content-type: application/json
[
{
"uriName": "string",
"fullName": "string"
}
]Response elements
If the action is successful, the service sends back an HTTP 200 response. The API returns an array of Topic objects representing all the coding topics currently supported by the API.
Errors
For information about errors selecting topics, see Errors and suggested actions.
Example
| Sample request | |
|---|---|
| Sample response | |
Getting the input format for the latest model for a topic
Different models are coded against different input formats. If you are using the latest (default) model for your specified topic, you can get the input format via the following mechanism.
If you are using another model, the input format will be provided as part of the list of available models.
Request syntax
GET /v1/topics/{topic}/models/latest HTTP/1.1
Host: string
Content-type: application/json
Authorization: string| topic | The uriName for the coding topic of interest. This can be acquired by listing the available topics. Required: Yes |
|---|
Request body
The request does not have a request body.
Response syntax
HTTP/1.1 200 OK
Content-type: application/json
{
"modelId": "string",
"modelVersion": number,
"modelReleaseDate": "string",
"modelType": "string",
"inputFormat": [
"string"
],
"topicStandard": "string",
"topicVersion": "string"
}Response elements
If the action is successful, the service sends back an HTTP 200 response. The API returns a Model object representing the latest model for the given topic, which includes the expected input format.
Errors
For information about errors selecting models, see Errors and suggested actions.
Example
Getting the latest occupation model:
| Sample request | |
|---|---|
| Sample response | |
Listing available models for a given topic
To code against a specific machine learning model, you can browse the available models and their input formats by calling this endpoint.
Request syntax
GET /v1/topics/{topic}/models HTTP/1.1
Host: string
Content-type: application/json
Authorization: string| topic | The uriName for the coding topic of interest. This can be acquired by listing the available topics. Required: Yes |
|---|
Request body
The request does not have a request body.
Response syntax
HTTP/1.1 200 OK
Content-type: application/json
[
{
"modelId": "string",
"modelVersion": number,
"modelReleaseDate": "string",
"modelType": "string",
"inputFormat": [
"string"
],
"topicStandard": "string",
"topicVersion": "string"
}
]Response elements
If the action is successful, the service sends back an HTTP 200 response. The API returns either a SynchronousCodeResponse object or an array of SynchronousCodeResponse objects corresponding to the input records.
Errors
For information about errors selecting models, see Errors and suggested actions.
Example
Listing all ANZSCO models:
| Sample request | |
|---|---|
| Sample response | |