This endpoint is in preview and may be modified or removed at any time.
To use this endpoint, add preview=true to the request query parameters.
Add references to the given project
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:filesystem-write.
objectlist<AddResourceReferenceRequest>1
2
3
4
5
curl -X POST \
\t-H "Content-type: application/json" \
\t-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v2/filesystem/projects/ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8/references/add?preview=true" \
-d ''| Error Name | ||
|---|---|---|
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The resource reference is invalid. This can occur when the resource identifier is malformed, the resource type does not match the reference type, or the resource cannot be added as a reference. | |
| Parameters | resourceRid | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The provided resource identifier does not refer to a valid project. | |
| Parameters | projectRid | |
Add | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | Could not add the ProjectResourceReference. | |
| Parameters | projectRid | |
Project | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The given Project could not be found. | |
| Parameters | projectRid | |
Resource | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The given Resource could not be found. | |
| Parameters | resourceRid | |
See Errors for a general overview of errors in the platform.