Skip to content

Latest commit

 

History

History
59 lines (47 loc) · 2.67 KB

stack.md

File metadata and controls

59 lines (47 loc) · 2.67 KB

Stack

A Stack represents a collection of Projects used by a single person. A Stack belongs to an Account.

A Stack contains zero or more StackEntries, each of which links the Stack to a single Project.

Properties

  • id The unique ID for the Stack.
  • title The name of the Stack.
  • description A short description about this Stack.
  • updated_at The most recent time at which any Projects were added to or removed from this Stack.
  • project_count The total number of Projects currently contained in this Stack.
  • stack_entries A collection of zero or more StackEntries. If the Stack object was returned in response to a collection request (/projects/x/stacks.xml), you will receive only a single StackEntry corresponding to the Project in question.
  • account_id The unique ID of the Account which owns this Stack.
  • account For convenience, a full Account object may be included here. If the stack object was returned in response to a collection request (for example, - /projects/{project_id}/stacks.xml), the Account objects will be present.

URL

To get a single Stack belonging to an Account:

curl https://www.openhub.net/accounts/{account_id}/stacks/{stack_id}.xml 

A handy shortcut for getting the default Stack for an Account when you don’t know the stack_id:

curl https://www.openhub.net/accounts/{account_id}/stacks/default.xml 

This method is not paginated — you will always receive a single Stack. However, this Stack may contain a very large number of StackEntries within it. Each StackEntry will include a full Project object.

If you do not know the Account ID, you can also retrieve the Stack using the MD5 hash of the email address. Read more about email-based queries here.

Collection URL

To get a list of all Stacks for a particular Project:

GET https://www.openhub.net/projects/{project_id}/stacks.xml 

The Stacks returned in this collection will each contain only a single StackEntry, corresponding to the Project in question.

Each Stack in the result will also include an Account object.

The Stack collection is paginated, and supports the standard collection request parameters with the following details:

  • query If supplied, only Stacks owned by Accounts with names matching the query string will be returned.
  • sort Stack collections support the following sort options:
    • id
    • name (default)
    • created_at Time at which the Project was added to the stack
    • project_count