Repositories

Repositories represent or integrate the actual research data object for object. They are hosted by applications on their own and are provided and connected through babili.

Will all be renamed to collections

Get your repositories

GET /user/repos

List user repositories

GET /users/:username/repos

Get a repository

GET /repositories/:id

GET /repositories/aggregations

Get all repositories

Lists all repositories, ordered by id.

GET /repositories

-> What about pagination?

Response

Status: 200 OK
[
  {

  }
]

List repos by resources

GET /repositories/resources/:uid

obligatory attributes:


  • ['type'] your app results scope(s)

  • ['full_entry'] what is displayed as result text

  • ['links']['human'] link to results origin url

searchable attributes recommendation:


  • name

Set an manage tokens

You can only manage tokens for the authorized user.

Get a list of all user tokens for a repository.

GET /repositories/:id/tokens

Response

[
  {
    id: 15,
    resource_owner_id: 1,
    application_id: 1,
    token: "eoz12K4rioJxc9DToySVpjmz",
    refresh_token: null,
    expires_in: null,
    token_type: "Token",
    created_at: "2017-10-05T16:36:01.761Z",
    updated_at: "2017-10-05T16:36:01.761Z"
  }
]

Get a single token for a repository

GET /repositories/:id/tokens/:id

Response

The single token object.

Revoke a token

DELETE /repositories/:id/tokens/:id

Response

Simple status code 204.

Create a new token for a repository

POST /repositories/:id/tokens

Params:
token string required
token_type string type of 'Token' or 'Bearer', defaults to 'Token'
refresh_token string
expires_in

Response

The new token.

adgb

local service api