Create custom attributes

Prev Next

Available in VPC

Create a profile of custom attributes.

When you request to create a profile, the creation process will proceed according to the following sequence.

Order Creation status Description
Step 1 registered: registered Status where the creation job is registered in the NCLUE system
Step 2 pending: pending Status where the creation job is queued in the system
Step 3 in_progress: creating Status where the creation job is running on the server
Step 4
  • complete: available
  • failed: failure
Status where the creation job has been completed
  • If the creation is successful, the status will be complete, and it can be used normally.
  • If the creation fails due to an error that occurred during the operation, the status will be failed and it can't be used.
Note

The duration of each job when creating a profile depends on the amount of data and service's available resources. To check the progress of the creation, call the Get custom attributes API and check the status field in the response body.

Request

This section describes the request format. The method and URI are as follows:

Method URI
POST /profile/custom-attributes

Request headers

For information about the headers common to all NCLUE APIs, see NCLUE request headers.

Request body

You can include the following data in the body of your request:

Field Type Required Description
name String Required Profile name
  • 1-100 characters
feature_id String Required Feature ID to apply for profiling
keyword_set String Required List of attribute keywords to check the similarity to the target user
  • Total keyword count within 1000 characters
  • Each keyword is separated by "\n".
  • Example: running\nrun\nmarathon
result_bucket String Required Name of the Object Storage bucket where the profiling result will be stored
result_file_path String Required File path in result_bucket to save profiling results
  • File paths containing the following special characters can't be entered.
    • &$@=;:+,?*\{}^%`[]<>~#|"'
    • Characters with ASCII codes 0-31 and 128-255
  • File name creation rule
    • If the input string ends with "/", it is considered a directory, and a file named "nclue_{random number}_{year-month-day-time}.tsv" is created inside the directory.
    • In all other cases, the input string is treated as the file name and a file named "{input string}_{random number}_{year-month-day-time}.tsv" is created.

Request example

The request example is as follows:

curl --location --request POST 'https://nclue.apigw.ntruss.com/api/v1/profile/custom-attributes' \
--header 'X-NCP-APIGW-TIMESTAMP: {Timestamp}' \
--header 'X-NCP-IAM-ACCESS-KEY: {Access Key}' \
--header 'X-NCP-APIGW-SIGNATURE-V2: {API Gateway Signature}' \
--data '{
    "name": "YOUR_PROFILE_NAME",
    "feature_id": "1be871f6-****-****-****-827671fa8fdb",
    "keyword_set": "Running\nrun\nmarathon\njogging\nrunning shoes\nrunning socks\nrunning app",
    "result_bucket": "YOUR_BUCKET_NAME",
    "result_file_path": "path/filename"
}'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
profile_id String - Profile ID
profile_name String - Profile name
feature_id String - Feature ID to profile
feature_name String - Feature name to profile
keyword_set String - Attribute keyword list
  • Each keyword is separated by a comma
created_at String - Profile creation request date and time (ISO 8601 format)
result_bucket String - Name of the Object Storage bucket where the profiling result will be stored
result_file_path String - File path in result_bucket where the profiling result will be stored

Response status codes

For response status codes common to NCLUE, see NCLUE response status codes.

Response example

The response example is as follows:

{
    "profile_id": "a7f4f996-****-****-****-b0531230e17e",
    "profile_name": "YOUR_PROFILE_NAME",
    "feature_id": "1be871f6-****-****-****-827671fa8fdb",
    "feature_name": "YOUR_FEATURE_NAME",
    "keyword_set": "Running, run, marathon, jogging, running shoes, running socks, running app",
    "created_at": "2024-11-26T17:25:42+09:00",
    "result_bucket": "YOUR_BUCKET_NAME",
    "result_file_path": "path/filename"
}