# API Reference

## Organisation



## Get data row

<mark style="color:blue;">`GET`</mark> `https://app.picsellia.com/api/V1/dataset/:dataset_id/:row_id`

Retrieve all the informations about an asset from one of your dataset

#### Path Parameters

| Name        | Type   | Description                                          |
| ----------- | ------ | ---------------------------------------------------- |
| dataset\_id | string | The Id of the dataset you want to retrieve data from |

#### Headers

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| API Token | string |             |

#### Request Body

| Name     | Type   | Description          |
| -------- | ------ | -------------------- |
| raw\_id  | string | id of the data       |
| filename | string | filename of the data |

{% tabs %}
{% tab title="200 " %}
```
{
    'id': '8e6487ae-6f23-4d62-8bdd-8c808894fbe1',
    'external_url': 'my_awesome_picture.jpg',
    'object_name': 'b5620ac0-cee8-4fd8-b81a-308657558848%5CPHOTO%20843.jpg'
    'type': 'image',
    'format': 'jpg',
    'size': 3.4,
    'import_date': '05-28-2020',
}
```
{% endtab %}
{% endtabs %}

## Projects

## Create project

<mark style="color:green;">`POST`</mark> `https://app.picsellia.com/api/v1/create_project`

Allows you to setup a whole project at once

#### Headers

| Name      | Type   | Description                                                           |
| --------- | ------ | --------------------------------------------------------------------- |
| API Token | string | Your personnal API token available in your profile settings/API token |

#### Request Body

| Name          | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type          | string  | 'classification' or 'detection' or 'segmentation' depending on the task                                                                                                                                                                                                                                                                                                                                        |
| team          | object  | <p>Dictionnary with the emails of accounts you want to add on your project and the desired roles. <br>If some of the emails doesn't exists, people will receive an invitation to join the platform and the project.<br><br>{ <br>    '1': {<br>         'email': 'joe.ford@xyz.com', <br>         'role': 'labeler' or 'reviewer' or 'manager'<br>    },<br>    '2': {<br>         ... <br>    }, ...<br>}</p> |
| description   | string  | The description of your project                                                                                                                                                                                                                                                                                                                                                                                |
| private       | boolean | Set it to True if you want your project to be private                                                                                                                                                                                                                                                                                                                                                          |
| labels        | object  | <p>{<br>    '1': {<br>        'label_name':  'label',<br>        'tool': 'rectangle' or 'polygon' or 'line' or 'point'<br>    },<br>    '2': {<br>        ...<br>    }, ...<br>}</p>                                                                                                                                                                                                                           |
| dataset\_name | string  | Name of the dataset you want to attach to your project (must be already created)                                                                                                                                                                                                                                                                                                                               |
| project\_name | string  | Must be different from your other project's names                                                                                                                                                                                                                                                                                                                                                              |

{% tabs %}
{% tab title="200 " %}
```
```
{% endtab %}
{% endtabs %}

## Get project list&#x20;

<mark style="color:blue;">`GET`</mark> `https://app.picsellia.com/api/v1/project_list`

Retrieve the list of your project names and ids

#### Headers

| Name      | Type   | Description              |
| --------- | ------ | ------------------------ |
| API Token | string | Your personnal API Token |

{% tabs %}
{% tab title="200 " %}
```
{
    '1': {
        'project_name': 'my_first_project',
        'id': 'e403f741-3672-4a7a-a39d-34e8be241dd2'
    },
    '2': {
        ...
    }
}    
```
{% endtab %}
{% endtabs %}

## Get project infos

<mark style="color:blue;">`GET`</mark> `https://app.picsellia.com/api/v1/project_infos/:project_id`

Retrieve all the informations about one of your project

#### Path Parameters

| Name        | Type   | Description                                                  |
| ----------- | ------ | ------------------------------------------------------------ |
| project\_id | string | The id of the project you want to retrieve informations from |

#### Headers

| Name      | Type   | Description              |
| --------- | ------ | ------------------------ |
| API Token | string | Your personnal API Token |

