Aggregate User Info
Node Backend APINBA Aggregate
Retrieves aggregated user information based on the provided alias. This endpoint provides a comprehensive overview of a user's completed and ongoing courses and projects, as well as their roles as creator or manager.
X-API-Key<token>
API Key for authentication. Example: "YOUR_API_KEY"
In: header
Aggregate User Info Request Body - Contains the alias of the user for whom to retrieve information.
alias?string
Response Body
curl -X POST "https://andamio-api-308006323670.us-central1.run.app/api/v1/node-backend-api/aggregate/user-info" \
-H "Content-Type: application/json" \
-d '{}'
const body = JSON.stringify({})
fetch("https://andamio-api-308006323670.us-central1.run.app/api/v1/node-backend-api/aggregate/user-info", {
body
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://andamio-api-308006323670.us-central1.run.app/api/v1/node-backend-api/aggregate/user-info"
body := strings.NewReader(`{}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://andamio-api-308006323670.us-central1.run.app/api/v1/node-backend-api/aggregate/user-info"
body = {}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.net.http.HttpRequest.BodyPublishers;
var body = BodyPublishers.ofString("""{}""");
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("https://andamio-api-308006323670.us-central1.run.app/api/v1/node-backend-api/aggregate/user-info"))
.header("Content-Type", "application/json")
.POST(body)
.build();
try {
HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Response body: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;
var body = new StringContent("""
{}
""", Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.PostAsync("https://andamio-api-308006323670.us-central1.run.app/api/v1/node-backend-api/aggregate/user-info", body);
var responseBody = await response.Content.ReadAsStringAsync();
{
"alias": "user_alias",
"courses": {
"completed": [
{
"completed_assignments": [
"[\"assignment_hash_1\"",
" \"assignment_hash_2\"]"
],
"policy": "course_policy_id_1"
}
],
"ongoing": [
{
"policy": "course_policy_id_2"
}
]
},
"creator": [
"[\"creator_id_1\"]"
],
"manager": [
"[\"manager_id_1\"]"
],
"projects": {
"completed": [
{
"completed_tasks_hashes": [
"[\"task_hash_1\"",
" \"task_hash_2\"]"
],
"policy": "project_policy_id_1"
}
],
"ongoing": [
{
"commitment": {
"project": {
"expirationTime": 0,
"lovelaceAmount": 0,
"projectContent": "string",
"tokens": [
[
null
]
]
},
"status": "Committed",
"submitted_info": "Some submitted info",
"task_hash": "task_hash_4"
},
"completed_tasks_hashes": [
"[\"task_hash_3\"]"
],
"policy": "project_policy_id_2"
}
]
},
"userInfo": "User details string"
}
{
"details": "string",
"message": "Bad Request: Invalid input.",
"statusCode": 400
}
{
"details": "string",
"message": "Unauthorized: Invalid or missing credentials.",
"statusCode": 401
}
{
"details": "string",
"message": "Forbidden: Insufficient permissions or tier access.",
"statusCode": 403
}
{
"details": "string",
"message": "Unprocessable Entity: Invalid request structure or data.",
"statusCode": 422
}
{
"details": "string",
"message": "Too Many Requests: Rate limit or quota exceeded.",
"statusCode": 429
}
{
"details": "string",
"message": "Internal Server Error: An unexpected error occurred.",
"statusCode": 500
}