Skip to content

404 error when calling artifactory.security() or artifactory.system() #396

Description

@Absh-Day

I am working on creating a jenkins script, that can access artifactory Rest API (version: 7.84.17)
Following examples from README, when I make rest calls like:

 ArtifactoryRequest repositoryRequest = new ArtifactoryRequestImpl().apiUrl("access/api/v1/tokens")
        .method(ArtifactoryRequest.Method.GET)
        .responseType(ArtifactoryRequest.ContentType.JSON);
ArtifactoryResponse response = artifactory.restCall(repositoryRequest);
println response.getRawBody()

I get expected response, but when I try to access anything via artifactory.security() or artifactory.system() it always gives me

org.apache.http.client.HttpResponseException: status code: 404, reason phrase: 404 page not found

	at org.jfrog.artifactory.client.impl.ArtifactoryImpl.newHttpResponseException(ArtifactoryImpl.java:257)
	at org.jfrog.artifactory.client.impl.ArtifactoryImpl.get(ArtifactoryImpl.java:287)
	at org.jfrog.artifactory.client.impl.ArtifactoryImpl.get(ArtifactoryImpl.java:270)
	at org.jfrog.artifactory.client.Artifactory$get$0.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:144)
	at org.jfrog.artifactory.client.impl.SecurityImpl.userNames(SecurityImpl.groovy:41)
	at org.jfrog.artifactory.client.Security$userNames.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
	at Script1.run(Script1.groovy:14)

Even system().ping() system().version().getVersion() isn't working.
I have tried admin scope token and even admin's identity token but its same result.
Can someone please help?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions