Skip to main content

Projects

Run in Postman

Projects are where you can manage training examples and models for a chosen set of languages. For example, when if are working on an automatic email response classification mechanism in four languages, you would create a project called Email Response Classification in the four languages you want. In this article we will pick a use-case and walk you through the whole process.

Prerequisites

Make sure to follow Getting Started to log in and install the Language Understanding service. If you are using APIs, save your authorization token in a variable called AUTHORIZATION_TOKEN before moving ahead.

Create Project

To create a project you will need to specify a project name and the language you want in the project. In this example we will create a project called Companion Bot in English. We will continue the same example in the following sections and pages.

curl --location --request POST 'https://platform.neuralspace.ai/api/nlu/v1/project' \
--header 'Accept: application/json, text/plain, */*' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header "Authorization: ${AUTHORIZATION_TOKEN}" \
--data-raw '{
"projectName": "Companion Bot",
"language":["en"]
}'

Every project has a unique project ID associated with it. This API returns that ID along with other project related attributes.

You will find a list of supported languages here

List Projects

Pagination API

Use this API to list your projects and their attributes. You can also filter projects by search keyword or languages. Here we are filtering by keyword Companion and language en, which is English.

curl --location --request POST 'https://platform.neuralspace.ai/api/nlu/v1/list/projects' \
--header "Authorization: ${AUTHORIZATION_TOKEN}" \
--header 'Content-Type: application/json' \
--data-raw '{
"search": "Companion",
"pageNumber": 1,
"pageSize": 20,
"languages": ["en"]
}'

This is a pagination API, hence, pageSize determines how many projects to retrieve and pageNumber determines which page to fetch.

Get Single Project API

To get attributes of a single project

PROJECT_ID="YOUR-PROJECT-ID"
LANGUAGE="LANGUAGE"

curl --location --request GET "https://platform.neuralspace.ai/api/nlu/v1/project?projectId=${PROJECT_ID}&language=${LANGUAGE}" \
--header 'Accept: application/json, text/plain, */*' \
--header "Authorization: ${AUTHORIZATION_TOKEN}"

Update Project

Use the following API to update project name and number of training jobs. To know more about training jobs, check out Train Model

curl --location --request PUT 'https://platform.neuralspace.ai/api/nlu/v1/project' \
--header 'Accept: application/json, text/plain, */*' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header "Authorization: ${AUTHORIZATION_TOKEN}" \
--data-raw "{
\"projectId\": \"${PROJECT_ID}\",
\"projectName\":\"Companion Bot New\",
\"noOfTrainingJob\": 3
}"

Delete Projects

Delete Single Project

Delete a project using its unique project ID
curl --location --request DELETE "https://platform.neuralspace.ai/api/nlu/v1/single/project?projectId=${PROJECT_ID}" \
--header 'Accept: application/json, text/plain, */*' \
--header "authorization: ${AUTHORIZATION_TOKEN}"