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

Support Jira Insight #495

Open
24 of 36 tasks
Fank opened this issue Aug 23, 2022 · 3 comments
Open
24 of 36 tasks

Support Jira Insight #495

Fank opened this issue Aug 23, 2022 · 3 comments
Labels
Milestone

Comments

@Fank
Copy link
Contributor

Fank commented Aug 23, 2022

Jira bought "Insight" a longer time ago and added it to there Cloud APIs using the same authentication methods:

Authentication: For authenticating directly against the REST API, the Insight in Jira Service Management REST API supports basic auth (see Basic auth for REST APIs).
Reference https://developer.atlassian.com/cloud/insight/intro/introduction-and-basics/

Additional context

REST Documentation: https://developer.atlassian.com/cloud/insight/rest/

Implemented API

Icon:

  • GET /icon/{id}
  • GET /icon/global

Import:

  • POST /import/start/{id}

Iql:

  • GET /iql/objects

Object:

  • GET /objects/{id}
  • PUT /objects/{id}
  • DELETE /objects/{id}
  • GET /objects/{id}/attributes
  • GET /objects/{id}/history
  • GET /objects/{id}/referenceinfo
  • POST /objects/create
  • POST /objects/navlist/iql

Objectconnectedtickets:

  • GET /objectconnectedtickets/{objectId}/tickets

Objectschema:

  • GET /objectschema/list
  • POST /objectschema/create
  • GET /objectschema/{id}
  • PUT /objectschema/{id}
  • DELETE /objectschema/{id}
  • GET /objectschema/{id}/attributes
  • GET /objectschema/{id}/objecttypes/flat

Objecttype:

  • GET /objecttype/list
  • PUT /objecttype/{id}
  • DELETE /objecttype/{id}
  • GET /objecttype/{id}/attributes
  • POST /objecttype/{id}/position
  • POST /objecttype/create

Objecttypeattribute:

  • POST /objecttypeattribute/{objectTypeId}
  • PUT /objecttypeattribute/{objectTypeId}/{id}
  • DELETE /objecttypeattribute/{id}

Progress:

  • GET /progress/category/import/{id}

Config:

  • GET /config/statustype
  • POST /config/statustype
  • GET /config/statustype/{id}
  • PUT /config/statustype/{id}
  • DELETE /config/statustype/{id}

Global:

  • POST /global/config/objectschema/{id}/property
@andygrunwald andygrunwald added this to the Road to v2 milestone Aug 25, 2022
@andygrunwald
Copy link
Owner

@Fank Fank mentioned this issue Sep 12, 2022
2 tasks
@Fank
Copy link
Contributor Author

Fank commented Sep 15, 2022

@andygrunwald While implementing #565 i noticed that all endpoints require a workspace id.
So I came up with some ideas right now, should we go for:

client := NewClient(...)
client.Insight.ObjectType.GetAttributes("MyWorkspaceID", "ID")
client := NewClient(...)
client.Insight("MyWorkspaceID").ObjectType.GetAttributes("ID")
client := NewClient(...)
client.Insight.ObjectType.GetAttributes("MyWorkspaceID", "ID")

client2 := NewClient(...)
client2.InsightWithWorkspace("MyWorkspaceID").ObjectType.GetAttributes("ID")
// which is a wrapper for
// client2.Insight.ObjectType.GetAttributes("MyWorkspaceID", "ID")
// so you can do something like:

insight := client2.InsightWithWorkspace("MyWorkspaceID")
insight.ObjectType.Get("ID")
insight.ObjectType.GetAttributes("ID")
...

@andygrunwald
Copy link
Owner

Personally, I am in favor of option 1, because

  • it is pretty easy to understand from a caller perspective
  • the library might end up being more simple due to no logic to "hold" the workspace id
  • it fits other areas of the library (e.g., where kanban or sprint id needs to be added)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants