Opening The Budget - API Documentation

This document lists all the publicly available API calls for fetching budget data.

General Conventions

EXAMPLE:

http://the.open-budget.org.il/api/budget/00/2014/kids?o=html

Models

BudgetLine

Represents a single record in the state budget.

Fields:

year

שנה

code

מזהה סעיף

title

כותרת

net_allocated

מקורי - נטו

gross_allocated

מקורי - ברוטו

dedicated_allocated

מקורי - הוצאה מיועדת

commitment_allocated

מקורי - הרשאה להתחייב

personnel_allocated

מקורי - שיא כח אדם

contractors_allocated

מקורי - עבודה בלתי צמיתה

amounts_allocated

מקורי - כמויות

net_revised

מאושר - נטו

gross_revised

מאושר - ברוטו

dedicated_revised

מאושר - הוצאה מיועדת

commitment_revised

מאושר - הרשאה להתחייב

personnel_revised

מאושר - שיא כח אדם

contractors_revised

מאושר - עבודה בלתי צמיתה

amounts_revised

מאושר - כמויות

net_used

ביצוע מזומן

ChangeLine

Represents a single budget transfer record.

year

שנה

leading_item

סעיף מוביל

req_code

מזהה בקשה

req_title

כותרת בקשה

change_title

תיאור השינוי

change_type_name

סוג השינוי

committee_id

מספר וועדה

budget_code

שם הסעיף התקציבי

budget_title

מזהה הסעיף התקציבי

net_expense_diff

שינוי בהוצאה נטו

gross_expense_diff

שינוי בהוצאה מותנית בהכנסה

allocated_income_diff

שינוי בהכנסה מיועדת

commitment_limit_diff

שינוי בהרשאה להתחייב

personnel_max_diff

שינוי בשיא כח אדם

date

תאריך

date_type

סוג התאריך

(0=אישור, 10=הגשה לוועדה)

ChangeGroup

Represents an aggregated transfer (i.e. all ChangeLine with the same explanation)

ChangeExplanation

Holds the explanation text for a budget transfer.

SupportLine

Holds a single yearly support for a single recipient of a specific kind.

Fields:

year

שנה

subject

נושא

code

מספר תקנה

title

כותרת

kind

סוג התמיכה

amount_supported

תמיכה בפועל (בשקלים)

amount_allocated

תמיכה מאושרת (בשקלים)

num_used

מספר נתמכים

recipient

ארגון נתמך

company_id

מזהה חברה (אם רלוונטי)

ngo_id

מזהה עמותה (אם רלוונטי)

API Methods

Budget

/api/budget/([0-9]+)

Returns a list of BudgetLine items with the given code across all years.

EXAMPLE:

http://the.open-budget.org.il/api/budget/00203804

/api/budget/([0-9]+)/([0-9]+)

Returns a list of BudgetLine items with the given code for the given year.

EXAMPLE:

http://the.open-budget.org.il/api/budget/00203804/2014

/api/budget/([0-9]+)/([0-9]+)/kids

Returns a list of BudgetLine items which are the immediate descendants of the budget item with the given code for the given year.

EXAMPLE:

http://the.open-budget.org.il/api/budget/00203804/2014/kids

/api/budget/([0-9]+)/([0-9]+)/(parents)

Returns a list of BudgetLine items which are the immediate ancestors of the budget item with the given code for the given year. e.g., for an item with code 00150101, items “00”, “0015”, “001501” and “00150101” will be returned.

EXAMPLE:

http://the.open-budget.org.il/api/budget/00203804/2014/parents

Changes

/api/changes/([0-9]+)

Returns a list of ChangeLine items in the given budget code. You can provide budget codes which are equal or less than 6 digits (e.g. 00203804 or 0020).

EXAMPLE:

http://the.open-budget.org.il/api/changes/000461

/api/changes/([0-9]+)/([0-9]+)

Returns a list of ChangeLine items in the given budget code and year. You can provide budget codes which are equal or less than 6 digits (e.g. 00203804 or 0020).

EXAMPLE:

http://the.open-budget.org.il/api/changes/000461/2014

/api/changes/([0-9][0-9])-([0-9][0-9][0-9])/([0-9]+)

Returns a list of ChangeLine items matching a specific request id and year. Request ids are formatted as “XX-YYY” where X is the leading item and Y is the request code.

EXAMPLE:

http://the.open-budget.org.il/api/changes/04-034/2014

/api/changes/pending/all

Returns a list of ChangeLine items for transfers which were not approved yet in the finance Knesset committee.

EXAMPLE:

http://the.open-budget.org.il/api/changes/pending/all

ChangeGroups

/api/changegroup/([0-9]+)

Returns a list of ChangeGroup items in the given budget code. You can provide budget codes which are equal or less than 6 digits (e.g. 00203804 or 0020).

EXAMPLE:

http://the.open-budget.org.il/api/changegroup/000461

/api/changegroup/([0-9]+)/([0-9]+)

Returns a list of ChangeGroup items in the given budget code and year. You can provide budget codes which are equal or less than 6 digits (e.g. 00203804 or 0020).

EXAMPLE:

http://the.open-budget.org.il/api/changegroup/000461/2014

/api/changegroup/([0-9][0-9]-[0-9][0-9][0-9])/([0-9]+)

Returns a single ChangeGroup item matching a specific request id and year. Request ids are formatted as “XX-YYY” where X is the leading item and Y is the request code.

EXAMPLE:

http://the.open-budget.org.il/api/changegroup/04-034/2014

/api/changegroup/pending

Returns a list of ChangeGroup items for transfers which were not approved yet in the finance Knesset committee.

EXAMPLE:

http://the.open-budget.org.il/api/changegroup/pending/all

Change Explanations

/api/change_expl/([0-9][0-9])-([0-9][0-9][0-9])/([0-9]+)

Returns a single ChangeExplanation item matching a specific request id and year. Request ids are formatted as “XX-YYY” where X is the leading item and Y is the request code.

EXAMPLE:

http://the.open-budget.org.il/api/change_expl/04-034/2014

Supports

/api/supports/([0-9]+)

Returns a list of SupportLine items matching supports from a specific budget code. You can provide budget codes of any length, if it’s less than 8 digits the results will be aggregated.

EXAMPLE:

http://the.open-budget.org.il/api/supports/00203804

/api/supports/recipient/(.+)

Returns a list of SupportLine items matching supports for a specific recipient.

EXAMPLE:

http://the.open-budget.org.il/api/supports/recipient/אביב התורה

Misc

/api/company_record/([0-9]+)

Returns a single CompayRecord item for the company with the specified company id

EXAMPLE:

http://the.open-budget.org.il/api/company_record/512613597

/api/ngo_record/([0-9]+)

Returns a single NGORecord item for the NGO with the specified NGO id

EXAMPLE:

http://the.open-budget.org.il/api/ngo_record/580168300