Open Context Protocol is live! 🚀 Read the launch post
projectsGetForUser

projectsGetForUser

Get project for user

Details

  • Method: GET
  • Path: /users/{username}/projectsV2/{project_number}
  • Operation ID: projects/get-for-user

Parameters

{
  "project_number": {
    "description": "The project's number.",
    "required": true,
    "location": "path",
    "type": "integer"
  },
  "username": {
    "description": "The handle for the GitHub user account.",
    "required": true,
    "location": "path",
    "type": "string"
  }
}

Response Schema

{
  "title": "Projects v2 Project",
  "description": "A projects v2 project",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "The unique identifier of the project."
    },
    "node_id": {
      "type": "string",
      "description": "The node ID of the project."
    },
    "owner": {
      "title": "Simple User",
      "description": "A GitHub user.",
      "type": "object",
      "properties": {
        "name": {
          "nullable": true,
          "type": "string"
        },
        "email": {
          "nullable": true,
          "type": "string"
        },
        "login": {
          "type": "string",
          "example": "octocat"
        },
        "id": {
          "type": "integer",
          "format": "int64",
          "example": 1
        },
        "node_id": {
          "type": "string",
          "example": "MDQ6VXNlcjE="
        },
        "avatar_url": {
          "type": "string",
          "format": "uri",
          "example": "https://github.com/images/error/octocat_happy.gif"
        },
        "gravatar_id": {
          "type": "string",
          "example": "41d064eb2195891e12d0413f63227ea7",
          "nullable": true
        },
        "url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat"
        },
        "html_url": {
          "type": "string",
          "format": "uri",
          "example": "https://github.com/octocat"
        },
        "followers_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/followers"
        },
        "following_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/following{/other_user}"
        },
        "gists_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/gists{/gist_id}"
        },
        "starred_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
        },
        "subscriptions_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/subscriptions"
        },
        "organizations_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/orgs"
        },
        "repos_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/repos"
        },
        "events_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/events{/privacy}"
        },
        "received_events_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/received_events"
        },
        "type": {
          "type": "string",
          "example": "User"
        },
        "site_admin": {
          "type": "boolean"
        },
        "starred_at": {
          "type": "string",
          "example": "\"2020-07-09T00:17:55Z\""
        },
        "user_view_type": {
          "type": "string",
          "example": "public"
        }
      },
      "required": [
        "avatar_url",
        "events_url",
        "followers_url",
        "following_url",
        "gists_url",
        "gravatar_id",
        "html_url",
        "id",
        "node_id",
        "login",
        "organizations_url",
        "received_events_url",
        "repos_url",
        "site_admin",
        "starred_url",
        "subscriptions_url",
        "type",
        "url"
      ]
    },
    "creator": {
      "title": "Simple User",
      "description": "A GitHub user.",
      "type": "object",
      "properties": {
        "name": {
          "nullable": true,
          "type": "string"
        },
        "email": {
          "nullable": true,
          "type": "string"
        },
        "login": {
          "type": "string",
          "example": "octocat"
        },
        "id": {
          "type": "integer",
          "format": "int64",
          "example": 1
        },
        "node_id": {
          "type": "string",
          "example": "MDQ6VXNlcjE="
        },
        "avatar_url": {
          "type": "string",
          "format": "uri",
          "example": "https://github.com/images/error/octocat_happy.gif"
        },
        "gravatar_id": {
          "type": "string",
          "example": "41d064eb2195891e12d0413f63227ea7",
          "nullable": true
        },
        "url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat"
        },
        "html_url": {
          "type": "string",
          "format": "uri",
          "example": "https://github.com/octocat"
        },
        "followers_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/followers"
        },
        "following_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/following{/other_user}"
        },
        "gists_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/gists{/gist_id}"
        },
        "starred_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
        },
        "subscriptions_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/subscriptions"
        },
        "organizations_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/orgs"
        },
        "repos_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/repos"
        },
        "events_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/events{/privacy}"
        },
        "received_events_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/received_events"
        },
        "type": {
          "type": "string",
          "example": "User"
        },
        "site_admin": {
          "type": "boolean"
        },
        "starred_at": {
          "type": "string",
          "example": "\"2020-07-09T00:17:55Z\""
        },
        "user_view_type": {
          "type": "string",
          "example": "public"
        }
      },
      "required": [
        "avatar_url",
        "events_url",
        "followers_url",
        "following_url",
        "gists_url",
        "gravatar_id",
        "html_url",
        "id",
        "node_id",
        "login",
        "organizations_url",
        "received_events_url",
        "repos_url",
        "site_admin",
        "starred_url",
        "subscriptions_url",
        "type",
        "url"
      ]
    },
    "title": {
      "type": "string",
      "description": "The project title."
    },
    "description": {
      "type": "string",
      "nullable": true,
      "description": "A short description of the project."
    },
    "public": {
      "type": "boolean",
      "description": "Whether the project is visible to anyone with access to the owner."
    },
    "closed_at": {
      "type": "string",
      "format": "date-time",
      "example": "2022-04-28T12:00:00Z",
      "nullable": true,
      "description": "The time when the project was closed."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "example": "2022-04-28T12:00:00Z",
      "description": "The time when the project was created."
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "example": "2022-04-28T12:00:00Z",
      "description": "The time when the project was last updated."
    },
    "number": {
      "type": "integer",
      "description": "The project number."
    },
    "short_description": {
      "type": "string",
      "nullable": true,
      "description": "A concise summary of the project."
    },
    "deleted_at": {
      "type": "string",
      "format": "date-time",
      "example": "2022-04-28T12:00:00Z",
      "nullable": true,
      "description": "The time when the project was deleted."
    },
    "deleted_by": {
      "title": "Simple User",
      "description": "A GitHub user.",
      "type": "object",
      "properties": {
        "name": {
          "nullable": true,
          "type": "string"
        },
        "email": {
          "nullable": true,
          "type": "string"
        },
        "login": {
          "type": "string",
          "example": "octocat"
        },
        "id": {
          "type": "integer",
          "format": "int64",
          "example": 1
        },
        "node_id": {
          "type": "string",
          "example": "MDQ6VXNlcjE="
        },
        "avatar_url": {
          "type": "string",
          "format": "uri",
          "example": "https://github.com/images/error/octocat_happy.gif"
        },
        "gravatar_id": {
          "type": "string",
          "example": "41d064eb2195891e12d0413f63227ea7",
          "nullable": true
        },
        "url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat"
        },
        "html_url": {
          "type": "string",
          "format": "uri",
          "example": "https://github.com/octocat"
        },
        "followers_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/followers"
        },
        "following_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/following{/other_user}"
        },
        "gists_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/gists{/gist_id}"
        },
        "starred_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
        },
        "subscriptions_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/subscriptions"
        },
        "organizations_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/orgs"
        },
        "repos_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/repos"
        },
        "events_url": {
          "type": "string",
          "example": "https://api.github.com/users/octocat/events{/privacy}"
        },
        "received_events_url": {
          "type": "string",
          "format": "uri",
          "example": "https://api.github.com/users/octocat/received_events"
        },
        "type": {
          "type": "string",
          "example": "User"
        },
        "site_admin": {
          "type": "boolean"
        },
        "starred_at": {
          "type": "string",
          "example": "\"2020-07-09T00:17:55Z\""
        },
        "user_view_type": {
          "type": "string",
          "example": "public"
        }
      },
      "required": [
        "avatar_url",
        "events_url",
        "followers_url",
        "following_url",
        "gists_url",
        "gravatar_id",
        "html_url",
        "id",
        "node_id",
        "login",
        "organizations_url",
        "received_events_url",
        "repos_url",
        "site_admin",
        "starred_url",
        "subscriptions_url",
        "type",
        "url"
      ],
      "nullable": true
    },
    "state": {
      "type": "string",
      "enum": [
        "open",
        "closed"
      ],
      "description": "The current state of the project."
    },
    "latest_status_update": {
      "title": "Projects v2 Status Update",
      "description": "An status update belonging to a project",
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "The unique identifier of the status update."
        },
        "node_id": {
          "type": "string",
          "description": "The node ID of the status update."
        },
        "project_node_id": {
          "type": "string",
          "description": "The node ID of the project that this status update belongs to."
        },
        "creator": {
          "title": "Simple User",
          "description": "A GitHub user.",
          "type": "object",
          "properties": {
            "name": {
              "nullable": true,
              "type": "string"
            },
            "email": {
              "nullable": true,
              "type": "string"
            },
            "login": {
              "type": "string",
              "example": "octocat"
            },
            "id": {
              "type": "integer",
              "format": "int64",
              "example": 1
            },
            "node_id": {
              "type": "string",
              "example": "MDQ6VXNlcjE="
            },
            "avatar_url": {
              "type": "string",
              "format": "uri",
              "example": "https://github.com/images/error/octocat_happy.gif"
            },
            "gravatar_id": {
              "type": "string",
              "example": "41d064eb2195891e12d0413f63227ea7",
              "nullable": true
            },
            "url": {
              "type": "string",
              "format": "uri",
              "example": "https://api.github.com/users/octocat"
            },
            "html_url": {
              "type": "string",
              "format": "uri",
              "example": "https://github.com/octocat"
            },
            "followers_url": {
              "type": "string",
              "format": "uri",
              "example": "https://api.github.com/users/octocat/followers"
            },
            "following_url": {
              "type": "string",
              "example": "https://api.github.com/users/octocat/following{/other_user}"
            },
            "gists_url": {
              "type": "string",
              "example": "https://api.github.com/users/octocat/gists{/gist_id}"
            },
            "starred_url": {
              "type": "string",
              "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}"
            },
            "subscriptions_url": {
              "type": "string",
              "format": "uri",
              "example": "https://api.github.com/users/octocat/subscriptions"
            },
            "organizations_url": {
              "type": "string",
              "format": "uri",
              "example": "https://api.github.com/users/octocat/orgs"
            },
            "repos_url": {
              "type": "string",
              "format": "uri",
              "example": "https://api.github.com/users/octocat/repos"
            },
            "events_url": {
              "type": "string",
              "example": "https://api.github.com/users/octocat/events{/privacy}"
            },
            "received_events_url": {
              "type": "string",
              "format": "uri",
              "example": "https://api.github.com/users/octocat/received_events"
            },
            "type": {
              "type": "string",
              "example": "User"
            },
            "site_admin": {
              "type": "boolean"
            },
            "starred_at": {
              "type": "string",
              "example": "\"2020-07-09T00:17:55Z\""
            },
            "user_view_type": {
              "type": "string",
              "example": "public"
            }
          },
          "required": [
            "avatar_url",
            "events_url",
            "followers_url",
            "following_url",
            "gists_url",
            "gravatar_id",
            "html_url",
            "id",
            "node_id",
            "login",
            "organizations_url",
            "received_events_url",
            "repos_url",
            "site_admin",
            "starred_url",
            "subscriptions_url",
            "type",
            "url"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "example": "2022-04-28T12:00:00Z",
          "description": "The time when the status update was created."
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "example": "2022-04-28T12:00:00Z",
          "description": "The time when the status update was last updated."
        },
        "status": {
          "type": "string",
          "enum": [
            "INACTIVE",
            "ON_TRACK",
            "AT_RISK",
            "OFF_TRACK",
            "COMPLETE"
          ],
          "nullable": true,
          "description": "The current status."
        },
        "start_date": {
          "type": "string",
          "format": "date",
          "example": "2022-04-28",
          "description": "The start date of the period covered by the update."
        },
        "target_date": {
          "type": "string",
          "format": "date",
          "example": "2022-04-28",
          "description": "The target date associated with the update."
        },
        "body": {
          "description": "Body of the status update",
          "example": "The project is off to a great start!",
          "type": "string",
          "nullable": true
        }
      },
      "required": [
        "id",
        "node_id",
        "created_at",
        "updated_at"
      ],
      "nullable": true
    },
    "is_template": {
      "type": "boolean",
      "description": "Whether this project is a template"
    }
  },
  "required": [
    "id",
    "node_id",
    "owner",
    "creator",
    "title",
    "description",
    "public",
    "closed_at",
    "created_at",
    "updated_at",
    "number",
    "short_description",
    "deleted_at",
    "deleted_by"
  ]
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('github')

# Call this tool
result = await agent.call_tool('projectsGetForUser', {
    # Add required parameters here
})