OPA provides policy-based control for cloud native environments. The following *endpoints* (such as `PUT /v1/policies`) provide reference documentation for the OPA REST API. ### API specification viewing options - **[View the specification in *Redoc* (default)](index.html)** - **[View the specification in *Swagger UI*](swagger-ui.html)**
* [More documentation](https://docs.openstates.org/en/latest/api/v3/index.html) * [Register for an account](https://openstates.org/accounts/signup/) **We are currently working to restore experimental support for committees & events.** During this period please note that data is not yet available for all states and the exact format of the new endpoints may change slightly depending on user feedback. If you have any issues or questions use our [GitHub Issues](https://github.com/openstates/issues/issues) to give feedback.
The _Open Build Service API_ is a XML API.
To authenticate, use [HTTP basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) by passing the _Authorization_ header in the form of `Authorization: Basic
### The Open Targets Platform REST API The Open Targets Platform API ('Application Programming Interface') allows programmatic retrieval of the Open Targets Platform data via a set of [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) services. You can make calls to the latest version of our API using the base URL `https://platform-api.opentargets.io/v3/platform`. Please make sure you use `https` instead of the unencrypted `http` calls, which we do not accept. We list below the methods available to query our data directly from the API, followed by an interactive interface that you can use to try out the parameters and execute the REST-API calls. For every request you create, the interactive interface will display both a [curl](https://curl.haxx.se/) command and a request URL that you can use to ensure you get the expected response before using your application or workflow. Check our documentation for some [API tutorials](https://docs.targetvalidation.org/tutorials/api-tutorials) and [get in touch](mailto:support@targetvalidation.org) if you have any questions. ### Available Methods The available methods can be grouped in three types: * __public__ - Methods that serve the core set of our data. These are stable and we fully supported them. * __private__ - Methods used by the web app to serve additional data not specific to our platform. These methods may change without notice and should be used with caution. * __utils__ - Methods to get statistics and technical data about our API. ### Supported formats The methods above are all available via a `GET` request, and will serve outputs as `JSON`. Alternative output formats, such `xml`, `csv` and `tab`, are also available for some of the methods. However alternative output formats are not supported in interactive interface below where the response will be always in `JSON. If you have complex queries with large number of parameters, you should use a `POST` request instead of `GET`. `POST` methods require a body encoded as `json`. When querying for a specific disease using the latest version of the API, your call would look like the example below: ```sh curl -X POST -d '{"disease":["EFO_0000253"]}' --header 'Content-Type: application/json' https://platform-api.opentargets.io/v3/platform/public/evidence/filter ``` ### How to interpret a response Each HTTPS response will serve data in headers and body. The headers will give you details about your query, such as how long it took to run. In the body of the response, you will find the data you have requested for in `JSON` format. The [jq](https://stedolan.github.io/jq/) program is a useful tool to parse the json response while on the command line. ```sh curl https://platform-api.opentargets.io/v3/platform/public/association/filter\?target\=ENSG00000157764 | jq ``` We do not analyse the nature of any specific API queries except for the purposes of improving the performance of our API. Read more in our [privacy section](https://www.targetvalidation.org/terms_of_use#privacy). How can we make the Open Targets Platform API more useful to you? Would you like additional methods to be implemented? Please [get in touch](mailto:support@targetvalidation.org) and send your suggestions.
The [Open Databases Integration for Materials Design (OPTIMADE) consortium](https://www.optimade.org/) aims to make materials databases interoperational by developing a common REST API. This specification is generated using [`optimade-python-tools`](https://github.com/Materials-Consortia/optimade-python-tools/tree/v0.16.0) v0.16.0.
# Introduction Whether you're looking to build an official Pandascore integration for your service, or you just want to build something awesome, [we can help you get started](/home). The API works over the HTTPS protocol, and is accessed from the `api.pandascore.co` domain. - The current endpoint is [https://api.pandascore.co](https://api.pandascore.co). - All data is sent and received as JSON by default. - Blank fields are included with `null` values instead of being omitted. - All timestamps are returned in ISO-8601 format ### About this documentation Clicking on a query parameter like `filter` or `search` will show you the available options: ![filter](/doc/images/query_param_details.jpg) You can also click on a response to see the detailed response schema: ![response](/doc/images/response_schema.jpg) ## Events hierarchy The PandaScore API allows you to access data about eSports events by using a certain structure detailed below. **Leagues** Leagues are the top level events. They don't have a date and represent a regular competition. A League is composed of one or several series. Some League of Legends leagues are: _EU LCS, NA LCS, LCK, etc._ Some Dota 2 leagues are: _ESL One, GESC, The International, PGL, etc._ **Series** A Serie represents an occurrence of a league event. The EU LCS league has two series per year: _spring 2017, summer 2017, spring 2016, summer 2016 etc._ Some Dota2 Series examples would be: _Changsha Major, Open Bucharest, Frankfurt, i-League Invitational etc._ **Tournaments** Tournaments groups all the matches of a serie under "stages" and "groups". The tournaments of the EU LCS of summer 2017 are: _Group A, Group B, Playoffs, etc._ Some Dota 2 tournaments are: _Group A, Group B, Playoffs, etc._ **Matches** Finally we have matches which have two players or teams (depending on the played videogame) and several games (the rounds of the match). Matches of the group A in the EU LCS of summer 2017 are: _G2 vs FNC, MSF vs NIP, etc._ Matches of the group A in the ESL One, Genting tournamnet are: _Lower Round 1, Quarterfinal, Upper Final, etc._ **Please note that some matches may be listed as "TBD vs TBD" if the matchup is not announced yet, for example the date of the Final match is known but the quarterfinal is still being played.** ![Structure](/doc/images/structure.png) ## Formats <!-- The API currently supports the JSON format by default, as well as the XML format. Add the desired extension to your request URL in order to get that format. --> The API currently supports the JSON format by default. Other formats may be added depending on user needs. ## Pagination The Pandascore API paginates all resources on the index method. Requests that return multiple items will be paginated to 50 items by default. You can specify further pages with the `page[number]` parameter. You can also set a custom page size (up to 100) with the `page[size]` parameter. The `Link` HTTP response header contains pagination data with `first`, `previous`, `next` and `last` raw page links when available, under the format ``` Link: <https://api.pandascore.co/{Resource}?page=X+1>; rel="next", <https://api.pandascore.co/{Resource}?page=X-1>; rel="prev", <https://api.pandascore.co/{Resource}?page=1>; rel="first", <https://api.pandascore.co/{Resource}?page=X+n>; rel="last" ``` There is also: * A `X-Page` header field, which contains the current page. * A `X-Per-Page` header field, which contains the current pagination length. * A `X-Total` header field, which contains the total count of items across all pages. ## Filtering The `filter` query parameter can be used to filter a collection by one or several fields for one or several values. The `filter` parameter takes the field to filter as a key, and the values to filter as the value. Multiples values must be comma-separated (`,`). For example, the following is a request for all the champions with a name matching Twitch or Brand exactly, but only with 21 armor: ``` GET /lol/champions?filter[name]=Brand,Twitch&filter[armor]=21&token=YOUR_ACCESS_TOKEN ``` ## Range The `range` parameter is a hash that allows filtering fields by an interval. Only values between the given two comma-separated bounds will be returned. The bounds are inclusive. For example, the following is a request for all the champions with `hp` within 500 and 1000: ``` GET /lol/champions?range[hp]=500,1000&token=YOUR_ACCESS_TOKEN ``` ## Search The `search` parameter is a bit like the `filter` parameter, but it will return all results where the values **contain** the given parameter. Note: this only works on strings. Searching with integer values is not supported and `filter` or `range` parameters may be better suited for your needs here. For example, to get all the champions with a name containing `"twi"`: ``` $ curl -sg -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' 'https://api.pandascore.co/lol/champions?search[name]=twi' | jq -S '.[].name' "Twitch" "Twisted Fate" ``` ## Sorting All index endpoints support multiple sort fields with comma-separation (`,`); the fields are applied in the order specified. The sort order for each field is ascending unless it is prefixed with a minus (U+002D HYPHEN-MINUS, “-“), in which case it is descending. For example, `GET /lol/champions?sort=attackdamage,-name&token=YOUR_ACCESS_TOKEN` will return all the champions sorted by attack damage. Any champions with the same attack damage will then be sorted by their names in descending alphabetical order. ## Rate limiting Depending on your current plan, you will have a different rate limit. Your plan and your current request count [are available on your dashboard](https://pandascore.co/settings). With the **free plan**, you have a limit of 1000 requests per hour, others plans have a limit of 4000 requests per hour. The number of remaining requests is available in the `X-Rate-Limit-Remaining` response header. Your API key is included in all the examples on this page, so you can test any example right away. **Only you can see this value.** # Authentication The authentication on the Pandascore API works with access tokens. All developers need to [create an account](https://pandascore.co/users/sign_in) before getting started, in order to get an access token. The access token should not be shared. **Your token can be found and regenerated from [your dashboard](https://pandascore.co/settings).** The access token can be passed in the URL with the `token` query string parameter, or in the `Authorization: Bearer` header field. <!-- ReDoc-Inject: <security-definitions> -->