API reference

Automatically generated from LPVS OpenAPI v3.0.0


LPVS API v2-20250905

License Pre-Validation Service (LPVS) is a tool designed to proactively manage license-related risks in Open Source code. It conducts in-depth analysis of your project, meticulously identifying components and their associated licenses with every commit. LPVS empowers your development workflow by ensuring compliance and providing insights into licensing aspects, enhancing the overall health and robustness of your software projects.


License: MIT

GitHub Webhooks API


POST /webhooks

Start Scan

Description

Endpoint for handling GitHub webhook events and processing the payload.

Input parameters

Parameter In Type Default Nullable Description
X-Hub-Signature-256 header string No

Request body

{
    "action": "opened",
    "repository": {
        "name": "LPVS",
        "full_name": "Samsung/LPVS",
        "html_url": "https://github.com/Samsung/LPVS"
    },
    "pull_request": {
        "html_url": "https://github.com/Samsung/LPVS/pull/18",
        "head": {
            "repo": {
                "fork": "true",
                "html_url": "https://github.com/Samsung/LPVS/tree/utests"
            },
            "sha": "edde69ecb8e8a88dde09fa9789e2c9cab7cf7cf9",
            "ref": "Samsung:utests"
        },
        "url": "https://api.github.com/repos/Samsung/LPVS/pulls/18"
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "type": "object",
    "properties": {
        "action": {
            "type": "string",
            "example": "opened"
        },
        "repository": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string",
                    "example": "LPVS"
                },
                "full_name": {
                    "type": "string",
                    "example": "Samsung/LPVS"
                },
                "html_url": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://github.com/Samsung/LPVS"
                }
            }
        },
        "pull_request": {
            "type": "object",
            "properties": {
                "html_url": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://github.com/Samsung/LPVS/pull/18"
                },
                "head": {
                    "type": "object",
                    "properties": {
                        "repo": {
                            "type": "object",
                            "properties": {
                                "fork": {
                                    "type": "string",
                                    "example": "true"
                                },
                                "html_url": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://github.com/Samsung/LPVS/tree/utests"
                                }
                            }
                        },
                        "sha": {
                            "type": "string",
                            "example": "edde69ecb8e8a88dde09fa9789e2c9cab7cf7cf9"
                        },
                        "ref": {
                            "type": "string",
                            "example": "Samsung:utests"
                        }
                    }
                },
                "url": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://api.github.com/repos/Samsung/LPVS/pulls/18"
                }
            }
        }
    }
}

Response 200 OK

{
    "message": "Success"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "message": {
            "type": "string",
            "format": "uuid",
            "example": "Success"
        }
    }
}

Response 403 Forbidden

{
    "message": "Error"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "message": {
            "type": "string",
            "format": "uuid",
            "example": "Error"
        }
    }
}

POST /

Forward to Start Scan

Description

Forwards the request to the /webhooks endpoint.

Request body

{
    "action": "opened",
    "repository": {
        "name": "LPVS",
        "full_name": "Samsung/LPVS",
        "html_url": "https://github.com/Samsung/LPVS"
    },
    "pull_request": {
        "html_url": "https://github.com/Samsung/LPVS/pull/18",
        "head": {
            "repo": {
                "fork": "true",
                "html_url": "https://github.com/Samsung/LPVS/tree/utests"
            },
            "sha": "edde69ecb8e8a88dde09fa9789e2c9cab7cf7cf9",
            "ref": "Samsung:utests"
        },
        "url": "https://api.github.com/repos/Samsung/LPVS/pulls/18"
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "type": "object",
    "properties": {
        "action": {
            "type": "string",
            "example": "opened"
        },
        "repository": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string",
                    "example": "LPVS"
                },
                "full_name": {
                    "type": "string",
                    "example": "Samsung/LPVS"
                },
                "html_url": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://github.com/Samsung/LPVS"
                }
            }
        },
        "pull_request": {
            "type": "object",
            "properties": {
                "html_url": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://github.com/Samsung/LPVS/pull/18"
                },
                "head": {
                    "type": "object",
                    "properties": {
                        "repo": {
                            "type": "object",
                            "properties": {
                                "fork": {
                                    "type": "string",
                                    "example": "true"
                                },
                                "html_url": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://github.com/Samsung/LPVS/tree/utests"
                                }
                            }
                        },
                        "sha": {
                            "type": "string",
                            "example": "edde69ecb8e8a88dde09fa9789e2c9cab7cf7cf9"
                        },
                        "ref": {
                            "type": "string",
                            "example": "Samsung:utests"
                        }
                    }
                },
                "url": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://api.github.com/repos/Samsung/LPVS/pulls/18"
                }
            }
        }
    }
}

Response 200 OK

{
    "message": "Success"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "message": {
            "type": "string",
            "format": "uuid",
            "example": "Success"
        }
    }
}

Response 403 Forbidden

{
    "message": "Error"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "message": {
            "type": "string",
            "format": "uuid",
            "example": "Error"
        }
    }
}

GitHub Pull Request Single Scan API


POST /scan/{gitHubOrg}/{gitHubRepo}/{prNumber}

GitHub Pull Request Single Scan

Description

Endpoint for performing a single scan operation based on GitHub organization, repository, and pull request number.

Input parameters

Parameter In Type Default Nullable Description
gitHubOrg path string No GitHub organization name
gitHubRepo path string No GitHub repository name
prNumber path integer No Pull request number

Response 200 OK

{
    "message": "Success"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "message": {
            "type": "string",
            "format": "uuid",
            "example": "Success"
        }
    }
}

Response 403 Forbidden

{
    "message": "Error"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "message": {
            "type": "string",
            "format": "uuid",
            "example": "Error"
        }
    }
}

Health Check API


GET /health

Service Health Check

Description

Endpoint for checking the health of the service. Returns the current number of items in the processing queue.

Response 200 OK

{
    "queueLength": 5
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "properties": {
        "queueLength": {
            "type": "integer",
            "format": "int64",
            "description": "The current number of items in the processing queue.",
            "example": 5
        }
    }
}

Schemas

HealthResponse

Name Type
queueLength integer(int64)

WebhookRequest

Name Type
action string
pull_request Properties: html_url, head, url
repository Properties: name, full_name, html_url

WebhookResponseForbidden

Name Type
message string(uuid)

WebhookResponseOK

Name Type
message string(uuid)