You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Introduction

To automate the interaction with ACE, you can use its REST client API. Typical use cases include the tight integration of ACE into your development or automated build process, or the creation of a custom user interface or integration.

This is still a work in progress which you can track in ACE-151.

Overview

Before we dive into the various REST endpoints, let's start with an overview of how all of this works. Everything in ACE is an entity. For example, an artifact or a feature is an entity, but also the association between an artifact and a feature is. Entities have properties and tags. Properties are the "fixed" attributes that make up a specific type of entity. For example a feature has a name and a description. If you know the type of entity, its properties are also known. Tags on the other hand are attributes that a user can freely add and refer to.

The following diagram shows the different entities that ACE knows:

Checkout and commit

Similar to the web based UI, this API also works with the concept of checking out a copy to a local working area, altering it in that working area and then committing it back to the server.

POST /work

Creates a working copy for you, with its own ID, and redirects you to it. (For the contents of this working copy, see below.)

Response:

  • 302 /work/ID

DELETE /work/ID

Deletes the working copy. Signals you're done with it, without transferring the data back to the server.

POST /work/ID

Sets the working copy to be the current version. We keep track of whether you have based your copy on, and will reject the update if it is no longer the latest.

Response:

  • 200
  • 409

Repositories and objects

Now you have a working copy, you can start working with it.

GET /work/ID

Gets you a list of all repositories you can use. Should return: ["artifact", "feature", "distribution", "target", "artifact2feature", "feature2distribution", "distribution2target"]

GET /work/ID/feature

Lists all feature IDs in the feature repository.

POST /work/ID/feature

Creates a new feature. In the post body, you can specify attributes and tags, for example: {attributes: {key: "value"}, tags: {key: "value"}}.

Response:

  • 302 /work/ID/feature/FID
  • 400

GET /work/ID/feature/FID

Returns a representation of the object, for example: {attributes: {key: "value"}, tags: {key: "value"}}.

PUT /work/ID/feature/FID

Updates the object with the JSON data you supply.

Response:

  • 200
  • 400
  • 404

DELETE /work/ID/feature/FID

Deletes the object.

Response:

  • 200
  • 404
  • No labels