*Base URL:** <https://app.nanonets.com>

File Assignment

Endpoint

POST /api/v2/team/members/model/{model_id}/assign/files

Description

This endpoint allows you to assign a file within a specified model. This is useful in cases where you want to assign specific files to specific users.

Request Parameters

  • model_id (string, required): The unique identifier of the model that the file belongs to.
  • file_id (string, required): The unique identifier of the file you want to export. You can locate this ID on the extract data page associated with the model.
  • member_email (string, required): The email_id of the team member to which the file needs to be assigned.

Sample Request:

curl:

curl --location 'https://app.nanonets.com/api/v2/team/members/model/{model_id}/assign/files' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic {API_KEY}' \
--data-raw '{
    "member": "{member_email}",
    "file_ids": ["{file_ids}"]
}'

Python:

import requests
import json

url = "https://app.nanonets.com/api/v2/team/members/model/{model_id}/assign/files"

payload = json.dumps({
  "member": "{member_email}",
  "file_ids": [
    "{file_ids}"
  ]
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Basic {API_KEY}'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)