{% tabs %}
{% tab title="200 " %}
```
{
    'id': 'e403f741-3672-4a7a-a39d-34e8be241dd2',
    'project_name': 'my_first_project',
    'type': segmentation,
    'dataset': {
        'dataset_id': 'a0c2b65f-6e25-445d-a423-22b7ff69f664',
        'dataset_name': 'awesome_planes'
    },
    'labels': {
        '1': {
            'label_name':  'plane',
            'tool': 'polygon'
        },
        '2': {
            'label_name':  'bird',
            'tool': 'polygon'
        }
    },
    'collaborators': {
        '1': {
            'email': 'john.doe@picsellia.com',
            'role': 'admin'
        },
    },
    'models': {
        '1': {
            'model_id': '3c36ba70-faa7-41bf-b17e-d2727d30edc0',
            'model_name': 'MaskR-CNN_plane_detection'
        },
    }
    'metrics': {
        'nb_annotations': 13200,
    }
}
```
{% endtab %}
{% endtabs %}

## Update project infos

<mark style="color:orange;">`PUT`</mark> `https://app.picsellia.com/api/v1/project_infos/:project_id`

Update the informations (project name, description) of one of your projects

#### Path Parameters

| Name        | Type   | Description                              |
| ----------- | ------ | ---------------------------------------- |
| project\_id | string | The ID of the project you want to update |

#### Headers

| Name      | Type   | Description              |
| --------- | ------ | ------------------------ |
| API Token | string | Your personnal API Token |

#### Request Body

| Name          | Type   | Description                                 |
| ------------- | ------ | ------------------------------------------- |
| description   | string | The description of your project             |
| project\_name | string | The project\_name you want for your project |

{% tabs %}
{% tab title="200 " %}
```
```
{% endtab %}
{% endtabs %}

## Get project collaborators

<mark style="color:blue;">`GET`</mark> `https://app.picsellia.com/api/v1/project_collaborators/:project_id`

Retrieve the list of collaborators for a given project

#### Headers

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| API Token | string |             |

{% tabs %}
{% tab title="200 " %}
```
{
    '1': {
        'email': 'john.doe@picsellia.com',
        'username': 'the_john',
        'role': 'manager',
        'date_joigned': '12-06-2020'
    },
    '2': {
        'email': 'gina@picsellia.com',
        'username': 'gina',
        'role': 'reviewer',
        'date_joigned': '14-06-2020'
    },
}
```
{% endtab %}
{% endtabs %}

## Update project collaborators

<mark style="color:orange;">`PUT`</mark> `https://app.picsellia.com/api/v1/project_collaborators/:project_id`

Update the list of collaborators on a given project

#### Path Parameters

| Name        | Type   | Description            |
| ----------- | ------ | ---------------------- |
| project\_id | string | The Id of your project |

#### Headers

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| API Token | string |             |

#### Request Body

| Name          | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| collaborators | object | <p>An object containing the updated list of collaborators for this project.<br>{ <br>    '1': { <br>        'email': 'john.doe@picsellia.com',<br>        'role': 'admin'<br>    }, <br>    '2': { <br>        'email': 'gina@picsellia.com', <br>        'role': 'reviewer' <br>    }, <br>    '3': { <br>        'email': 'emma@picsellia.com',<br>        'role': 'manager'<br>     },<br>}<br>    </p> |

{% tabs %}
{% tab title="200 " %}
```
```
{% endtab %}
{% endtabs %}

## Update project labels

<mark style="color:orange;">`PUT`</mark> `https://app.picsellia.com/api/v1/project_labels/:project_id`

Update the label list of a given project

#### Path Parameters

| Name        | Type   | Description            |
| ----------- | ------ | ---------------------- |
| project\_id | string | The Id of your project |

#### Headers

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| API Token | string |             |

#### Request Body

| Name   | Type   | Description                                                                                                                                                                                                                                                                                                                                                     |
| ------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| labels | object | <p>An object containing the updated list of your project's labels.<br>{ <br>    '1': {<br>        'label_name': 'plane', <br>        'type': 'polygon'  <br>    }, <br>   '1': { <br>        'label_name': 'bird', <br>        'type': 'polygon'<br>   },<br>   '3': {<br>        'label_name': 'wind-turbine',<br>        'type': 'polygon'<br>    },<br>}</p> |

{% tabs %}
{% tab title="200 " %}
```
```
{% endtab %}
{% endtabs %}

## Set project automations

<mark style="color:orange;">`PUT`</mark> `https://app.picsellia.com/api/v1/project_auto/:project_id`

Attach the labels of your project to the labelmap of a chosen pre-trained network to enable the 'pre-annotation' in our annotation interface (The default network is Mask R-CNN trained on COCO).

#### Path Parameters

| Name        | Type   | Description            |
| ----------- | ------ | ---------------------- |
| project\_id | string | The Id of your project |

