
FService773237 (Community Member) asked a question.
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
.png)
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
API Version and Endpoint
Solution:
Authentication and Credentials
So What I am trying is using a script to link SCA projects under a workspace to applications
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
In this case only 1 works (I get application GUID) and I get 403 error for both 2 and 3.
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
@SamHouston (Veracode) Can you have a look at the samples I shared and is it the correct API to use
Hi @FService773237 (Community Member) -
Before you can use this API, you must have a user account. API service accounts cannot access this API. https://docs.veracode.com/r/c_sourceclear_intro#permissions-and-authentication
Have you setup a user account as well?
@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.