►
Description
In this video I demonstrate how to create a personal access token, find an image repository_id and to built delete all images except those beginning with `stable`
(And I've already revoked that token)
A
A
A
Here's
the
API
that
I'm
talking
about-
and
you
can
see
here
that
we've
added
in
this
new
parameter
called
or
attribute
called
name
reg
X
key,
and
this
will
allow
you
to
utilize
reg
X,
to
specify
a
tag
name
that
you
always
want
to
preserve,
probably
something
like
stable
or
master,
or
release,
for
example,
okay
and
and
I
see
down
here
that
we
also
have
some
examples.
So
we
have
this
option
will
remove
all
tags
but
always
keep
tags
beginning
with
stable.
A
Let's
I'm
gonna
we're
going
to
utilize
this
today.
In
our
example,
and
let's
take
a
look
at
a
project
that
I
have
open
as
an
example,
so,
let's
see
I
have
this
container
registry
and
I
currently
have
two
docker
repositories
in
here
this
one,
which
only
has
image
tags
with
the
Nate
that
are
beginning
with
stable.
Let's
check
out
the
other
one
which.
A
Include
Stan
and
latest,
and
next
so
III
would
like
to
get
rid
of
all
of
these.
Now,
since
we're
going
to
be
using
the
get
Lab
API
to
spool
myself
over,
we
will
be
utilized.
We
will
need
to
set
up
a
personal
access
token
with
API
scope,
so
to
do
that,
you
navigate
to
my
profile
and
then
to
the
personal
son
user
settings
I'm
just
forever
in
the
way.
Okay.
So
over
here
now
in
the
user
settings
I
see
this
option
for
access
tokens
I'm
going
to
create
a
new
access.
A
Token
and
I
will
call
this
name
radix,
Delete
and
I'm
going
to
expire
it
tomorrow.
Now
you
have
these
different
options
for
which
you
could
set
the
scope
to,
in
this
case,
bro
we're
utilizing
the
API
so
I'm
going
to
set
it
to
API
and
I.
Will
click
create
personal
access
token,
and
you
have
this
view.
This
is
only
up
here,
one
time.
A
So
if
you're
going
to
be
persisting,
this
token
you'll
want
to
save
it
in
your
password
manager
or
involves,
or
something
like
that
in
this
case,
I'm
going
to
copy
it
and
then,
let's
head
back
over
to
the
documentation,
so
here
I
see
that
what
information
do
we
have
to
put
in
to
actually
delete
these
tags?
Well,
we
also
need
to
enter
in
the
repository
ID.
So
how
do
I
find
this
I
navigate
to
my
project
in
the
container
registry?
A
I,
don't
see
repository
ID
in
here,
so
I
need
to
utilize
the
API
to
find
out
this
as
well.
Luckily,
we
have
just
the
thing
you
can
list
the
registry
repositories
by
project
or
by
group.
So
there's
this
option
here,
I'm
going
to
copy
this
and
we'll
fill
this
in
together.
So
here
is
the
API
called
for
finding
a
specific
repository
ID
for
a
given
image
and
I'm
just
going
to
update
my
token
okay.
So
there's
my
token
and
then
another
thing
that
we
have
here
is
you
have
to
enter
in
your
project
ID.
A
A
That's
command
line
and
I'm
just
gonna
paste
that
in
great
okay,
so
I
see
here
that
there
are
two
repositories
for
this
particular
project.
One
has
the
ID
nine
seven,
four,
six,
five,
three,
the
other
one,
has
the
ID
nine
seven,
four,
six,
five
five!
So
I'm
going
to
use
this
nine
seven,
four
six,
five
five,
as
my
repository
ID
in
the
the
bulk
delete
call.
So
here
it
is
here's
my
repository
ID
I
worked
ahead
a
little
bit.
A
We
also
need
to
include
the
project
ID
in
here,
which
I
showed
you
a
minute
ago
how
to
find
and
then
we're
gonna
put
in
the
personal
access
token
here
as
well.
So
let's
just
copy
this
and
I
should
say
there
was
one
other
change
that
I
made
here
from
the
example
in
the
documentation,
which
was
that
I
changed
this.
A
The
the
route
from
gitlab
example
comm
ticket
lab
comm
since
we're
actually
using
gitlab
comm
and
again
this
will
say,
keep
everything
that
begins
with
the
name
stable,
so
we'll
copy
that
and
then
we'll
go
back
to
the
command
line
and
we
got
OH
response,
which
means
it
was
successful.
So,
let's
navigate
to
the
project
itself,
okay
and
then
we're
going
to
go
to
the
Container
registry.
A
And
now
we
see
only
items
with
stable
left,
so
I
just
utilized
the
bulk
delete,
API,
which
is
down
here
now
to
delete
all
images,
except
for
those
that
start
up
and
stable.
Now
you
don't
have
to
use
the
command
line
for
this.
You
can
use,
get
lab
CI
tool
and
in
which
case
you
don't
have
to
worry
about
personal
access
tokens.
A
You
can
hide
them
as
an
environment
variable,
but
maybe
that'll
be
a
good
next
step
demo
today,
I
just
wanted
to
show
that
this
functionality
is
working
and,
as
you
could
see,
it's
it's
quite
effective.
So
if
you
have
any
questions
about
the
issue,
please
feel
free
to
reach
out
to
me
at
T
Rizzi
at
gate,
lab
comm
or
in
the
issues,
and
thank
you.