drakov icon indicating copy to clipboard operation
drakov copied to clipboard

Cannot POST /apps

Open BrunoQuaresma opened this issue 9 years ago • 2 comments

I have

## Apps [/apps]

### Get All Apps [GET]

+ Response 200 (application/json)

        {
            "items": [
                {
                    "id": 1,
                    "name": "My Favorite App",
                    "impressions": 4324,
                    "clicks": 100,
                    "ctr": 0.25,
                    "earnings": 19500.50,
                    "rpm": 195.50,
                    "images": {
                        "thumb": "http://www.freeiconspng.com/uploads/foursquare-icon-2.png"
                    },
                    "links": [
                        { "rel": "self", "href": "http://publisherapps.apiblueprint.org/app/1", "options": ["PUT", "DELETE"] },
                        { "rel": "statistics", "href": "http://publisherapps.apiblueprint.org/app/1/statistics" },
                        { "rel": "ad_units", "href": "http://publisherapps.apiblueprint.org/app/1/ad_units" },
                        { "rel": "ad_units_categories", "href": "http://publisherapps.apiblueprint.org/app/1/ad_units/categories" },
                        { "rel": "ad_units_types", "href": "http://publisherapps.apiblueprint.org/app/1/ad_units/types" },
                        { "rel": "ad_sources", "href": "http://publisherapps.apiblueprint.org/app/1/ad_units/sources" }
                    ]
                },
                {
                    "id": 2,
                    "name": "Amazing App",
                    "impressions": 5354,
                    "clicks": 34,
                    "ctr": 0.15,
                    "earnings": 6500.37,
                    "rpm": 65.37,
                    "images": {
                        "thumb": "https://cdn0.iconfinder.com/data/icons/social-flat-rounded-rects/512/whatsapp-512.png"
                    },
                    "links": [
                        { "rel": "self", "href": "http://publisherapps.apiblueprint.org/app/2", "options": ["PUT", "DELETE"] },
                        { "rel": "statistics", "href": "http://publisherapps.apiblueprint.org/app/2/statistics" },
                        { "rel": "ad_units", "href": "http://publisherapps.apiblueprint.org/app/2/ad_units" },
                        { "rel": "ad_units_categories", "href": "http://publisherapps.apiblueprint.org/app/2/ad_units/categories" },
                        { "rel": "ad_units_types", "href": "http://publisherapps.apiblueprint.org/app/2/ad_units/types" },
                        { "rel": "ad_sources", "href": "http://publisherapps.apiblueprint.org/app/2/ad_units/sources" }
                    ]
                }
            ],
            "links": [
                { "rel": "create", "href": "http://publisherapps.apiblueprint.org/app" }
            ]
        }

### Create New App [POST]

+ Attributes
    + name (string)
    + image_url(string)
    + app_category_id (number)
    + operational_system_id (number)
    + geofence_sleep_time (number) - Refresh monitoring locales

+ Response 200 (application/json)

        {
            "id": 3,
            "url": "https://play.google.com/store/apps/details?id=com.schibsted.bomnegocio.androidApp&hl=pt_BR",
            "name": "Olx",
            "app_category_id": 1,
            "operational_system_id": 1,
            "geofence_sleep_time": 8400,
            "links": [
                { "rel": "self", "href": "http://publisherapps.apiblueprint.org/app/3", "options": ["PUT", "DELETE"] },
                { "rel": "statistics", "href": "http://publisherapps.apiblueprint.org/app/3/statistics" },
                { "rel": "ad_units", "href": "http://publisherapps.apiblueprint.org/app/3/ad_units" },
                { "rel": "ad_units_categories", "href": "http://publisherapps.apiblueprint.org/app/3/ad_units/categories" },
                { "rel": "ad_units_types", "href": "http://publisherapps.apiblueprint.org/app/3/ad_units/types" },
                { "rel": "ad_sources", "href": "http://publisherapps.apiblueprint.org/app/3/ad_units/sources" }
            ]
        }

Get the apps works, but POST not. Why?

ps.: I run the drakov using.: ./node_modules/.bin/drakov -f apiary.apib -p 4007 --autoOptions

BrunoQuaresma avatar Feb 03 '17 19:02 BrunoQuaresma

Also having this issue.

cyberduck-magento avatar Feb 07 '17 18:02 cyberduck-magento

Post needs a request body.

ehuebner avatar Aug 07 '18 17:08 ehuebner