REST API - /projects - Unable to manage projects via REST endpoints #28932
-
|
Since the Project (classic) is deprecation, I have unable to manage projects using the GitHub API (https://api.github.com/projects) due to either; Authentication failure, 404, or empty response data. The docs (https://docs.github.com/rest/reference/projects#get-a-project) appears rto be out of date as it is references I can confirm:
Example cURLsRequest:Response:Request:Response:NB: Even if I omit the Many thanks |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 1 reply
-
|
Hi! I was facing this issue these days, and I was wondering if I was the only one to face this problem, so good to know that we're not alone haha. I might find an answer. I'm still working on it, so I still don't know if this is the way to do it. But it seems now that we have to move to the GraphQL endpoint for managing project : https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects Don't know if that works with Project (classic) though. But seems to me to be the only option we have now. |
Beta Was this translation helpful? Give feedback.
-
|
Still broken it's seems |
Beta Was this translation helpful? Give feedback.
-
|
Hopefully they'll someday do a REST version of the new Projects. The GraphQL API is terrible. |
Beta Was this translation helpful? Give feedback.
-
|
I'm also looking for a REST solution for the new Projects. |
Beta Was this translation helpful? Give feedback.
-
|
Hey, So, if you're still interested by this topic, here are some updates --> It seems that the REST API for GitHub Project (classic) will be deprecated, since the Project (classic) will disappear one day – I guess. So, if you want to work on something that will sustain, the best is to move to the new GitHub Project, then to make requests with the GraphQL API. Regarding how the new Project has been designed, it make sense to use GraphQL, because Project can now be customised at will, so requests needs to be adapted to the way you have design your Project board. Tbh, I'm still not comfortable with GraphQL. But that's the only way to pull data from our Project at the moment. Idk if that can help, but in case, here is the request that I use for request our Project board: query {
node(id: $node) {
... on ProjectV2 {
items(first: 100) {
nodes {
id
fieldValues(first: 10) {
nodes {
... on ProjectV2ItemFieldTextValue {
text
field {
... on ProjectV2FieldCommon {
name
}
}
}
... on ProjectV2ItemFieldDateValue {
date
field {
... on ProjectV2FieldCommon {
name
}
}
}
... on ProjectV2ItemFieldSingleSelectValue {
name
field {
... on ProjectV2FieldCommon {
name
}
}
}
... on ProjectV2ItemFieldRepositoryValue {
repository {
name
}
field {
... on ProjectV2FieldCommon {
name
}
}
}
}
}
}
}
}
}
}You have the basis of this request – plus other examples - here : https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects#finding-information-about-items-in-a-project |
Beta Was this translation helpful? Give feedback.
-
|
Nowadays, does anyone have the above-mentioned issue? I am getting the same issue! |
Beta Was this translation helpful? Give feedback.
-
|
This is a shame. I understand that GraphQL makes a lot more sense with it having efficient queries. However there are legacy open-source projects that depend on the old API that are now dead code. |
Beta Was this translation helpful? Give feedback.
-
|
Yea you can't even query projects through orgs anymore through |
Beta Was this translation helpful? Give feedback.
Hi! I was facing this issue these days, and I was wondering if I was the only one to face this problem, so good to know that we're not alone haha.
I might find an answer. I'm still working on it, so I still don't know if this is the way to do it. But it seems now that we have to move to the GraphQL endpoint for managing project : https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects
Don't know if that works with Project (classic) though. But seems to me to be the only option we have now.