🚀Projects

Create Project:

Create Project

POST https://api.arkangel.ai/api/projects

Request Body

Name
Type
Description

name*

String

The name with which you identify your project

modelType*

Num

Type of project, two options = 0: Classification, 1: Regression

typeExperiment*

String

Type of dataset

{
  "status": 201,
  "result": {
    "id": "{{ID}}",
    "name": "lung cancer screening",
    "typeExperiment": "data",
    "modelType": 0,
    "userId": "{{USER_ID}}",
    "createdAt": "2022-11-21T16:56:21.672Z",
    "updatedAt": "2022-11-21T16:56:21.672Z"
  }
}

Example request

import json
import requests

url = "https://api.arkangel.ai/api/projects"

# Create a dictionary
project = {}
# Create a dictionary key containing the name of experiment
project['name'] = "Texting experiment with bucket"
# Create a dictionary key containing the type of experiment: data or vision
project['typeExperiment'] = "vision"
# Create a dictionary key containing the model type of experiment:
project['modelType'] = 0   # 0: classification; 1: regression

# Convert dictionary to json
payload = json.dumps(project, indent=4)

# Obtain user's web token
headers = {
  'Authorization': 'Bearer {{TOKEN}}'
}
# Send the information created before and obtain response
response = requests.request("POST", url, headers=headers, data=payload)

# Print response
print(response.text)

Update project:

Update Project

PATCH https://api.arkangel.ai/api/projects

Request Body

Name
Type
Description

projectId

Num

{{PROJECT_ID}}

about

String

Calculate the probability of a patient suffering from cancer

costByPrediction

Num

1000

timeByPrediction

Num

8000

guestEmails

Array

["yourEmail@yourCompany.com"]

Example request

import requests

url = "https://api.arkangel.ai/api/projects"

# Create a dictionary
update_project = {}
# Create a dictionary key containing the project ID
update_project['projectId'] = "{{PROJECT_ID}}"
# Create a dictionary key containing a sentence that describes what the projects is about
update_project['about'] = "Calculate the probability of a patient suffering from cancer"
# Create a dictionary key containing the cost by prediction
update_project['costByPrediction'] = 1000
# Create a dictionary key containing the time by prediction
update_project['timeByPrediction'] = 8000
# Create a dictionary key containing the guest Emails
update_project['guestEmails'] = "test@email.com"

# Convert dictionary to json
payload = json.dumps(update_project, indent=4)

headers = {}
# Update the information created before of the project and obtain response
response = requests.request("PATCH", url, headers=headers, data=payload)

print(response.text)

List Project:

GET https://api.arkangel.ai/api/projects

{
    status: 200,
    result: [
        {
            "id": "{{PROJECT_ID}}",
            "name": "lung cancer screening",
            "about": "Calculate the probability of a patient suffering from cancer",
            "typeExperiment": "object_detection",
            "photo": null,
            "modelType": 0,
            "costByPrediction": 0,
            "timeByPrediction": 0,
            "guestEmails": [],
            "status": "done",
            "currentEpoch": 0,
            "totalEpochs": 0,
            "createdAt": "2022-07-12T13:25:03.736Z",
            "updatedAt": "2022-07-12T13:25:03.736Z",
        }
    ]
}

Example request

import requests

url = "https://api.arkangel.ai/api/projects"

payload={}

# Obtain user's web token
headers = {
  'Authorization': 'Bearer {{TOKEN}}'
}

# Configure the information created before of the project and obtain response
response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Project information

GET https://api.arkangel.ai/api/projects/{{PROJECT_ID}}

Path Parameters

Name
Type
Description

{{PROJECT_ID}}*

UUID

Project Id