#### Headers

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| API Token | string |             |

#### Request Body

| Name      | Type   | Description                                                                                                                                                                                                                                                                                       |
| --------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| model\_id | string | The Id of the pre-trained model you want to associate your labels to.                                                                                                                                                                                                                             |
| labels    | object | <p>An object containing the list of your project's labels and the associated pre-annotation label.<br>{<br>    '1': {<br>        'label_name': 'plane',<br>        'link_with': 'plane'<br>    },<br>    '2': {<br>        'label_name': 'bird',<br>        'link_with': 'bird'<br>    }<br>}</p> |

{% tabs %}
{% tab title="200 " %}
```
```
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
The model that you want to associate to your labels must be already attached to your project !

See **Attach a model to my project**
{% endhint %}

## Set project Questions & Answers

<mark style="color:orange;">`PUT`</mark> `https://app.picsellia.com/api/v1/project_qa/:project_id`

Allows you to setup the Questions & Answers feature for your project. \
There is 4 different type of answers available : \
&#x20;   \- **Text answer** : The user will answer the question via a text input\
&#x20;   \- **Value selection answer** : The user will answer the question by choosing a value in a selection menu\
&#x20;   \- **Multiple Choice answer** : The user will answer the question by checking some checkboxes\
&#x20;   \- **Range answer** : The user will answer the question by moving a cursor in the desired range\
You can setup an **image-level Q\&A**, which means that the questions are asked relatively to the image, and you can also set **shape-level Q\&A** where every question will be asked for each drawn shapes.

#### Path Parameters

| Name        | Type   | Description            |
| ----------- | ------ | ---------------------- |
| project\_id | string | The Id of your project |

#### Headers

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| API Token | string |             |

#### Request Body

| Name      | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| --------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| shape\_qa | object | Same as image\_qa but will be asked for every shapes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| image\_qa | object | <p>The image level Q&#x26;A<br>{<br>    '1': {<br>        'question': 'What is the person doing ?',<br>        'type': 'text'<br>    },<br>    '2': {<br>        'question': 'How many people are in the image ?',<br>        'type': 'range',<br>        'min': 0,<br>        'max': 50<br>    }<br>    '3': {<br>        'question': 'Level of brightness ?',<br>        'type': 'choice',<br>         'values': [0,1,2,3,4]<br>    }<br>    '4': {<br>        'question': 'What emotions is the most probable?',<br>        'type': 'mc',<br>        'values': ['sadness','anger','happiness','surprise','joy']<br>    }<br>}<br></p> |

{% tabs %}
{% tab title="200 " %}
```
```
{% endtab %}
{% endtabs %}

## Get project stats

<mark style="color:blue;">`GET`</mark> `https://app.picsellia.com/api/v1/project_stats/:project_id`

Retrieve the current state and statistics of a given project

#### Path Parameters

| Name        | Type   | Description            |
| ----------- | ------ | ---------------------- |
| project\_id | string | The Id of your project |

#### Headers

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| API Token | string |             |

{% tabs %}
{% tab title="200 " %}
```
{
    "labels": ["motor", "bus", "awning-tricycle", "tricycle", "truck", "van", "car", "bicycle", "people", "pedestrian", "others"], 
    "label_variance": 43.3, 
    "predicted_time": 0, 
    "time_per_image": [3, 17, 11, 14, 21, 3, 24, 3, 1, 15, 6, 22, 7, 16, 3, 7, 5, 23], 
    "assets_per_image": [127.0, 77.0, 48.0, 115.0, 113.0, 140.0, 115.0, 136.0, 164.0, 31.0], 
    "images_remaining": 0, 
    "total_time_spent": "", 
    "labels_per_classe": [1637.0, 20.0, 204.0, 266.0, 111.0, 286.0, 2144.0, 214.0, 1830.0, 2329.0, 6.0], 
    "nb_images_annotated": 150, 
    "average_time_by_image": 239.6, 
    "mean_assets_per_images": 60.31333333333333, 
    "percentage_advancement": 100, 
    "total_labels_submitted": 9047
}
```
{% endtab %}
{% endtabs %}

## Attach model to project

<mark style="color:green;">`POST`</mark> `https://app.picsellia.com/api/v1/attach_model/project_id/model_id`

Attach a CNN model to your project to perform transfert learning of&#x20;

#### Path Parameters

| Name        | Type   | Description        |
| ----------- | ------ | ------------------ |
| model\_id   | string | id of your model   |
| project\_id | string | id of your project |

