Giter Club home page Giter Club logo

commerce.gov-api's Introduction

Content API for Commerce.gov

Content on Commerce.gov is exposed in three REST APIs available at

Full documentation is located and maintained at https://www.commerce.gov/data-and-reports/developer-resources/commercegov-api

Changelog:

  • 10/4/2019 - News v2.1, Blogs v2.1, Image v2.1: Reworked each API as an update was required to the underlying JSON API module from version 1 to verison 2. Several fields were updated to follow JSON best practices, such as changing the string "null" to null. Full details can be found here.
  • 11/9/2018 - News v2.0, Blogs v2.0, Image v2.0: Complete rewrite of the API to reflect the redesign of the Commerce.gov D8 website. API endpoints - news, blogs and image and their response fields preserved for backward compatibility. Advanced features such as returning specific fields, returning specific content, applying a query filter, applying a query sort, API versioning, and change request formatter are not available for this version. Fields with null values are returned as string with null value. Example "null".
  • 9/23/2016 - Image v1.0: Initial release of API resource endpoint for Images/Photos. Added image specific fields to field reference and updated resource column.
  • 12/5/2015 - News v1.0: Initial release of API resource endpoint for Newsroom content. Added newsroom specific fields to field reference and new column to show which fields are available for which content types.
  • 10/07/2015 - Documentation updated for additional query filter operators.
  • 10/05/2015 - Documentation updated to reflect query filter operator limitations and working example for simple filter on label field.
  • 09/29/2015 - Blog v1.0: Initial release includes API resource endpoint for Blog content only.

Periodic updates

The Commerce.gov API is under active, but not public, development. As such, API code is not currently made available publically. This Github repository will be used to collect and respond to feedback regarding the API and engage with developers interested in using the API.

commerce.gov-api's People

Contributors

governmentsponsored avatar sutch avatar timwood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

commerce.gov-api's Issues

Allow CONTAINS, LIKE, NOT IN and STARTS_WITH operators in query filter

Reported by Stuart Ridgway at Trade.gov (@pyramiddig).

The query filter for fields defaults to exact match and doesn't allow for keyword (contains) search filtering. This is a limitation of the Drupal module used to build the API, but has been updated to provide the missing operators. Additionally, the API documentation on Commerce.gov had a non-working example.

  • Update API documentation to include working example of query filter usage and explain current operator limitations.
  • Update Restful module to more recent version to support additional field query operators.

API Commerce speeches

Hi!
I'm trying to use your API (to retrieve the speeches from all Secretaries of Commerce since January 2009), but it does not seem to take into account any of the parameters I enter... All links give me exactly the same results, whatever the parameters used.

For instance, all three links below produce exactly the same results:
https://api.commerce.gov/api/news/?api_key=MYKEY
https://api.commerce.gov/api/news/?api_key=MYKEY&page[offset]=50&page[limit]=50
https://api.commerce.gov/api/news/?api_key=MYKEY&page[offset]=100&page[limit]=50

Same when I try to filter by speaker or news_type.

Do you know how I could effectively enter parameters? Would you mind sharing an example of a correct use of such filters (if I'm doing it wrong) please?

Many thanks!

readme link broken

https://api.commece.gov/api/blogs <--- this link has a typo. Should be https://api.commerce.gov/api/blogs

Issue on HTTP requests for API

I have an app using this API for a couple of months. Today, I found that the API does not work for some reasons. For example: I tried to run request on https://api.commerce.gov/api/blogs?api_key=DEMO_KEY, where DEMO_KEY is my key, and I got the following errors:

{
    "jsonapi": {
        "version": "1.0",
        "meta": {
            "links": {
                "self": {
                    "href": "http://jsonapi.org/format/1.0/"
                }
            }
        }
    },
    "errors": [
        {
            "title": "Bad Request",
            "status": "400",
            "detail": "The following query parameters violate the JSON:API spec: 'q'.",
            "links": {
                "via": {
                    "href": "https://www.commerce.gov/api/blogs?q=%2Fapi%2Fblogs"
                },
                "info": {
                    "href": "http://jsonapi.org/format/#query-parameters"
                }
            }
        }
    ]
}

Do you have any idea what happened? Thank you.

API no longer available

When calling the api.commerce.gov APIs, they all now return a 404 error code with the HTML for the 404 page for the main commerce.gov site.

For example, visit: https://api.commerce.gov/api/news?api_key=XXXX

Seems like you should use an API monitoring service for production APIs. I humbly suggest APImetrics (I may be slightly biased there, I'm a co-founder of that company).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.