From e8a53461074c7aeed47f357428829c99f8752fb7 Mon Sep 17 00:00:00 2001 From: dantb Date: Thu, 18 Jan 2024 17:00:34 +0100 Subject: [PATCH] Remove the ability to tag storages --- .../plugins/storage/storages/Storages.scala | 52 +------------------ .../storages/model/StorageCommand.scala | 20 ------- .../storages/routes/StoragesRoutes.scala | 16 ------ .../storage/storages/StoragesSpec.scala | 48 ----------------- .../storage/storages/StoragesStmSpec.scala | 48 ++--------------- .../storages/routes/StoragesRoutesSpec.scala | 52 +++++-------------- .../sourcing/ScopedEntityDefinition.scala | 3 ++ .../docs/delta/api/assets/storages/tag.sh | 7 --- .../delta/api/assets/storages/tagged.json | 23 -------- .../paradox/docs/delta/api/storages-api.md | 31 ----------- 10 files changed, 20 insertions(+), 280 deletions(-) delete mode 100644 docs/src/main/paradox/docs/delta/api/assets/storages/tag.sh delete mode 100644 docs/src/main/paradox/docs/delta/api/assets/storages/tagged.json diff --git a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/Storages.scala b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/Storages.scala index f01b946fc6..4fd59d6cd7 100644 --- a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/Storages.scala +++ b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/Storages.scala @@ -8,7 +8,7 @@ import ch.epfl.bluebrain.nexus.delta.kernel.utils.UUIDF import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.Storages._ import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.StoragesConfig.StorageTypeConfig import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageCommand._ -import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageEvent.{StorageCreated, StorageDeprecated, StorageTagAdded, StorageUndeprecated, StorageUpdated} +import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageEvent._ import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageRejection._ import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageValue.DiskStorageValue import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model._ @@ -29,7 +29,6 @@ import ch.epfl.bluebrain.nexus.delta.sdk.resolvers.ResolverContextResolution import ch.epfl.bluebrain.nexus.delta.sourcing.ScopedEntityDefinition.Tagger import ch.epfl.bluebrain.nexus.delta.sourcing._ import ch.epfl.bluebrain.nexus.delta.sourcing.model.Identity.Subject -import ch.epfl.bluebrain.nexus.delta.sourcing.model.Tag.UserTag import ch.epfl.bluebrain.nexus.delta.sourcing.model.{EntityType, ProjectRef} import ch.epfl.bluebrain.nexus.delta.sourcing.stream.Elem import fs2.Stream @@ -183,34 +182,6 @@ final class Storages private ( } yield res }.span("updateStorage") - /** - * Add a tag to an existing storage - * - * @param id - * the storage identifier to expand as the id of the storage - * @param projectRef - * the project where the storage belongs - * @param tag - * the tag name - * @param tagRev - * the tag revision - * @param rev - * the current revision of the storage - */ - def tag( - id: IdSegment, - projectRef: ProjectRef, - tag: UserTag, - tagRev: Int, - rev: Int - )(implicit subject: Subject): IO[StorageResource] = { - for { - pc <- fetchContext.onModify(projectRef) - iri <- expandIri(id, pc) - res <- eval(TagStorage(iri, projectRef, tagRev, tag, rev, subject)) - } yield res - }.span("tagStorage") - /** * Deprecate an existing storage * @@ -464,16 +435,6 @@ object Storages { } yield StorageUpdated(c.id, c.project, value, c.source, s.rev + 1, instant, c.subject) } - def tag(c: TagStorage) = state match { - case None => IO.raiseError(StorageNotFound(c.id, c.project)) - case Some(s) if s.rev != c.rev => IO.raiseError(IncorrectRev(c.rev, s.rev)) - case Some(s) if c.targetRev <= 0 || c.targetRev > s.rev => IO.raiseError(RevisionNotFound(c.targetRev, s.rev)) - case Some(s) => - clock.realTimeInstant.map( - StorageTagAdded(c.id, c.project, s.value.tpe, c.targetRev, c.tag, s.rev + 1, _, c.subject) - ) - } - def deprecate(c: DeprecateStorage) = state match { case None => IO.raiseError(StorageNotFound(c.id, c.project)) case Some(s) if s.rev != c.rev => IO.raiseError(IncorrectRev(c.rev, s.rev)) @@ -493,7 +454,6 @@ object Storages { cmd match { case c: CreateStorage => create(c) case c: UpdateStorage => update(c) - case c: TagStorage => tag(c) case c: DeprecateStorage => deprecate(c) case c: UndeprecateStorage => undeprecate(c) } @@ -510,15 +470,7 @@ object Storages { StateMachine(None, evaluate(access, fetchPermissions, config, clock)(_, _), next), StorageEvent.serializer, StorageState.serializer, - Tagger[StorageEvent]( - { - case r: StorageTagAdded => Some(r.tag -> r.targetRev) - case _ => None - }, - { _ => - None - } - ), + Tagger.noop[StorageEvent], _ => None, onUniqueViolation = (id: Iri, c: StorageCommand) => c match { diff --git a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/model/StorageCommand.scala b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/model/StorageCommand.scala index e15ccb3511..3580ea6bdf 100644 --- a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/model/StorageCommand.scala +++ b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/model/StorageCommand.scala @@ -3,7 +3,6 @@ package ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.Iri import ch.epfl.bluebrain.nexus.delta.sourcing.model.Identity.Subject import ch.epfl.bluebrain.nexus.delta.sourcing.model.ProjectRef -import ch.epfl.bluebrain.nexus.delta.sourcing.model.Tag.UserTag import io.circe.Json /** @@ -87,25 +86,6 @@ object StorageCommand { subject: Subject ) extends StorageCommand - /** - * Command to tag a storage - * - * @param id - * the storage identifier - * @param project - * the project the storage belongs to - * @param targetRev - * the revision that is being aliased with the provided ''tag'' - * @param tag - * the tag of the alias for the provided ''tagRev'' - * @param rev - * the last known revision of the storage - * @param subject - * the identity associated to this command - */ - final case class TagStorage(id: Iri, project: ProjectRef, targetRev: Int, tag: UserTag, rev: Int, subject: Subject) - extends StorageCommand - /** * Command to deprecate a storage * diff --git a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/routes/StoragesRoutes.scala b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/routes/StoragesRoutes.scala index 6f8f650c21..638aa2e5c1 100644 --- a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/routes/StoragesRoutes.scala +++ b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/routes/StoragesRoutes.scala @@ -19,7 +19,6 @@ import ch.epfl.bluebrain.nexus.delta.sdk.identities.Identities import ch.epfl.bluebrain.nexus.delta.sdk.implicits._ import ch.epfl.bluebrain.nexus.delta.sdk.marshalling.RdfMarshalling import ch.epfl.bluebrain.nexus.delta.sdk.model.BaseUri -import ch.epfl.bluebrain.nexus.delta.sdk.model.routes.Tag import io.circe.Json import kamon.instrumentation.akka.http.TracingDirectives.operationName @@ -175,21 +174,6 @@ final class StoragesRoutes( .attemptNarrow[StorageRejection] .rejectOn[StorageNotFound] ) - }, - // Tag a storage - (post & parameter("rev".as[Int])) { rev => - authorizeFor(project, Write).apply { - entity(as[Tag]) { case Tag(tagRev, tag) => - emit( - Created, - storages - .tag(id, project, tag, tagRev, rev) - .flatTap(index(project, _, mode)) - .mapValue(_.metadata) - .attemptNarrow[StorageRejection] - ) - } - } } ) } diff --git a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/StoragesSpec.scala b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/StoragesSpec.scala index 44a411701e..bb7f95a1aa 100644 --- a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/StoragesSpec.scala +++ b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/StoragesSpec.scala @@ -136,37 +136,6 @@ private class StoragesSpec } } - "tagging a storage" should { - - "succeed" in { - storages.tag(rdId, projectRef, tag, tagRev = 1, 1).accepted shouldEqual - resourceFor( - rdId, - projectRef, - remoteVal, - remoteFieldsJson, - rev = 2, - createdBy = bob, - updatedBy = bob, - tags = Tags(tag -> 1) - ) - } - - "reject if it doesn't exists" in { - storages.tag(nxv + "other", projectRef, tag, tagRev = 1, 1).rejectedWith[StorageNotFound] - } - - "reject if project does not exist" in { - val projectRef = ProjectRef(org, Label.unsafe("other")) - - storages.tag(rdId, projectRef, tag, tagRev = 2, 2).rejectedWith[ProjectContextRejection] - } - - "reject if project is deprecated" in { - storages.tag(rdId, deprecatedProject.ref, tag, tagRev = 2, 2).rejectedWith[ProjectContextRejection] - } - } - "deprecating a storage" should { "succeed" in { @@ -202,23 +171,6 @@ private class StoragesSpec "reject if project is deprecated" in { storages.deprecate(s3Id, deprecatedProject.ref, 1).rejectedWith[ProjectContextRejection] } - - "allow tagging" in { - val payload = s3FieldsJson deepMerge json"""{"@id": "$s3Id", "default": false}""" - storages.tag(s3Id, projectRef, tag, tagRev = 3, 3).accepted shouldEqual - resourceFor( - s3Id, - projectRef, - s3Val.copy(default = false), - payload, - rev = 4, - deprecated = true, - createdBy = bob, - updatedBy = bob, - tags = Tags(tag -> 3) - ) - } - } "undeprecating a storage" should { diff --git a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/StoragesStmSpec.scala b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/StoragesStmSpec.scala index 4ac9f95743..fa764243c2 100644 --- a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/StoragesStmSpec.scala +++ b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/StoragesStmSpec.scala @@ -4,9 +4,9 @@ import cats.effect.IO import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.StorageGen.storageState import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.Storages.{evaluate, next} import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.StoragesConfig.{DiskStorageConfig, StorageTypeConfig} -import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageCommand.{CreateStorage, DeprecateStorage, TagStorage, UndeprecateStorage, UpdateStorage} -import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageEvent.{StorageCreated, StorageDeprecated, StorageTagAdded, StorageUndeprecated, StorageUpdated} -import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageRejection.{DifferentStorageType, IncorrectRev, InvalidMaxFileSize, InvalidStorageType, PermissionsAreNotDefined, ResourceAlreadyExists, RevisionNotFound, StorageIsDeprecated, StorageIsNotDeprecated, StorageNotAccessible, StorageNotFound} +import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageCommand.{CreateStorage, DeprecateStorage, UndeprecateStorage, UpdateStorage} +import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageEvent._ +import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageRejection.{DifferentStorageType, InvalidMaxFileSize, InvalidStorageType, PermissionsAreNotDefined, ResourceAlreadyExists, StorageIsDeprecated, StorageIsNotDeprecated, StorageNotAccessible} import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageType.{DiskStorage => DiskStorageType} import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.StorageValue.{DiskStorageValue, RemoteDiskStorageValue, S3StorageValue} import ch.epfl.bluebrain.nexus.delta.plugins.storage.storages.model.{AbsolutePath, DigestAlgorithm} @@ -78,18 +78,6 @@ class StoragesStmSpec extends CatsEffectSpec with StorageFixtures { } } - "create a new event from a TagStorage command" in { - val state = storageState(dId, project, diskVal, rev = 3) - eval(Some(state), TagStorage(dId, project, 2, UserTag.unsafe("myTag"), 3, alice)).accepted shouldEqual - StorageTagAdded(dId, project, DiskStorageType, 2, UserTag.unsafe("myTag"), 4, epoch, alice) - } - - "create a new event from a TagStorage command when storage is deprecated" in { - val state = storageState(dId, project, diskVal, rev = 3, deprecated = true) - eval(Some(state), TagStorage(dId, project, 2, UserTag.unsafe("myTag"), 3, alice)).accepted shouldEqual - StorageTagAdded(dId, project, DiskStorageType, 2, UserTag.unsafe("myTag"), 4, epoch, alice) - } - "create a new event from a DeprecateStorage command" in { val state = storageState(dId, project, diskVal, rev = 3) eval(Some(state), DeprecateStorage(dId, project, 3, alice)).accepted shouldEqual @@ -102,19 +90,6 @@ class StoragesStmSpec extends CatsEffectSpec with StorageFixtures { StorageUndeprecated(dId, project, DiskStorageType, 4, epoch, alice) } - "reject with IncorrectRev" in { - val state = storageState(dId, project, diskVal) - val commands = List( - UpdateStorage(dId, project, diskFields, Json.obj(), 2, alice), - TagStorage(dId, project, 1, UserTag.unsafe("tag"), 2, alice), - DeprecateStorage(dId, project, 2, alice), - UndeprecateStorage(dId, project, 2, alice) - ) - forAll(commands) { cmd => - eval(Some(state), cmd).rejected shouldEqual IncorrectRev(provided = 2, expected = 1) - } - } - "reject with StorageNotAccessible" in { val notAllowedDiskVal = diskFields.copy(volume = Some(tmp2)) val inaccessibleDiskVal = @@ -186,17 +161,6 @@ class StoragesStmSpec extends CatsEffectSpec with StorageFixtures { .rejectedWith[ResourceAlreadyExists] } - "reject with StorageNotFound" in { - val commands = List( - UpdateStorage(dId, project, diskFields, Json.obj(), 2, alice), - TagStorage(dId, project, 1, UserTag.unsafe("tag"), 2, alice), - DeprecateStorage(dId, project, 2, alice) - ) - forAll(commands) { cmd => - eval(None, cmd).rejectedWith[StorageNotFound] - } - } - "reject with StorageIsDeprecated" in { val state = storageState(dId, project, diskVal, rev = 2, deprecated = true) val commands = List( @@ -218,12 +182,6 @@ class StoragesStmSpec extends CatsEffectSpec with StorageFixtures { } } - "reject with RevisionNotFound" in { - val state = storageState(dId, project, diskVal) - eval(Some(state), TagStorage(dId, project, 3, UserTag.unsafe("myTag"), 1, alice)).rejected shouldEqual - RevisionNotFound(provided = 3, current = 1) - } - "reject with DifferentStorageType" in { val diskCurrent = storageState(dId, project, diskVal) val s3Current = storageState(s3Id, project, s3Val) diff --git a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/routes/StoragesRoutesSpec.scala b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/routes/StoragesRoutesSpec.scala index b80a151ced..d93a9f7200 100644 --- a/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/routes/StoragesRoutesSpec.scala +++ b/delta/plugins/storage/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/storages/routes/StoragesRoutesSpec.scala @@ -294,26 +294,6 @@ class StoragesRoutesSpec extends BaseRouteSpec with StorageFixtures { } } - "tag a storage" in { - val payload = json"""{"tag": "mytag", "rev": 1}""" - // the revision is 2 because this storage has been updated to default = false - Post( - "/v1/storages/myorg/myproject/remote-disk-storage/tags?rev=2", - payload.toEntity - ) ~> asWriter ~> routes ~> check { - status shouldEqual StatusCodes.Created - response.asJson shouldEqual - storageMetadata( - projectRef, - rdId, - StorageType.RemoteDiskStorage, - rev = 3, - createdBy = writer, - updatedBy = writer - ) - } - } - "fail to fetch a storage and do listings without resources/read permission" in { val endpoints = List( "/v1/storages/myorg/myproject/caches", @@ -321,7 +301,7 @@ class StoragesRoutesSpec extends BaseRouteSpec with StorageFixtures { "/v1/storages/myorg/myproject/remote-disk-storage/tags" ) forAll(endpoints) { endpoint => - forAll(List("", "?rev=1", "?tags=mytag")) { suffix => + forAll(List("", "?rev=1")) { suffix => Get(s"$endpoint$suffix") ~> routes ~> check { response.shouldBeForbidden } @@ -339,7 +319,7 @@ class StoragesRoutesSpec extends BaseRouteSpec with StorageFixtures { } } - "fetch a storage by rev and tag" in { + "fetch a storage by rev" in { val endpoints = List( "/v1/storages/myorg/myproject/remote-disk-storage", "/v1/resources/myorg/myproject/_/remote-disk-storage", @@ -349,14 +329,12 @@ class StoragesRoutesSpec extends BaseRouteSpec with StorageFixtures { s"/v1/resources/myorg/myproject/storage/$remoteIdEncoded" ) forAll(endpoints) { endpoint => - forAll(List("rev=1", "tag=mytag")) { param => - Get(s"$endpoint?$param") ~> asReader ~> routes ~> check { - status shouldEqual StatusCodes.OK - response.asJson shouldEqual jsonContentOf( - "storages/remote-storage-fetched.json", - "self" -> self(rdId) - ) - } + Get(s"$endpoint?rev=1") ~> asReader ~> routes ~> check { + status shouldEqual StatusCodes.OK + response.asJson shouldEqual jsonContentOf( + "storages/remote-storage-fetched.json", + "self" -> self(rdId) + ) } } } @@ -377,17 +355,15 @@ class StoragesRoutesSpec extends BaseRouteSpec with StorageFixtures { } } - "fetch a storage original payload by rev or tag" in { + "fetch a storage original payload by rev" in { val endpoints = List( "/v1/storages/myorg/myproject/remote-disk-storage/source", s"/v1/storages/myorg/myproject/$remoteIdEncoded/source" ) forAll(endpoints) { endpoint => - forAll(List("rev=1", "tag=mytag")) { param => - Get(s"$endpoint?$param") ~> asReader ~> routes ~> check { - status shouldEqual StatusCodes.OK - response.asJson shouldEqual remoteFieldsJson - } + Get(s"$endpoint?rev=1") ~> asReader ~> routes ~> check { + status shouldEqual StatusCodes.OK + response.asJson shouldEqual remoteFieldsJson } } } @@ -397,10 +373,6 @@ class StoragesRoutesSpec extends BaseRouteSpec with StorageFixtures { status shouldEqual StatusCodes.OK response.asJson shouldEqual json"""{"tags": []}""".addContext(contexts.tags) } - Get("/v1/storages/myorg/myproject/remote-disk-storage/tags") ~> asReader ~> routes ~> check { - status shouldEqual StatusCodes.OK - response.asJson shouldEqual json"""{"tags": [{"rev": 1, "tag": "mytag"}]}""".addContext(contexts.tags) - } } "return not found if tag not found" in { diff --git a/delta/sourcing-psql/src/main/scala/ch/epfl/bluebrain/nexus/delta/sourcing/ScopedEntityDefinition.scala b/delta/sourcing-psql/src/main/scala/ch/epfl/bluebrain/nexus/delta/sourcing/ScopedEntityDefinition.scala index 7db07d5196..4185c6068d 100644 --- a/delta/sourcing-psql/src/main/scala/ch/epfl/bluebrain/nexus/delta/sourcing/ScopedEntityDefinition.scala +++ b/delta/sourcing-psql/src/main/scala/ch/epfl/bluebrain/nexus/delta/sourcing/ScopedEntityDefinition.scala @@ -65,5 +65,8 @@ object ScopedEntityDefinition { * to untag the state associated with the given tag */ final case class Tagger[E](tagWhen: E => Option[(UserTag, Int)], untagWhen: E => Option[UserTag]) + object Tagger { + def noop[E]: Tagger[E] = Tagger[E](_ => None, _ => None) + } } diff --git a/docs/src/main/paradox/docs/delta/api/assets/storages/tag.sh b/docs/src/main/paradox/docs/delta/api/assets/storages/tag.sh deleted file mode 100644 index e9613d1bac..0000000000 --- a/docs/src/main/paradox/docs/delta/api/assets/storages/tag.sh +++ /dev/null @@ -1,7 +0,0 @@ -curl -X POST \ - -H "Content-Type: application/json" \ - "http://localhost:8080/v1/storages/myorg/myproject/remote/tags?rev=2" -d \ - '{ - "tag": "mytag", - "rev": 1 - }' \ No newline at end of file diff --git a/docs/src/main/paradox/docs/delta/api/assets/storages/tagged.json b/docs/src/main/paradox/docs/delta/api/assets/storages/tagged.json deleted file mode 100644 index a3bd65ad63..0000000000 --- a/docs/src/main/paradox/docs/delta/api/assets/storages/tagged.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "@context": [ - "https://bluebrain.github.io/nexus/contexts/storages-metadata.json", - "https://bluebrain.github.io/nexus/contexts/metadata.json" - ], - "@id": "http://localhost:8080/v1/resources/myorg/myproject/_/remote", - "@type": [ - "Storage", - "RemoteDiskStorage" - ], - "_algorithm": "SHA-256", - "_constrainedBy": "https://bluebrain.github.io/nexus/schemas/storages.json", - "_createdAt": "2021-05-11T12:22:19.195Z", - "_createdBy": "http://localhost:8080/v1/anonymous", - "_deprecated": false, - "_incoming": "http://localhost:8080/v1/storages/myorg/myproject/remote/incoming", - "_outgoing": "http://localhost:8080/v1/storages/myorg/myproject/remote/outgoing", - "_project": "http://localhost:8080/v1/projects/myorg/myproject", - "_rev": 3, - "_self": "http://localhost:8080/v1/storages/myorg/myproject/remote", - "_updatedAt": "2021-05-11T12:28:08.479Z", - "_updatedBy": "http://localhost:8080/v1/anonymous" -} diff --git a/docs/src/main/paradox/docs/delta/api/storages-api.md b/docs/src/main/paradox/docs/delta/api/storages-api.md index 43eafb79d3..5e9d8bfb70 100644 --- a/docs/src/main/paradox/docs/delta/api/storages-api.md +++ b/docs/src/main/paradox/docs/delta/api/storages-api.md @@ -196,37 +196,6 @@ Payload Response : @@snip [updated.json](assets/storages/updated.json) -## Tag - -Links a storage revision to a specific name. - -Tagging a storage is considered to be an update as well. - -``` -POST /v1/storages/{org_label}/{project_label}/{storage_id}/tags?rev={previous_rev} - { - "tag": "{name}", - "rev": {rev} - } -``` - -... where - -- `{previous_rev}`: Number - the last known revision for the storage. -- `{name}`: String - label given to the storage at specific revision. -- `{rev}`: Number - the revision to link the provided `{name}`. - -**Example** - -Request -: @@snip [tag.sh](assets/storages/tag.sh) - -Payload -: @@snip [tag.json](assets/tag.json) - -Response -: @@snip [tagged.json](assets/storages/tagged.json) - ## Deprecate Locks the storage, so no further operations can be performed. It will also not be taken into account by the