{% tabs %}
{% tab title="200 " %}
```
"Model attached"
```
{% endtab %}

{% tab title="202 " %}
```
"Model already attached"
```
{% endtab %}
{% endtabs %}

## Delete project

<mark style="color:red;">`DELETE`</mark> `https://app.picsellia.com/api/v1/delete_project/project_id`

Delete a project&#x20;

#### Path Parameters

| Name        | Type   | Description       |
| ----------- | ------ | ----------------- |
| project\_id | string | id of the project |

{% tabs %}
{% tab title="200 " %}
```
"Project deleted"
```
{% endtab %}

{% tab title="401 " %}
```
"You don't have the permission to delete this project"
```
{% endtab %}
{% endtabs %}

## Detach model from project

<mark style="color:orange;">`PUT`</mark> `https://app.picsellia.com/api/v1/delete_project/project_id/model_id`

Detach a model from a project

#### Path Parameters

| Name        | Type   | Description       |
| ----------- | ------ | ----------------- |
| model\_id   | string |                   |
| project\_id | string | id of the project |

{% tabs %}
{% tab title="200 " %}
```
"Model detached"
```
{% endtab %}
{% endtabs %}

## Check connection

<mark style="color:blue;">`GET`</mark> `https://app.picsellia.com/sdk/check_connection`

This endpoint allows you to check connection with our Backend and assert your Token is valid.

{% tabs %}
{% tab title="201 Connection successfully instantiated" %}
```
{"project_id": (uuid) id of the project}
```
{% endtab %}

{% tab title="400 Could not find matching project for this token" %}
```
{"message": "Invalid Token"}
```
{% endtab %}
{% endtabs %}

<mark style="color:blue;">`GET`</mark>&#x20;

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
|      | string |             |

{% tabs %}
{% tab title="200 " %}
```
```
{% endtab %}
{% endtabs %}

## Models

## Get model list

<mark style="color:blue;">`GET`</mark> `https://app.picsellia.com/api/v1/models_list`

Retrieve the list of all the models attached to a project or created where you are manager level&#x20;

#### Request Body

| Name | Type   | Description                                           |
| ---- | ------ | ----------------------------------------------------- |
|      | string | Name of your model or desired name for model creation |

{% tabs %}
{% tab title="200 " %}
```
{
        '0': {
            'model_id' : id
            'model_name':  'Awesome model',
            'model_type': 'classification', 'segmentation', 'detection',
            'tags' : ["...", "...", "coco"]
            'used_in': {
                  '0': {
                  'project_id': id,
                  'project_name': 'Awesome model',
                  'project_type': 'classification', 'segmentation', 'detection',
                  },
                  '1': {
                  ...
                  }
            },
            'predictable' : True or False,
            'trainable' : True or False,
            },
            
        '1': {
            ...
        }
    
    
}
```
{% endtab %}

{% tab title="202 " %}
```
"No AI models created by you of your collaborators"
```
{% endtab %}
{% endtabs %}

## Delete a Model

<mark style="color:red;">`DELETE`</mark> `https://app.picsellia.com/api/v1/delete_model/model_id`

#### Path Parameters

| Name      | Type   | Description     |
| --------- | ------ | --------------- |
| model\_id | string | id of the model |

{% tabs %}
{% tab title="200 " %}
```
"Model deleted"
```
{% endtab %}

{% tab title="401 " %}
```
"You are not allowed to delete this network"
```
{% endtab %}
{% endtabs %}

## Get model infos

<mark style="color:blue;">`GET`</mark> `https://app.picsellia.com/api/v1/model_infos/model_id`

#### Path Parameters

| Name      | Type   | Description     |
| --------- | ------ | --------------- |
| model\_id | string | id of the model |

{% tabs %}
{% tab title="200 " %}
```
{'model_id' : id,
 'model_name': name,
 'model_type': type,
 'tags': [ "..", "...", ],
 'description': '...',
 'private' : True or False,
 'trainable': True of False,
 'predicatble': True of False,
 'paper_link' :'',
 'github_link': '',
 'performances': {
 
             ...
                 },
 'labels' : {
 ...
 }
 'used_in': { 
             '0' : {
               'project_id' : id,
               'project_name': name,
               },
             '1' : {
             
             ...
             
             },
             },
 }'
           
             
```
{% endtab %}
{% endtabs %}

## Update model infos&#x20;

<mark style="color:orange;">`PUT`</mark> `https://app.picsellia.com/api/v1/model_infos/model_id`

#### Path Parameters

| Name      | Type   | Description     |
| --------- | ------ | --------------- |
| model\_id | string | id of the model |

#### Request Body

| Name         | Type    | Description                                  |
| ------------ | ------- | -------------------------------------------- |
|              | string  |                                              |
| github\_link | string  | git repo of your model                       |
| paper\_link  | string  | scientific paper link of the model           |
| private      | boolean | set True for private model, false for public |
| tags         | array   | array of tags in string format               |
| description  | string  | description of the model                     |
| model\_name  | string  | new\_name of the model                       |

{% tabs %}
{% tab title="200 " %}
```
```
{% endtab %}
{% endtabs %}

## Delete experiment

<mark style="color:red;">`DELETE`</mark> `https://app.picsellia.com/api/v1/delete_experiments/project_id/model_id/training_id`

Method to delete a version of an experiment

#### Path Parameters

| Name         | Type    | Description           |
| ------------ | ------- | --------------------- |
| project\_id  | string  | id of the project     |
| training\_id | integer | id of the experiments |
| model\_id    | string  | id of the model       |

{% tabs %}
{% tab title="200 " %}
```
```
{% endtab %}
{% endtabs %}

## Annotations

## A range of annotation

<mark style="color:blue;">`GET`</mark> `https://app.picsellia.com/api/v1/annotations/project_id`

This allow you to retrieve annotations for a range of images.

#### Path Parameters

| Name        | Type   | Description       |
| ----------- | ------ | ----------------- |
| project\_id | string | id of the project |

#### Request Body

| Name  | Type  | Description               |
| ----- | ----- | ------------------------- |
| range | array | desired range ( \[0, 15]) |

{% tabs %}
{% tab title="200 " %}
```
 { 
 '0': {
      "internal_picture_id": (uuid) id of the related image,
      "nb_labels": (int) nb of objects in the pic,
      "time_spent": (float) time spend to annotate the pic in sec,
      "QandA" :  {
      
      }
      "annotations": (list(dic))
       [
         {
           "type": (str) type of label -> rectangle/polygon
           "label": (str) label given to shape,
           "polygon": {"geometry": [{"x": (int) x, "y": (int) y}, ...,]
              # each dict in geometry is a point of the polygon
                # if no polygon have been done, list is empty
           "rectangle": {
                         "height": (int) h,
                         "width": (int) w,
                         "top": (int) x,
                         "left": (int) y,
                       }
          },
         ...,
      ]
   },
   
    '1' : {
    
     ...
     
      },
   } 
```
{% endtab %}

{% tab title="400 " %}
```
{"message": "Invalid Token"}
```
{% endtab %}
{% endtabs %}

## annotations

<mark style="color:green;">`POST`</mark> `https://app.picsellia.com/sdk/upload_annotations`

#### Request Body

| Name   | Type   | Description                          |
| ------ | ------ | ------------------------------------ |
| format | string | format type ("picsellia" of "other") |

{% tabs %}
{% tab title="201 " %}
```
{"message": "Annotation uploaded"}
```
{% endtab %}

{% tab title="400 " %}
```
{"message": "Annotations already exists"}
```
{% endtab %}
{% endtabs %}

## Training logs

<mark style="color:green;">`POST`</mark> `https://app.picsellia.com/sdk/post_logs`

The endpoints allow you to post the repartition of your train test ensemble to visualize it on the Platform.

#### Request Body

| Name         | Type    | Description                                 |
| ------------ | ------- | ------------------------------------------- |
| training\_id | integer | version of your experiments                 |
| network\_id  | string  | id of your network                          |
| logs         | object  | (dict) logs from tfevents converted to dict |

{% tabs %}
{% tab title="201 " %}
```
{"message" : "Metrics saved"}
```
{% endtab %}

{% tab title="400 " %}
```
{"message" : "Token doesn't exists"}
```
{% endtab %}
{% endtabs %}

## Preview results

<mark style="color:green;">`POST`</mark> `https://app.picsellia.com/sdk/post_preview`

This endpoint allow you to post visual results of your experiments

#### Request Body

| Name         | Type    | Description                       |
| ------------ | ------- | --------------------------------- |
| training\_id | integer | version of your experiments       |
| network\_id  | string  | id of your Model                  |
| urls         | array   | (str) url to your example results |

{% tabs %}
{% tab title="200 " %}
```
```
{% endtab %}
{% endtabs %}

### Dataset

