Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Remove Project Resource References

POST/api/v2/filesystem/projects/{projectRid}/references/remove
Warning

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.

Remove references from the given project

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:filesystem-write.

Path parameters

projectRid
string

The unique resource identifier (RID) of a Project.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

RemoveProjectResourceReferencesRequest
object
Hide child attributes

Hide child attributes

resources
list<rid>
optional

The resource identifiers to remove as references. These may be either filesystem or external resource identifiers.

Examples

Request

Copied!
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/remove?preview=true" \ -d '{"resources":["ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da"]}'

Error responses

Error Name
InvalidResourceReferenceError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe 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.
ParametersresourceRid
InvalidProjectError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe provided resource identifier does not refer to a valid project.
ParametersprojectRid
RemoveProjectResourceReferencesPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not remove the ProjectResourceReference.
ParametersprojectRid
ProjectNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given Project could not be found.
ParametersprojectRid
ResourceNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given Resource could not be found.
ParametersresourceRid