GET datastore/schemas/:schema name/objects
(Difference between revisions)
(moved GET datastore/schemas/:schema name/objects to GET datastore/schemas/:schema name/objects PT-BR) |
|||
Line 1: | Line 1: | ||
− | + | == Description == | |
+ | |||
+ | Retorna todos os Objects de um Schema. | ||
+ | |||
+ | == Resource URL == | ||
+ | |||
+ | GET https://api.socialidnow.com/v1/marketing/datastore/schemas/:schema_name/objects | ||
+ | |||
+ | == Parameters == | ||
+ | |||
+ | {| | ||
+ | ! align="left" width="200px" | schema_name | ||
+ | | width="200px" | obrigatório | ||
+ | | nome do schema | ||
+ | |- | ||
+ | ! align="left" width="200px" | user_id | ||
+ | | width="200px" | opcional | ||
+ | | identificador de um usuário para filtrar os resultados | ||
+ | |} | ||
+ | |||
+ | == Authentication == | ||
+ | |||
+ | Esta API exige autenticação do Marketing Account. Ver [[Authentication]]. | ||
+ | |||
+ | == Response == | ||
+ | |||
+ | ==== Response Status ==== | ||
+ | {| | ||
+ | ! align="left" width="200px" | ok (200) | ||
+ | | A busca foi realizada com sucesso | ||
+ | |+ | ||
+ | ! align="left" width="200px" | unauthorized (401) | ||
+ | | A autenticação está errada. Ver [[Authentication]]. | ||
+ | |+ | ||
+ | ! align="left" width="200px" | not_found (404) | ||
+ | | O schema não foi encontrado. | ||
+ | |+ | ||
+ | ! align="left" width="200px" | internal_server_error (500) | ||
+ | | Um erro desconhecido ocorreu. | ||
+ | |} | ||
+ | |||
+ | ==== Response Body ==== | ||
+ | |||
+ | Uma busca efetuada com sucesso retorna os seguintes campos: | ||
+ | |||
+ | {| | ||
+ | ! align="left" width="200px" | total | ||
+ | | o número total de objects encontrados. | ||
+ | |+ | ||
+ | ! align="left" width="200px" | count | ||
+ | | o número de objects retornados na página. | ||
+ | |+ | ||
+ | ! align="left" width="200px" | offset | ||
+ | | o número de objects descartados inicialmente (início da página). | ||
+ | |+ | ||
+ | ! align="left" width="200px" | results | ||
+ | | um array contendo os detalhes dos objects encontrados. | ||
+ | |} | ||
+ | |||
+ | == Example Request == | ||
+ | |||
+ | Retorna todos objects do schema com nome "first_schema". | ||
+ | |||
+ | curl -iX GET 'https://api.socialidnow.com/v1/marketing/datastore/schemas/first_schema/objects' \ | ||
+ | -H 'Content-type: application/json' \ | ||
+ | --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf | ||
+ | |||
+ | Response: | ||
+ | |||
+ | HTTP/1.1 200 Ok | ||
+ | Status: 200 | ||
+ | |||
+ | == Example Response == | ||
+ | |||
+ | { | ||
+ | "total": 2, | ||
+ | "count": 2, | ||
+ | "offset": 0, | ||
+ | "results": [ | ||
+ | { | ||
+ | "object_id": "54481188e5cb7cffe4000003", | ||
+ | "user_id": 340, | ||
+ | "created_at": "2014-10-24T14:48:00Z", | ||
+ | "updated_at": "2014-10-24T14:48:00Z", | ||
+ | "first_field": "First Object", | ||
+ | "second_field": 123 | ||
+ | }, | ||
+ | { ... } | ||
+ | ] | ||
+ | } |
Revision as of 13:01, 3 November 2014
Contents |
Description
Retorna todos os Objects de um Schema.
Resource URL
GET https://api.socialidnow.com/v1/marketing/datastore/schemas/:schema_name/objects
Parameters
schema_name | obrigatório | nome do schema |
---|---|---|
user_id | opcional | identificador de um usuário para filtrar os resultados |
Authentication
Esta API exige autenticação do Marketing Account. Ver Authentication.
Response
Response Status
ok (200) | A busca foi realizada com sucesso | unauthorized (401) | A autenticação está errada. Ver Authentication. | not_found (404) | O schema não foi encontrado. | internal_server_error (500) | Um erro desconhecido ocorreu. |
---|
Response Body
Uma busca efetuada com sucesso retorna os seguintes campos:
total | o número total de objects encontrados. | count | o número de objects retornados na página. | offset | o número de objects descartados inicialmente (início da página). | results | um array contendo os detalhes dos objects encontrados. |
---|
Example Request
Retorna todos objects do schema com nome "first_schema".
curl -iX GET 'https://api.socialidnow.com/v1/marketing/datastore/schemas/first_schema/objects' \ -H 'Content-type: application/json' \ --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
Response:
HTTP/1.1 200 Ok Status: 200
Example Response
{ "total": 2, "count": 2, "offset": 0, "results": [ { "object_id": "54481188e5cb7cffe4000003", "user_id": 340, "created_at": "2014-10-24T14:48:00Z", "updated_at": "2014-10-24T14:48:00Z", "first_field": "First Object", "second_field": 123 }, { ... } ] }