FService773237 (Community Member) asked a question.

How to link SCA projects to applications.

I have API service account with these roles

  • Mitigation API
  • Upload and Scan API
  • Greenlight API User
  • Upload API - Submit Only
  • Results API
  • Collection Reviewer API

 

These APIs "/srcclr/v3/" does not work. I generated srcclr api token from UI using my user account. Making a call to "/srcclr/v3/workspaces" always returns 403 error.

 

what can be the cause.

 

I also tried with user account instead of API service account and there "/srcclr/v3/workspaces" works but "/srcclr/v3/application/[appGuid}/projects/{projectGuid}" get 403 How to get it working


  • SamHouston (Veracode)

    Hi @FService773237 (Community Member)​ 

     

    The /srcclr/v3/workspaces endpoint is specifically for managing workspaces in the context of agent-based scanning. If you are trying to link SCA projects to applications in the Veracode Platform, you might need to use a different API or workflow. The documentation on Link SCA Projects to Applications might provide more context on the expected workflow.

     

    Could you please clarify which specific task you are trying to accomplish with the /srcclr/v3/workspaces API? 

     

     

    Role Permissions

    • Issue: You may not have the correct roles assigned to your API service account or user account.
    • Solution: Ensure your account has the necessary roles. For API service accounts, roles like "Upload API" or "Upload API - Submit Only" are often required. For user accounts, roles such as "Creator" or "Security Lead" might be needed depending on the action. Refer to the Veracode documentation for a detailed breakdown of API roles.

     

     

    API Version and Endpoint

    • Issue: You mentioned /srcclr/v3/might not be working. Veracode has different API versions and endpoints for various services.

    Solution:

     

    Authentication and Credentials

    • Issue: Although you generated an API token, there might be an issue with how it's being used or if it's still valid.
    • Solution:
      • Ensure your API credentials (API ID and API Key) are valid and have not expired. You can regenerate them in the Veracode Platform. Refer to the documentation on Veracode API credentials.

     

     

     

     

     

     

    Expand Post
  • FService773237 (Community Member)

    So What I am trying is using a script to link SCA projects under a workspace to applications

    1. I filter application by name using this endpoint: https://api.veracode.com/appsec/v1/applications/?name={name} to Get application GUID
    2. Filter project by name to get project GUID like https://api.veracode.com/srcclr/v3/workspaces/{workspaceGuid}/projects?name={name} to get project GUID
    3. the call this endpoint https://api.veracode.com/srcclr/v3/applications/{appGUID}projects/{projectGUID} to link the two

    I first tries this using a user account which has these roles (Sandbox Administrator, Developer, Creator, Submitter, Greenlight IDE User, Sandbox User, eLearning, Collection Reviewer, Reviewer)

     

    in this case 1and 2 worked successfully and I got the GUIDs but I got 403 error in 3

     

    Then I tried with API service account

    API service account has these roles

    • Mitigation API
    • Upload and Scan API
    • Greenlight API User
    • Upload API - Submit Only
    • Results API
    • Collection Reviewer API

     

    In this case only 1 works (I get application GUID) and I get 403 error for both 2 and 3.

     

     

     

    Expand Post
  • FService773237 (Community Member)

    Under API service account any call to https://api.veracode.com/srcclr/v3 fails. That was my point in first comment/ask. I tried to fetch workspaces but it did not work.

     

    I generated new API credentials so they were not expired.

     

    Script

    Screenshot 2025-11-14 000430 

    Expand Post
  • FService773237 (Community Member)

    @SamHouston (Veracode)​ Thank you for highlighting this

     

    Yes I have setup a user account.

     

    It seems I will need Workspace Administrator role to be able to link project to app.

Topics (7)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.