https://github.com/ai4os/ai4-prov-api

Backend for the provenance component

https://github.com/ai4os/ai4-prov-api

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Backend for the provenance component

Basic Info
  • Host: GitHub
  • Owner: ai4os
  • License: apache-2.0
  • Language: Java
  • Default Branch: main
  • Homepage:
  • Size: 120 KB
Statistics
  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • Open Issues: 1
  • Releases: 1
Created almost 2 years ago · Last pushed 11 months ago
Metadata Files
Readme License

README.md

ai4eosc-prov-api

Provenance API is the core component of the provenance service within the AI4OS-HUB platform. The platform collects all provenance information related to a module or project and stores it in a postgreSQL database using a structured format based on JSON fragments.

When provenance data is requested in RDF format, the platform reconstructs the provenance RDF by applying the rules defined in a RML (RDF Mapping Language) file (executed by the RML engine, carml) over the stored JSON fragments.

API BASIC Endpoints

POST /meta-data

Uploads meta-data of a module to the provenance database.

Body of the HTTP POST { "sources": { "applicationId": "<application-id>", "jenkinsWorkflow": { "name": "<application-id (in jenkins)>", "group": "<jenkins-group>", "branch": "<jenkins-branch>", "build": <jenkins-build-number> } }, "credentials": { ... } }

In the body you can specify * applicationId: the application you want to fetch metadata from * jenkinsWorkflow: the jenkins workflow of the application * (name, group, branch, build): fields to select which workflow of jenkins you want to select * credentials, in case you're application have some metadata stored in a service with restricted access. you have to write here the credentials that provenance api will use for login in to that service. For example for MLFlow, you will have to write: ``` { ...

"credentials": { "mlflow": { "username": "", "password": "" } } } ```

Provenance API can access to https://mlflow.cloud.ai4eosc.eu and to http://mlflow.cloud.imagine-ai.eu as a fallback if the first domain fails. So the credentials user have to be a user of one of these severs.

Once you send this request, Provenance API will search inside the ai4-metadata.ymlof the application/module github repository and if it finds some services ids like nomad jobs or mlflows runs, It will add them to the metadata JSON along with the Jenkins and the application metadata (metadata.json file).

GET /rdf?applicationId=

Generates the RDF provenance graph of the application built from the metadata fetched by the last POST /meta-data of the application.

What is Provenance API used for inside AI4EOSC?

Provenance API is used along with Jenkins pipelines to generate a provenance RDF for every single module in the AI4EOSC platform.

You can take a look to the provenance graph (visual representation of provenance RDF) of an application through AI4EOSC marketplace.

Owner

  • Name: AI4OS
  • Login: ai4os
  • Kind: organization
  • Email: ai4eosc-po@listas.csic.es

AI4OS is the software powering the AI4EOSC platform

GitHub Events

Total
  • Create event: 2
  • Release event: 1
  • Issues event: 1
  • Push event: 11
Last Year
  • Create event: 2
  • Release event: 1
  • Issues event: 1
  • Push event: 11

Dependencies

Dockerfile docker
  • eclipse-temurin 21-jdk build
docker-compose.yml docker
  • postgres 16
pom.xml maven
  • org.projectlombok:lombok 1.18.36 provided
  • com.fasterxml.jackson.core:jackson-core
  • com.fasterxml.jackson.core:jackson-databind
  • com.fasterxml.jackson.dataformat:jackson-dataformat-yaml
  • com.networknt:json-schema-validator 1.4.0
  • io.carml:carml-engine 0.4.0
  • io.carml:carml-logical-source-resolver-csv 0.4.0
  • io.carml:carml-logical-source-resolver-jsonpath 0.4.0
  • io.carml:carml-logical-source-resolver-xpath 0.4.0
  • io.carml:carml-model 0.4.0
  • io.github.cdancy:jenkins-rest 1.0.2
  • org.eclipse.rdf4j:rdf4j-rio-jsonld 4.3.10
  • org.postgresql:postgresql
  • org.springframework.boot:spring-boot-starter
  • org.springframework.boot:spring-boot-starter-actuator
  • org.springframework.boot:spring-boot-starter-jooq
  • org.springframework.boot:spring-boot-starter-security
  • org.springframework.boot:spring-boot-starter-web
  • org.springframework.boot:spring-boot-starter-test test
.github/workflows/compile-skip-tests.yml actions
  • actions/checkout v3 composite
  • actions/setup-java v3 composite
  • actions/upload-artifact v4 composite
.github/workflows/main.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v4 composite
  • docker/build-push-action v5 composite
  • docker/login-action v2 composite
  • docker/setup-buildx-action v2 composite