Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assets API Not Working #331

Open
1 of 6 tasks
elliotparsons opened this issue Oct 19, 2024 · 0 comments
Open
1 of 6 tasks

Assets API Not Working #331

elliotparsons opened this issue Oct 19, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@elliotparsons
Copy link

elliotparsons commented Oct 19, 2024

The includeAttributesDeep field in AQL GET is being interpreted as a boolean instead of an Integer.

go-atlassian version 1.14

go-atlassian component

  • Jira Software Cloud
  • Jira Agile Cloud
  • Jira Service Management Cloud
  • Confluence Cloud
  • Atlassian Admin Cloud
  • Jira Assets

Describe the bug 🐛
AQL API throws a 400 Bad Request Error due to invalid parameter.

To Reproduce 🚧
Steps to reproduce the behavior:
Call AQL API with a simple AQL query and all other parameters left empty to use defaults.

Expected behavior
Return a 200 response with valid data.

Screenshots 📄
If applicable, add screenshots to help explain your problem.

Additional context
Jira Assets API notes that the includeAttributesDeep field is an integer, not a boolean. Fix is to change this type to an integer and change the formatting of the JSON message. Validated in Postman and a local change of the code.

image

Code snippet

        assets.Auth.SetBasicAuth(user, key)
	payload := &models.AQLSearchParamsScheme{
		Query:                 `ObjectType = "Object"`,
	}

	objects, response, err := assets.AQL.Filter(context.Background(), workspaceId, payload)
	if err != nil {
		if response != nil {
			log.Println(response.Bytes.String())
			log.Println("Endpoint: ", response.Endpoint)
		}
		log.Fatal(err)
	}
@elliotparsons elliotparsons added the bug Something isn't working label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants