This describes the resources that make up the official Griffon Portal API v1.



Connection

All API access is over HTTP, and accessed from http://artifacts.griffon-framework.org/api. All data is received as JSON unless an artifact file or checksum is requested.

$ curl -i http://artifacts.griffon-framework.org/api/plugins

        HTTP/1.1 200 OK
        Server: Apache-Coyote/1.1
        Content-Type: application/json;charset=UTF-8
        Transfer-Encoding: chunked
        Date: Tue, 20 Dec 2011 12:20:40 GMT

        []
      

Errors

All requests that result in a not found record will receive an HTTP 404 error in response, with a JSON payload containing the parameters sent.

$ curl -i http://localhost:8080/griffon-artifact-portal/api/plugins/bogus

        HTTP/1.1 404 Not Found
        Server: Apache-Coyote/1.1
        Content-Type: application/json;charset=UTF-8
        Transfer-Encoding: chunked
        Date: Tue, 20 Dec 2011 12:25:26 GMT

        {
            "action": "info",
            "response": "Not Found",
            "params": {
                "type": "plugin",
                "name": "bogus"
            }
        }
      


All artifacts

Obtain a list of all available plugins and/or archetypes by defining /plugins or /archetypes in the path.

Successful responses will list artifacts sorted alphabetically by name. Releases will be sorted by their version in descending order.

$ curl -i http://artifacts.griffon-framework.org/api/plugins

        HTTP/1.1 200 OK
        Server: Apache-Coyote/1.1
        Content-Type: application/json;charset=UTF-8
        Transfer-Encoding: chunked
        Date: Tue, 20 Dec 2011 12:20:40 GMT

        [
            {
                "name": "glazedlists",
                "title": "Adds GlazedLists support to Views",
                "license": "Apache Software License 2.0",
                "source": "https://github.com/griffon/griffon-glazedlists-plugin",
                "documentation": "",
                "toolkits": "swing",
                "platforms": "",
                "framework": false,
                "authors": [
                    {
                        "name": "Andres Almiray",
                        "email": "aalmiray@yahoo.com"
                    }
                ],
                "releases": [
                    {
                        "version": "1.0",
                        "griffonVersion": "0.9.5 > *",
                        "date": "2011-12-20T13:39:45+0100",
                        "checksum": "bf05ac0ad0bfedeeeacbf53c7f0c884b"
                        "comment": "First release",
		                "dependencies": [
		                    {
		                        "name": "swing",
		                        "version": "0.9.5"
		                    }
		                ]
                    }
                ]
            }
        ]
      

Single artifact

Use /plugins/<name> or /archetypes/<name> where <name> stands in for the artifact you'd like to query. Notice that the response will include a new element description that may contain a Markdown formatted description of the artifact's capabilities.

Releases will be sorted by their version in descending order.

$ curl -i http://artifacts.griffon-framework.org/api/plugins/glazedlists

        HTTP/1.1 200 OK
        Server: Apache-Coyote/1.1
        Content-Type: application/json;charset=UTF-8
        Transfer-Encoding: chunked
        Date: Tue, 20 Dec 2011 12:20:40 GMT

        {
            "name": "glazedlists",
            "title": "Adds GlazedLists support to Views",
            "description": "Adds GlazedLists support to Views",
            "license": "Apache Software License 2.0",
            "source": "https://github.com/griffon/griffon-glazedlists-plugin",
            "documentation": "",
            "toolkits": "swing",
            "platforms": ""
            "framework": false,
            "authors": [
                {
                    "name": "Andres Almiray",
                    "email": "aalmiray@yahoo.com"
                }
            ],
            "releases": [
                {
                    "version": "1.0",
                    "griffonVersion": "0.9.5 > *",
                    "date": "2011-12-20T13:39:45+0100",
                    "checksum": "bf05ac0ad0bfedeeeacbf53c7f0c884b"
                    "comment": "First release",
	                "dependencies": [
	                    {
	                        "name": "swing",
	                        "version": "0.9.5"
	                    }
	                ]
                }
            ]
        }
      

Single release

Use /plugins/<name>/<version> or /archetypes/<name>/<version> where <name> stands in for the artifact you'd like to query; <version> stands in for a particular release. Notice that the response will include a new element description that may contain a Markdown formatted description of the artifact's capabilities.

Releases will be sorted by their version in descending order.