## Create Dataset

<mark style="color:green;">`POST`</mark> `https://app.picsellia.com/api/v1/create_dataset`

API endpoint to create a Dataset

#### Request Body

| Name          | Type    | Description                        |
| ------------- | ------- | ---------------------------------- |
| private       | boolean | True for private, False for Public |
| description   | string  | Description of the Dataset         |
| dataset\_name | string  | Desired name of the dataset        |

{% tabs %}
{% tab title="200 " %}
```
{"dataset_id": id}p
```
{% endtab %}
{% endtabs %}

## Get dataset list

<mark style="color:blue;">`GET`</mark> `https://app.picsellia.com/api/v1/dataset_list`

Get the list of all the dataset of the project you are working on&#x20;

#### Headers

| Name  | Type   | Description |
| ----- | ------ | ----------- |
| token | string | Auth token  |

{% tabs %}
{% tab title="200 " %}
```
{
   '0': {
    'dataset_id': id,
    'dataset_name': 'my awesome dataset',
    'dataset_size': 1000,
    'created_by': 'Username',
    'description': 'bla bla bla',
    'used_in': {
       '0': {
            'project_id': id,
            'project_name': 'awesome project 1',
            'project_type': 'classification', ' 
             }
    },
   },
   '1': {
      ...
   }
}
```
{% endtab %}
{% endtabs %}

## Dataset infos

<mark style="color:blue;">`GET`</mark> `https://app.picsellia.com/api/v1/dataset_info/dataset_id`

Retrieve the information related to a dataset

#### Path Parameters

| Name        | Type   | Description       |
| ----------- | ------ | ----------------- |
| dataset\_id | string | id of the dataset |

{% tabs %}
{% tab title="200 " %}
```
{ "dataset_id": id,
  "dataset_name": "awesome dataset",
  "dataset_size": 1000,
  "description": "bla bla bla",
  "used_in": {
    "0": {
    "project_id": id,
    "project_name": "awesome project",
    },
    "1" : {
      ...
      },
    },
}
```
{% endtab %}
{% endtabs %}

## Update dataset infos

<mark style="color:orange;">`PUT`</mark> `https://app.picsellia.com/api/v1/dataset_info/dataset_id`

Update dataset infos

#### Path Parameters

| Name        | Type   | Description       |
| ----------- | ------ | ----------------- |
| dataset\_id | string | id of the dataset |

#### Request Body

| Name          | Type   | Description     |
| ------------- | ------ | --------------- |
| description   | string | new description |
| dataset\_name | string | new name        |

{% tabs %}
{% tab title="200 " %}
```
"Info updated"
```
{% endtab %}
{% endtabs %}

## Delete Dataset

<mark style="color:red;">`DELETE`</mark> `https://app.picsellia.com/api/v1/dataset/dataset_id`

#### Path Parameters

| Name        | Type   | Description                 |
| ----------- | ------ | --------------------------- |
| dataset\_id | string | id of the dataset to delete |

{% tabs %}
{% tab title="200 " %}
```
```
{% endtab %}
{% endtabs %}

## Retrieve info of a range of raw data

<mark style="color:blue;">`GET`</mark> `https://app.picsellia.com/api/v1/raw_data/dataset_id`

#### Path Parameters

| Name        | Type   | Description       |
| ----------- | ------ | ----------------- |
| dataset\_id | string | id of the dataset |

#### Request Body

| Name  | Type  | Description                                      |
| ----- | ----- | ------------------------------------------------ |
| range | array | range of index to retrieve (\[0:50]) for example |

{% tabs %}
{% tab title="200 " %}
```
{
    "0" : {
    "id": id of the raw data,
    "external_url": url,
    "shape": [x,y],
          },
          
    "1" : {
       ...
    },
    
    ...
    
  }
```
{% endtab %}
{% endtabs %}

## Raw data

<mark style="color:red;">`DELETE`</mark> `https://app.picsellia.com/api/v1/raw_data/dataset_id`

you can delete a raw data either by providing its filename of the id of the datat

#### Path Parameters

| Name        | Type   | Description    |
| ----------- | ------ | -------------- |
| dataset\_id | string | id of the data |

#### Request Body

| Name     | Type   | Description                   |
| -------- | ------ | ----------------------------- |
| filename | string | name of the picture to delete |
| raw\_id  | string | id of the raw data            |

{% tabs %}
{% tab title="200 " %}
```
```
{% endtab %}
{% endtabs %}
