rest

Google Cloud Data Fusion — building pipeline from REST API endpoint source

只谈情不闲聊 提交于 2021-02-11 06:12:23
问题 Attempting to build a pipeline to read from a 3rd party REST API endpoint data source. I am using the HTTP (version 1.2.0) plugin found in the Hub. The response request URL is: https://api.example.io/v2/somedata?return_count=false A sample of response body: { "paging": { "token": "12456789", "next": "https://api.example.io/v2/somedata?return_count=false&__paging_token=123456789" }, "data": [ { "cID": "aerrfaerrf", "first": true, "_id": "aerfaerrfaerrf", "action": "aerrfaerrf", "time": "1970

Jenkins CORS Filter plugin not adding Access-Control-Allow-Origins header

♀尐吖头ヾ 提交于 2021-02-11 04:55:22
问题 I am trying to add CORS support to my Jenkins server so I could access the REST API from the browser. From looking around, the recommended approach is to use the CORS Filter plugin. I have installed it, enable it, and add http://localhost to the Access-Control-Allow-Origins field, as well as GET to Access-Control-Allow-Methods field. However, these headers are not showing up in my requests. This plugin has not been updated in a few years, so I'm not sure if it's compatible with the latest

Should you expose a primary key in REST API URLs?

元气小坏坏 提交于 2021-02-11 03:09:17
问题 I'm very new to Spring. I'm trying to create a REST API using Spring Boot and I'm stuck whether to expose my user's primary key or not which also happens to be their email. Something like api/user/example@gmail.com . A big part of me says it's okay since it would sensible to expose it as it is the identifier for that specific record when viewing, deleting, and updating. Is there a security risk for this? What is the best practice for such implementation? Right now I'm combining the

Should you expose a primary key in REST API URLs?

久未见 提交于 2021-02-11 03:00:00
问题 I'm very new to Spring. I'm trying to create a REST API using Spring Boot and I'm stuck whether to expose my user's primary key or not which also happens to be their email. Something like api/user/example@gmail.com . A big part of me says it's okay since it would sensible to expose it as it is the identifier for that specific record when viewing, deleting, and updating. Is there a security risk for this? What is the best practice for such implementation? Right now I'm combining the

Should you expose a primary key in REST API URLs?

末鹿安然 提交于 2021-02-11 02:59:22
问题 I'm very new to Spring. I'm trying to create a REST API using Spring Boot and I'm stuck whether to expose my user's primary key or not which also happens to be their email. Something like api/user/example@gmail.com . A big part of me says it's okay since it would sensible to expose it as it is the identifier for that specific record when viewing, deleting, and updating. Is there a security risk for this? What is the best practice for such implementation? Right now I'm combining the

Should you expose a primary key in REST API URLs?

安稳与你 提交于 2021-02-11 02:56:45
问题 I'm very new to Spring. I'm trying to create a REST API using Spring Boot and I'm stuck whether to expose my user's primary key or not which also happens to be their email. Something like api/user/example@gmail.com . A big part of me says it's okay since it would sensible to expose it as it is the identifier for that specific record when viewing, deleting, and updating. Is there a security risk for this? What is the best practice for such implementation? Right now I'm combining the

Why does the Facebook API use POST for updating records?

末鹿安然 提交于 2021-02-10 23:46:27
问题 For example: https://developers.facebook.com/docs/graph-api/reference/v2.1/page/locations Coming from a Rails/REST background, I was under the impression using PUT or PATCH for updates was best practice. So I'm wondering, why did Facebook just use POST for updates? Is it because it's just simpler to have POST and GET, rather than 4 or 5 different HTTP methods? Or is it because they're supporting some devices that only have those? Or are they planning to move to using PUT/PATCH? Any ideas? It

Why does the Facebook API use POST for updating records?

爱⌒轻易说出口 提交于 2021-02-10 23:45:00
问题 For example: https://developers.facebook.com/docs/graph-api/reference/v2.1/page/locations Coming from a Rails/REST background, I was under the impression using PUT or PATCH for updates was best practice. So I'm wondering, why did Facebook just use POST for updates? Is it because it's just simpler to have POST and GET, rather than 4 or 5 different HTTP methods? Or is it because they're supporting some devices that only have those? Or are they planning to move to using PUT/PATCH? Any ideas? It

Why does the Facebook API use POST for updating records?

ぃ、小莉子 提交于 2021-02-10 23:43:10
问题 For example: https://developers.facebook.com/docs/graph-api/reference/v2.1/page/locations Coming from a Rails/REST background, I was under the impression using PUT or PATCH for updates was best practice. So I'm wondering, why did Facebook just use POST for updates? Is it because it's just simpler to have POST and GET, rather than 4 or 5 different HTTP methods? Or is it because they're supporting some devices that only have those? Or are they planning to move to using PUT/PATCH? Any ideas? It

Return custom http error message from Spring Security filter

萝らか妹 提交于 2021-02-10 23:20:50
问题 I am building a REST API that uses Spring Security (and it's filter chain) to authenticate the user via JWT. Now, if such a JWT is missing, expired or similar, I would like to return a nicely formatted error message to the API consumer, instead of the default whitelabel error response. The API error messages returned out of the Spring Security filter should look identical to the ones returned in case of business logic failure. In case of business logic failure, my Spring REST controllers