$ curl -i http://artifacts.griffon-framework.org/api/plugins/glazedlists/1.0

        HTTP/1.1 200 OK
        Server: Apache-Coyote/1.1
        Content-Type: application/json;charset=UTF-8
        Transfer-Encoding: chunked
        Date: Tue, 20 Dec 2011 12:20:40 GMT

        {
            "name": "glazedlists",
            "title": "Adds GlazedLists support to Views",
            "description": "Adds GlazedLists support to Views",
            "license": "Apache Software License 2.0",
            "source": "https://github.com/griffon/griffon-glazedlists-plugin",
            "documentation": "",
            "toolkits": "swing",
            "platforms": ""
            "framework": false,
            "authors": [
                {
                    "name": "Andres Almiray",
                    "email": "aalmiray@yahoo.com"
                }
            ],
            "release":
                {
                    "version": "1.0",
                    "griffonVersion": "0.9.5 > *",
                    "date": "2011-12-20T13:39:45+0100",
                    "checksum": "bf05ac0ad0bfedeeeacbf53c7f0c884b"
                    "comment": "First release",
	                "dependencies": [
	                    {
	                        "name": "swing",
	                        "version": "0.9.5"
	                    }
	                ]
                }
        }
      
$ curl -i http://artifacts.griffon-framework.org/api/archetypes/swt/0.1

        HTTP/1.1 200 OK
        Server: Apache-Coyote/1.1
        Content-Type: application/json;charset=UTF-8
        Transfer-Encoding: chunked
        Date: Tue, 20 Dec 2011 12:20:40 GMT

        {
            "name": "swt",
            "title": "Initializes an application with SWT support",
            "description": "Initializes an application with SWT support",
            "license": "Apache Software License 2.0",
            "source": "https://github.com/griffon/griffon-swt-archetype",
            "documentation": "",
            "authors": [
                {
                    "name": "Andres Almiray",
                    "email": "aalmiray@yahoo.com"
                }
            ],
            "release":
                {
                    "version": "0.1",
                    "griffonVersion": "0.9.5 > *",
                    "date": "2011-12-20T13:39:45+0100",
                    "checksum": "bf05ac0ad0bfedeeeacbf53c7f0c884b"
                    "comment": "First release",
                    "dependencies": []
                }
        }
      


Artifacts

Use /plugins/<name>/<version>/download or /archetypes/<name>/<version>/download where <name> stands in for the artifact you'd like to query; <version> stands in for a particular release.

$ curl -i http://artifacts.griffon-framework.org/api/plugins/glazedlists/1.0/download

        HTTP/1.1 200 OK
        Server: Apache-Coyote/1.1
        Cache-Control: must-revalidate
        Accept-Ranges: bytes
        Last-Modified: Tue, 20 Dec 2011 13:39:45 CET
        Content-disposition: attachment; filename=griffon-glazedlists-1.0.zip
        Content-Type: application/octet-stream
        Content-Length: 173550
        Date: Tue, 20 Dec 2011 13:20:22 GMT

        *BINARY DATA*
      

Stats

Should you choose to help us gather download data that can be used to provide better services in the future please add any of the following HTTP headers to the download instructions.

$ curl -H 'X-Griffon-Version:0.9.5' -H 'X-Java-Version:1.6.0_29' -H 'X-Os-Name:Mac Os X' -H 'X-Os-Version:10.6.8' -H 'X-Os-Arch:x86_64' -H 'X-Java-Vm-Version:20.4-b02-402' -H 'X-Java-Vm-Name:Java HotSpot(TM) 64-Bit Server VM' http://artifacts.griffon-framework.org/api/plugins/glazedlists/1.0/download

Name Value
X-Griffon-Version Metadata.current.getGriffonVersion()
X-Java-Version System.getProperty('java.version')
X-Os-Name System.getProperty('os.name')
X-Os-Version System.getProperty('os.version')
X-Os-arch System.getProperty('os.arch')
X-Java-Vm-Version System.getProperty('java.vm.version')
X-Java-Vm-Name System.getProperty('java.vm.name')


Metadata

It's possible to query all kinds of artifact metadata using an Ivy style repository with custom layout.

/repository/plugins/
Returns a JSON list of all plugins.

/repository/plugins/<name>
Returns metadata for a plugin named <name>.

/repository/plugins/<name>/<version>
Returns metadata for a plugin named <name> with version <version>.

/repository/plugins/<name>/<version>/griffon-<name>-<version>.zip
Downloads the plugin named <name> with version <version>.

/repository/plugins/<name>/<version>/griffon-<name>-<version>.zip.md5
Downloads the plugin's checksum whose name matches <name> and version matches <version>.

/repository/plugins/<name>/<version>/griffon-<name>-<version>-release.zip
Downloads the plugin's release whose name matches <name> and version matches <version>.



/repository/archetypes/
Returns a JSON list of all archetypes.

/repository/archetypes/<name>
Returns metadata for a archetype named <name>.

/repository/archetypes/<name>/<version>
Returns metadata for a archetype named <name> with version <version>.

/repository/archetypes/<name>/<version>/griffon-<name>-<version>.zip
Downloads the archetype named <name> with version <version>.

/repository/archetypes/<name>/<version>/griffon-<name>-<version>.zip.md5
Downloads the archetype's checksum whose name matches <name> and version matches <version>.

/repository/archetypes/<name>/<version>/griffon-<name>-<version>-release.zip
Downloads the archetype's release whose name matches <name> and version matches <version>.