{
    "id": "0b1b49e2-d889-40f5-97b5",
    "name": "kidney disease arkformat",
    "typeExperiment": "data",
    "modelType": 0,
    "costByPrediction": 0,
    "timeByPrediction": 0,
    "photo": null,
    "guestEmails": [
        "example@gmail.com"
    ],
    "icon": "icon0037",
    "about": "Esto es una descripcion",
    "userId": "f8166864-ced5-44c7-b4c6",
    "createdAt": "2023-04-19T16:14:59.277Z",
    "updatedAt": "2023-04-19T16:14:59.277Z",
    "isTemplate": false,
    "template": {},
    "availableImprove": true,
    "experiments": [
        {
            "labelCols": [
                "classification"
            ],
            "columnNames": [
                "Age",
                "Year",
                "Smoke"
            ],
            "status": "done",
            "trainingSpeed": "fast",
            "currentEpoch": 252,
            "totalEpochs": 252,
            "startedTraining": "2023-04-19T17:03:33.344Z",
            "endedTraining": "2023-04-19T17:18:36.865Z",
            "trainingData": 2000,
            "trainingHours": "0.1032",
            "validationData": 20,
            "testData": 28,
            "projectId": "0b1b49e2-d859-40f5",
            "createdAt": "2023-04-19T16:15:00.216Z",
            "updatedAt": "2023-04-19T16:15:00.216Z",
            "dataset": {
                "id": "a2996668-c29e-4032",
                "typeExperiment": "data"
            },
            "models": [
                {
                    "id": "45cb15d0-5209-48c6-810e",
                    "name": "DeepFullyConnectedNeuralNetwork_SGD_l1_dropoutTrue_numHiddenLayers12",
                    "status": "completed",
                    "inferenceSpeed": 3336.557,
                    "globalMetrics": {
                        "accuracy": 0.75,
                        "f1Score": 0.42857142857142855,
                        "precision": 0.375,
                        "recall": 0.5,
                        "specificity": 0.5,
                        "areaUnderCurve": 0.16326530612244897
                    },
                    "createdAt": "2023-04-19T17:18:36.874Z",
                    "updatedAt": "2023-04-19T17:18:36.874Z",
                    "labels": [
                        {
                            "confusionMatrix": [
                                [
                                    0,
                                    7
                                ],
                                [
                                    0,
                                    21
                                ]
                            ],
                            "id": "069bb381-8ea9-4377",
                            "nameStr": "classification",
                            "metrics": {
                                "accuracy": 0.75,
                                "f1Score": 0.42857142857142855,
                                "precision": 0.375,
                                "recall": 0.5,
                                "specificity": 0.5,
                                "areaUnderCurve": 0.16326530612244897
                            },
                            "maxValue": null,
                            "createdAt": "2023-04-19T17:18:36.874Z",
                            "updatedAt": "2023-04-19T17:18:36.874Z",
                            "classes": [
                                {
                                    "id": "973e61f9-ed83-4deb-8598",
                                    "labelStr": "ckd",
                                    "labelInt": 0,
                                    "f1Score": "0",
                                    "precision": "0",
                                    "recall": "0",
                                    "support": 7,
                                    "specificity": "1",
                                    "areaUnderCurve": "0.16326530612244894"
                                },
                                {
                                    "id": "d9132446-4eb9-4a9c-867b",
                                    "labelStr": "notckd",
                                    "labelInt": 1,
                                    "f1Score": "0.8571428571428571",
                                    "precision": "0.75",
                                    "recall": "1",
                                    "support": 21,
                                    "specificity": "0",
                                    "areaUnderCurve": "0.163265306122449"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ],
    "models": [
        {
            "id": "45cb15d0-5209-48c6-810e",
            "name": "DeepFullyConnectedNeuralNetwork_SGD_l1_dropoutTrue_numHiddenLayers12",
            "status": "completed",
            "inferenceSpeed": 3336.557,
            "globalMetrics": {
                "accuracy": 0.75,
                "f1Score": 0.42857142857142855,
                "precision": 0.375,
                "recall": 0.5,
                "specificity": 0.5,
                "areaUnderCurve": 0.16326530612244897
            },
            "createdAt": "2023-04-19T17:18:36.874Z",
            "updatedAt": "2023-04-19T17:18:36.874Z",
            "labels": [
                {
                    "confusionMatrix": [
                        [
                            0,
                            7
                        ],
                        [
                            0,
                            21
                        ]
                    ],
                    "id": "069bb381-8ea9-4377",
                    "nameStr": "classification",
                    "metrics": {
                        "accuracy": 0.75,
                        "f1Score": 0.42857142857142855,
                        "precision": 0.375,
                        "recall": 0.5,
                        "specificity": 0.5,
                        "areaUnderCurve": 0.16326530612244897
                    },
                    "maxValue": null,
                    "createdAt": "2023-04-19T17:18:36.874Z",
                    "updatedAt": "2023-04-19T17:18:36.874Z",
                    "classes": [
                        {
                            "id": "973e61f9-ed83-4deb-8598",
                            "labelStr": "ckd",
                            "labelInt": 0,
                            "f1Score": "0",
                            "precision": "0",
                            "recall": "0",
                            "support": 7,
                            "specificity": "1",
                            "areaUnderCurve": "0.16326530612244894"
                        },
                        {
                            "id": "d9132446-4eb9-4a9c-867b",
                            "labelStr": "notckd",
                            "labelInt": 1,
                            "f1Score": "0.8571428571428571",
                            "precision": "0.75",
                            "recall": "1",
                            "support": 21,
                            "specificity": "0",
                            "areaUnderCurve": "0.163265306122449"
                        }
                    ]
                }
            ]
        }
    ]
}

Example request

import requests

# Replace this with project ID
PROJECT_ID = '{{PROJECT_ID}}'
url = f"https://api.arkangel.ai/api/datasets/{PROJECT_ID}"

payload={}

# Obtain user's web token
headers = {
  'Authorization': 'Bearer {{TOKEN}}'
}
# Configure the information created before of the project and obtain response
response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Delete Project:

DELETE https://api.arkangel.ai/api/projects

Path Parameters

Name
Type
Description

PROJECT_ID*

String

Project Id

{
    status: 200,
    result: 'Project deleted'
}

Example request

import requests

# Replace this with project ID
PROJECT_ID = '{{PROJECT_ID}}'
url = f"https://api.arkangel.ai/api/datasets/{PROJECT_ID}"

payload={}

# Obtain user's web token
headers = {
  'Authorization': 'Bearer {{TOKEN}}'
}

# Delete the selected project
response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)

Last updated