Backpack API

Journal

List Everyone

GET /journal_entries.xml?n=0&count=100

Lists journal entries aggregated across all users in the account. By default, only the first 100 entries will be returned, but you can specify a smaller window size via the "count" query parameter, and you can select a different page of entries via the "n" query parameter. Both "count" and "n" are optional; "count" defaults to 100 (which is also the maximum size), and "n" defaults to 0 (the first page).

Response

Status: 200 OK

<journal-entries type="array">
  <journal-entry>
    <body>...</body>
    <created-at type="datetime">...</created-at>
    <id type="integer">...</id>
    <updated-at type="datetime">...</updated-at>
    <user>
      <id type="integer">...</id>
      <name>...</name>
    </user>
  </journal-entry>
  ...
</journal-entries>

List User

GET /users/#{user_id}/journal_entries.xml?n=0&count=100

Lists journal entries for a specific user. By default, only the first 100 entries will be returned, but you can specify a smaller window size via the "count" query parameter, and you can select a different page of entries via the "n" query parameter. Both "count" and "n" are optional; "count" defaults to 100 (which is also the maximum size), and "n" defaults to 0 (the first page).

Response

Status: 200 OK

<journal-entries type="array">
  <journal-entry>
    <body>...</body>
    <created-at type="datetime">...</created-at>
    <id type="integer">...</id>
    <updated-at type="datetime">...</updated-at>
    <user>
      <id type="integer">...</id>
      <name>...</name>
    </user>
  </journal-entry>
  ...
</journal-entries>

Show

GET /journal_entries/#{id}.xml

Retrieves a specific journal entry by ID. You may only fetch journal entries for your own account.

Response

Status: 200 OK

<journal-entry>
  <account-id type="integer">...</account-id>
  <body>...</body>
  <created-at type="datetime">...</created-at>
  <id type="integer">...</id>
  <updated-at type="datetime">...</updated-at>
  <user-id type="integer">...</user-id>
</journal-entry>

Create

POST /users/#{user_id}/journal_entries.xml

Creates a new journal entry for the given user. You may only create journal entries for yourself; attempting to do so for a different user will result in a "403 Forbidden" response.

Request

<journal-entry>
  <body>...</body>
</journal-entry>

Response

Status: 201 Created
Location: http://.../journal-entries/#{id}

Update

PUT /journal_entries/#{id}.xml

Updates the contents of an existing journal entry. You may only update your own journal entries; attempting to do so for a different user will result in a "403 Forbidden" response.

Request

<journal-entry>
  <body>...</body>
</journal-entry>

Response

Status: 200 OK

<journal-entry>
  <account-id type="integer">...</account-id>
  <body>...</body>
  <created-at type="datetime">...</created-at>
  <id type="integer">...</id>
  <updated-at type="datetime">...</updated-at>
  <user-id type="integer">...</user-id>
</journal-entry>

Delete

DELETE /journal_entries/#{id}.xml

Deletes a single journal entry. You may only delete your own journal entries; attempting to delete someone else's journal entries will result in a "403 Forbidden" response.

Response

Status: 200 OK