API Documentation
...
Model Scanner
<POST> Supply Chain Lineage Check API
1 min
the supply chain lineage check api helps users determine whether a given github, hugging face, or s3 bucket repository has already been scanned by providing the repository type and url, users can verify its scan history, avoiding redundant security assessments and optimizing workflow efficiency the following parameters are used for supply chain lineage check api to learn more about different input parameters and how to use the api, refer to ai/ml supply chain docid\ xso05koq um byw47j0ub documentation { "tab" "examples", "url" "https //api aws boschaishield com/prod/api/ais/v1 5/developer/lineage check", "name" "supply chain lineage check api", "method" "post", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[ { "kind" "required", "name" "x api key", "type" "string", "children" \[], "description" "enter your api key" }, { "kind" "required", "name" "org id", "type" "string", "description" "enter your organization id", "" "org id" } ], "bodydataparameters" \[ { "name" "repo type", "kind" "required", "type" "string", "description" "the repository that needs to be scanned, such as github, huggingface and s3 bucket ", "" "the repository that needs to be scanned, such as github, huggingface and s3 bucket " }, { "name" "repo url", "kind" "optional", "type" "string", "description" "the url of the repository that needs to be scanned \n", "" "the url of the repository that needs to be scanned \n" }, { "name" "branch name", "kind" "optional", "type" "string", "description" "the branch of the repository to be scanned default is 'main' branch ", "" "the branch of the repository to be scanned default is 'main' branch " }, { "name" "depth", "kind" "optional", "type" "integer", "description" "the depth of commits to scan from the repository default is 1, which clones only the latest commit ", "" "integer" }, { "name" "aws access key id", "kind" "optional", "type" "string", "description" "when repo type is set to \\"s3 bucket\\", this parameter is mandatory ", "" "when repo type is set to \\"s3 bucket\\", this parameter is mandatory " }, { "name" "aws secret access key", "kind" "optional", "type" "string", "description" "when repo type is set to \\"s3 bucket\\", this parameter is mandatory ", "" "when repo type is set to \\"s3 bucket\\", this parameter is mandatory " }, { "name" "region", "kind" "optional", "type" "string", "description" "when repo type is set to \\"s3 bucket\\", this parameter is mandatory povide region where s3 bucket is present ", "" "when repo type is set to \\"s3 bucket\\", this parameter is mandatory povide region where s3 bucket is present " }, { "name" "bucket name", "kind" "optional", "type" "string", "description" "when repo type is set to \\"s3 bucket\\", this parameter is mandatory provid the bucket name which need to be scanned ", "" "when repo type is set to \\"s3 bucket\\", this parameter is mandatory provid the bucket name which need to be scanned " } ], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "dl4hdcclth6dutou opbd", "code" "// 200 ok retuns dictionar which will contains the details of lineage details if found else empty \n\n{\n \\"branchname\\" \\"xxxxx\\",\n \\"commitid\\" \\"xxxxx\\",\n \\"createdtimestamp\\" \\"xxxxx\\",\n \\"depth\\" \\"xxxxx\\",\n \\"hashedjobid\\" \\"xxxxx\\",\n \\"modelid\\" \\"xxxxx\\",\n \\"orgid\\" \\"xxxxx\\",\n \\"repotype\\" \\"huggingface\\",\n \\"repourl\\" \\"https //huggingface co/achilles1313/test gguf\\",\n \\"supplychain vuldetected\\" 1\n} ", "language" "200", "customlabel" "" }, { "id" "z5ds opimhsxfewrtknkw", "language" "401", "code" "// 401 unauthorized returns an error message if the provided api key or org id is invalid or expired ", "customlabel" "" }, { "id" "xjhl9zr5waz30f4gu2buz", "language" "400", "code" "// 400 bad request error returns an error message if the application cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, etc )", "customlabel" "" }, { "id" "exy7xhvpq ht16gzp2cna", "language" "412", "code" "// 412 precondition failed returns an error message if access to the target resource has been denied (for example if any of the parameter value is incorrect or license has expired)", "customlabel" "" } ], "selectedlanguageid" "dl4hdcclth6dutou opbd" }, "examples" { "languages" \[ { "id" "t7 cakecu 8gryzbp4x", "language" "python", "code" "import requests\n\nurl = \\"https //api aws boschaishield com/prod/api/ais/v1 5/developer/lineage check\\"\n\npayload = \\"{\\\\\\"repo type\\\\\\" \\\\\\"string\\\\\\",\\\\\\"repo url\\\\\\" \\\\\\"string\\\\\\",\\\\\\"branch name\\\\\\" \\\\\\"string\\\\\\",\\\\\\"depth\\\\\\" \\\\\\"number\\\\\\",\\\\\\"aws access key id\\\\\\" \\\\\\"string\\\\\\",\\\\\\"aws secret access key\\\\\\" \\\\\\"string\\\\\\",\\\\\\"region\\\\\\" \\\\\\"string\\\\\\",\\\\\\"bucket name\\\\\\" \\\\\\"string\\\\\\"}\\"\nheaders = {\n 'x api key' 'string',\n 'org id' 'string'\n}\n\nresponse = requests request(\\"post\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "1ltwvexg3mcrc17xaxnym", "language" "curl", "code" "curl location 'https //api aws boschaishield com/prod/api/ais/v1 5/developer/lineage check' \\\\\n header 'x api key string' \\\\\n header 'org id string' \\\\\n data '{\\"repo type\\" \\"string\\",\\"repo url\\" \\"string\\",\\"branch name\\" \\"string\\",\\"depth\\" \\"number\\",\\"aws access key id\\" \\"string\\",\\"aws secret access key\\" \\"string\\",\\"region\\" \\"string\\",\\"bucket name\\" \\"string\\"}'", "customlabel" "" }, { "id" "utn4x5xiv3psaenodxy4x", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //api aws boschaishield com/prod/api/ais/v1 5/developer/lineage check',\n 'headers' {\n 'x api key' 'string',\n 'org id' 'string'\n },\n body '{\\"repo type\\" \\"string\\",\\"repo url\\" \\"string\\",\\"branch name\\" \\"string\\",\\"depth\\" \\"number\\",\\"aws access key id\\" \\"string\\",\\"aws secret access key\\" \\"string\\",\\"region\\" \\"string\\",\\"bucket name\\" \\"string\\"}'\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "pxd52o8vc6lwama5vrwfz", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"x api key\\", \\"string\\");\nmyheaders append(\\"org id\\", \\"string\\");\n\nvar raw = \\"{\\\\\\"repo type\\\\\\" \\\\\\"string\\\\\\",\\\\\\"repo url\\\\\\" \\\\\\"string\\\\\\",\\\\\\"branch name\\\\\\" \\\\\\"string\\\\\\",\\\\\\"depth\\\\\\" \\\\\\"number\\\\\\",\\\\\\"aws access key id\\\\\\" \\\\\\"string\\\\\\",\\\\\\"aws secret access key\\\\\\" \\\\\\"string\\\\\\",\\\\\\"region\\\\\\" \\\\\\"string\\\\\\",\\\\\\"bucket name\\\\\\" \\\\\\"string\\\\\\"}\\";\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api aws boschaishield com/prod/api/ais/v1 5/developer/lineage check\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "ogfetums8cg ekhf3iqra", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api aws boschaishield com/prod/api/ais/v1 5/developer/lineage check\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http post new(url)\nrequest\[\\"x api key\\"] = \\"string\\"\nrequest\[\\"org id\\"] = \\"string\\"\nrequest body = \\"{\\\\\\"repo type\\\\\\" \\\\\\"string\\\\\\",\\\\\\"repo url\\\\\\" \\\\\\"string\\\\\\",\\\\\\"branch name\\\\\\" \\\\\\"string\\\\\\",\\\\\\"depth\\\\\\" \\\\\\"number\\\\\\",\\\\\\"aws access key id\\\\\\" \\\\\\"string\\\\\\",\\\\\\"aws secret access key\\\\\\" \\\\\\"string\\\\\\",\\\\\\"region\\\\\\" \\\\\\"string\\\\\\",\\\\\\"bucket name\\\\\\" \\\\\\"string\\\\\\"}\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "t7 cakecu 8gryzbp4x" }, "description" "the supply chain lineage check api verifies if a given github, hugging face, or s3 repository has already been scanned for security assessment ", "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" true }