Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Marketplace/REST"
(New page: == Eclipse Marketplace REST API Documentation == Marketplace has the ability to display the content of a listing in a simplified XML. Simply when viewing a Solutions Listing or a Train...) |
|||
Line 1: | Line 1: | ||
== Eclipse Marketplace REST API Documentation == | == Eclipse Marketplace REST API Documentation == | ||
− | Marketplace | + | Marketplace supports three different types of URLs to fetch data in XML format. |
− | + | 1. Base URL - http://marketplace.eclipse.org/xml <br> | |
− | + | *this will return a listing of markets and the categories they contain. <br> | |
− | + | <br> | |
− | + | ||
− | + | 2. Category URL - http://marketplace.eclipse.org/taxonomy/term/%/xml <br> | |
+ | *this will return a listing of solution title as well as the id of that node for use in node URLs<br> | ||
+ | *% is defined as the ID of a category. <br> | ||
+ | *If you wish to cross-reference a category with a market you would seperate the ids by a , (comma) in the % argument. <br> | ||
+ | *example: http://marketplace.eclipse.org/taxonomy/term/2/xml will return all results for the Code Management category.<br> | ||
+ | *example: http://marketplace.eclipse.org/taxonomy/term/2,39/xml will return all results for the Code Management category and Tools Market<br> | ||
− | + | <br> | |
− | + | 3. Node URL ex http://marketplace.eclipse.org/node/%/xml | |
− | * Type - this is the type of listing being returned. | + | *this will return a listing of contents of a node.<br> |
− | * Body - this field can and most likely contains HTML markup. | + | *Most fields in the XML document are self explanitory. However there are a few fields that require explanation. |
− | * Created - this field is when the listing was first created. It is the number of seconds since the epoch. | + | *Type - this is the type of listing being returned. 'training' is for a Training and Consulting Listing, 'resource' is for a solutions listing. |
− | * Changed - this field is the last time this listing was changed. | + | *Body - this field can and most likely contains HTML markup. This also applies to the Training and Consulting Fields (trainingdesc and consultingdesc) |
− | * FoundationMember - this is a boolean field. | + | *Created - this field is when the listing was first created. It is the number of seconds since the epoch. See http://us.php.net/manual/en/function.time.php for more details. |
+ | *Changed - this field is the last time this listing was changed. It is the number of seconds since the epoch. See http://us.php.net/manual/en/function.time.php for more details. | ||
+ | *FoundationMember - this is a boolean field. 0 meaning No, 1 meaning Yes. | ||
+ | |||
+ | <br> | ||
+ | |||
+ | = Building a Catalog<br> = | ||
+ | |||
+ | In terms of building your own catalog with this data you would follow a three step process. | ||
+ | |||
+ | #Query the Base URL for a listing of Markets and their categories. | ||
+ | #Iterate through that query to retrieve listings for each category using the Category URL. | ||
+ | #Finally iterate through the Category Query to retrieve the data related to each node. |
Revision as of 16:57, 12 November 2009
Eclipse Marketplace REST API Documentation
Marketplace supports three different types of URLs to fetch data in XML format.
1. Base URL - http://marketplace.eclipse.org/xml
- this will return a listing of markets and the categories they contain.
2. Category URL - http://marketplace.eclipse.org/taxonomy/term/%/xml
- this will return a listing of solution title as well as the id of that node for use in node URLs
- % is defined as the ID of a category.
- If you wish to cross-reference a category with a market you would seperate the ids by a , (comma) in the % argument.
- example: http://marketplace.eclipse.org/taxonomy/term/2/xml will return all results for the Code Management category.
- example: http://marketplace.eclipse.org/taxonomy/term/2,39/xml will return all results for the Code Management category and Tools Market
3. Node URL ex http://marketplace.eclipse.org/node/%/xml
- this will return a listing of contents of a node.
- Most fields in the XML document are self explanitory. However there are a few fields that require explanation.
- Type - this is the type of listing being returned. 'training' is for a Training and Consulting Listing, 'resource' is for a solutions listing.
- Body - this field can and most likely contains HTML markup. This also applies to the Training and Consulting Fields (trainingdesc and consultingdesc)
- Created - this field is when the listing was first created. It is the number of seconds since the epoch. See http://us.php.net/manual/en/function.time.php for more details.
- Changed - this field is the last time this listing was changed. It is the number of seconds since the epoch. See http://us.php.net/manual/en/function.time.php for more details.
- FoundationMember - this is a boolean field. 0 meaning No, 1 meaning Yes.
Building a Catalog
In terms of building your own catalog with this data you would follow a three step process.
- Query the Base URL for a listing of Markets and their categories.
- Iterate through that query to retrieve listings for each category using the Category URL.
- Finally iterate through the Category Query to retrieve the data related to each node.