---
title: <POST> Supply Chain Attacks
slug: lesspostgreater-supply-chain-attacks
docTags: 
createdAt: 2024-07-22T04:33:55.390Z
---

The Below parameters are for supply chain attacks. To know more about different input parameters and how to use API see [AI/ML Supply Chain](docId\:Xso05kOq-um_Byw47J0UB)&#x20;



:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://api.aws.boschaishield.com/prod/api/ais/v1.5/supplychain",
  "name": "Supply Chain Attacks",
  "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 type of repository to scan (e.g., github, gitlab, bitbucket, huggingface, s3_bucket, azure_blob, gcp_storage).",
        "": "The type of repository to scan (e.g., github, gitlab, bitbucket, huggingface, s3_bucket, azure_blob, gcp_storage)."
      },
      {
        "name": "repo_url",
        "kind": "optional",
        "type": "string",
        "description": "URL of the repository  to be scanned.",
        "": "URL of the repository  to be scanned."
      },
      {
        "name": "branch_name",
        "kind": "optional",
        "type": "string",
        "description": "Name of the branch in the repository to be scanned (e.g., main, dev).",
        "": "Name of the branch in the repository to be scanned (e.g., main, dev)."
      },
      {
        "name": "depth",
        "kind": "optional",
        "type": "Integer",
        "description": "Number of recent commits to scan from the specified branch (e.g., depth: 10 scans the latest 10 commits).",
        "": "optional"
      },
      {
        "name": "username",
        "kind": "optional",
        "type": "string",
        "description": "Optional username used for authenticating access to private repositories when required (e.g., GitHub, GitLab, Bitbucket, huggingface).",
        "": "Optional username used for authenticating access to private repositories when required (e.g., GitHub, GitLab, Bitbucket, huggingface)."
      },
      {
        "name": "pat",
        "kind": "optional",
        "type": "string",
        "description": "Personal Access Token used for authenticating access to private repositories.",
        "": "Personal Access Token used for authenticating access to private repositories."
      },
      {
        "name": "model_id",
        "kind": "optional",
        "type": "string",
        "description": "Required if repo_type is file; identifier returned by the model ID generation API, used to locate the uploaded file for scanning.",
        "": "Required if repo_type is file; identifier returned by the model ID generation API, used to locate the uploaded file for scanning."
      },
      {
        "name": "aws_access_key_id",
        "kind": "optional",
        "type": "string",
        "description": "AWS access key ID used to authenticate and access S3 buckets when repo_type is s3_bucket.",
        "": "AWS access key ID used to authenticate and access S3 buckets when repo_type is s3_bucket."
      },
      {
        "name": "aws_secret_access_key",
        "kind": "optional",
        "type": "string",
        "description": "AWS secret access key paired with aws_access_key_id for authenticating access to S3 resources.",
        "": "AWS secret access key paired with aws_access_key_id for authenticating access to S3 resources."
      },
      {
        "name": "region",
        "kind": "optional",
        "type": "string",
        "description": "The AWS region where the S3 bucket is hosted (e.g., us-east-1, ap-south-1).",
        "": "The AWS region where the S3 bucket is hosted (e.g., us-east-1, ap-south-1)."
      },
      {
        "name": "bucket_name",
        "kind": "optional",
        "type": "string",
        "description": "Required if repo_type is s3_bucket or gcp_storage; specifies the name of the cloud storage bucket to be scanned. \nDefault :  If no bucket name is provided, the bucket's under the provided credentials are auto-discovered and fully scanned. ",
        "": "Required if repo_type is s3_bucket or gcp_storage; specifies the name of the cloud storage bucket to be scanned. \nDefault :  If no bucket name is provided, the bucket's under the provided credentials are auto-discovered and fully scanned. "
      },
      {
        "name": "azure_connection_string",
        "kind": "optional",
        "type": "string",
        "description": "Connection string used to authenticate and access Azure Blob Storage when repo_type is azure_blob.",
        "": "Connection string used to authenticate and access Azure Blob Storage when repo_type is azure_blob."
      },
      {
        "name": "container_name",
        "kind": "optional",
        "type": "string",
        "description": "Name of the Azure Blob Storage container to be scanned; required when repo_type is azure_blob.\nDefault :  If no container name is provided, the container's under the provided credentials are auto-discovered and fully scanned. \n",
        "": "Name of the Azure Blob Storage container to be scanned; required when repo_type is azure_blob.\nDefault :  If no container name is provided, the container's under the provided credentials are auto-discovered and fully scanned. \n"
      },
      {
        "name": "service_account_json_file",
        "kind": "optional",
        "type": "object",
        "description": "File containing the JSON key for a GCP service account; required for authentication when repo_type is gcp_storage.",
        "": "File containing the JSON key for a GCP service account; required for authentication when repo_type is gcp_storage."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "DL4HDcclTH6dUtOu-opbD",
        "code": "// 200 OK: Returns a JSON object containing unique model ID and urls to upload required files.",
        "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": "eXy7xHvpQ-HT16gZp2CNA"
  },
  "examples": {
    "languages": [
      {
        "id": "4nW1WnBd6npSuktVhukCc",
        "language": "curl",
        "code": "curl --location 'https://api.aws.boschaishield.com/prod/api/ais/v1.5/supplychain' \\\n--header 'x-api-key: string' \\\n--header 'Org_id: string' \\\n--data {\"repo_type\":\"String\",\"repo_url\":\"String\",\"branch_name\":\"String\",\"depth\":\"Integer\",\"model_id\":\"String\",\"aws_access_key_id\":\"String\",\"aws_secret_access_key\":\"String\",\"region\":\"String\",\"bucket_name\":\"String\"}",
        "customLabel": ""
      },
      {
        "id": "mV0Gq6Fc0VTaO9OWg4fqq",
        "language": "python",
        "code": "import requests\n\nurl = \"https://api.aws.boschaishield.com/prod/api/ais/v1.5/supplychain\"\n\npayload = {\"repo_type\":\"String\",\"repo_url\":\"String\",\"branch_name\":\"String\",\"depth\":\"Integer\",\"model_id\":\"String\",\"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": ""
      }
    ],
    "selectedLanguageId": "mV0Gq6Fc0VTaO9OWg4fqq"
  },
  "description": "This api perform static assessment of files present in repos, local or s3 bucket for possible vulnerability",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false
}
```
:::

