🚀Projects
Last updated
Last updated
POST
https://api.arkangel.ai/api/projects
Name | Type | Description |
---|---|---|
{
"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"
}
}
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)
const token = "{{TOKEN}}";
const myHeaders = new Headers();
myHeaders.append("Authorization", `Bearer ${token}`);
myHeaders.append("Content-Type", "application/json");
const data = {
name: "Tenting experiment with bukcet",
typeExperiment: "data",
modelType: 0
};
const requestOptions = {
method: 'POST',
headers: myHeaders,
body: JSON.stringify(data),
redirect: 'follow'
};
fetch("https://api.arkangel.ai/api/projects", requestOptions)
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.log('error', error));
curl --location --request POST 'https://api.arkangel.ai/api/projects' \
--data-raw '{
"name": "Tenting experiment with bukcet",
"typeExperiment": "data",
"modelType": 0
}'
PATCH
https://api.arkangel.ai/api/projects
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)
const token = "{{TOKEN}}";
const projectId = "{{PROJECT_ID}}";
const myHeaders = new Headers();
myHeaders.append("Authorization", `Bearer ${token}`);
myHeaders.append("Content-Type", "application/json");
const data = {
projectId: projectId,
about: "Calculate the probability of a patient suffering from cancer",
costByPrediction: 1000,
timeByPrediction: 8000,
guestEmails: [
"example@gmail.com"
]
}
const requestOptions = {
method: 'PATCH',
headers: myHeaders,
body: JSON.stringify(data),
redirect: 'follow'
};
fetch("https://api.arkangel.ai/api/projects", requestOptions)
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.log('error', error));
curl --location --request PATCH 'https://api.arkangel.ai/api/projects' \
--data-raw '{
"projectId": "{{PROJECT_ID}}",
"about": "Calculate the probability of a patient suffering from cancer",
"costByPrediction": 1000,
"timeByPrediction": 8000,
"guestEmails": ["test@email.com"]
}'
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",
}
]
}
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)
const token = "{{TOKEN}}";
const myHeaders = new Headers();
myHeaders.append("Authorization", `Bearer ${token}`);
const requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.arkangel.ai/api/projects", requestOptions)
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.log('error', error));
curl --location --request GET 'https://api.arkangel.ai/api/projects' \
--header 'Authorization: Bearer {{TOKEN}}'
GET
https://api.arkangel.ai/api/projects/{{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"
}
]
}
]
}
]
}
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)
const token = "{{TOKEN}}";
const projectId = "{{PROJECT_ID}}"
const myHeaders = new Headers();
myHeaders.append("Authorization", `Bearer ${token}`);
const requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch(`https://api.arkangel.ai/api/projects/${projectId}`, requestOptions)
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.log('error', error));
curl --location --request GET 'https://api.arkangel.ai/api/projects/{{PROJECT_ID}}' \
--header 'Authorization: Bearer {{TOKEN}}'
DELETE
https://api.arkangel.ai/api/projects
{
status: 200,
result: 'Project deleted'
}
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)
const token = "{{TOKEN}}";
const projectId = "{{PROJECT_ID}}"
const myHeaders = new Headers();
myHeaders.append("Authorization", `Bearer ${token}`);
const requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch(`https://api.arkangel.ai/api/projects/${projectId}`, requestOptions)
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.log('error', error));
curl --location --request DELETE 'https://api.arkangel.ai/api/projects/{{PROJECT_ID}}' \
--header 'Authorization: Bearer {{TOKEN}}'
Name | Type | Description |
---|---|---|
{
"status": 200,
"result": {
"photo": null,
"id": "{{ID}}",
"name": "lung cancer screening",
"about": " the probability of a patient suffering from cancer",
"disabled": false,
"typeExperiment": "data",
"modelType": 0,
"costByPrediction": 1000,
"timeByPrediction": 8000,
"guestEmails": [
"test@email.com"
],
"userId": "{{USER_ID}}",
"createdAt": "2022-11-21T16:56:21.672Z",
"updatedAt": "2022-11-21T16:56:21.672Z"
}
}
Name | Type | Description |
---|---|---|
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
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"]
{{PROJECT_ID}}*
UUID
Project Id
PROJECT_ID*
String
Project Id