Raffle Content API (0.1.0)

Download OpenAPI specification:Download

This document describes the available endpoints to be used to build a search application against the new Raffle Content API.

Authentication

Requests must include an X-API-KEY header containing your api key.

X-API-KEY: 4A2436B8-4EC3-4A74-8C79-1DFAEC5C7D7D

Errors

Errors are returned in a standardized format.

{
  "code: <http status code>,
  "message": "detailed error message"
}

List all indexes

This endpoint will return a list of all indexes

Authorizations:
apiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "indexes": [
    ]
}

Get an index

This endpoint will return information about an index

Authorizations:
apiKeyAuth
query Parameters
uid
required
string

the uid of the index

Responses

Response samples

Content type
application/json
{
  • "uid": "string",
  • "language_code": "string",
  • "schema": {
    }
}

Create or update an index

This endpoint allow you to create or update an index.

Authorizations:
apiKeyAuth
Request Body schema: application/json
uid
required
string

A uniuqe name identifying the index

language_code
required
string

An ISO 639-1 language code describing the primary language of the content in the index.

required
object

Responses

Request samples

Content type
application/json
{
  • "uid": "string",
  • "language_code": "string",
  • "schema": {
    }
}

Response samples

Content type
application/json
{ }

Delete an index

This endpoint allows you to delete an existing index if it does not contain any documents.

Authorizations:
apiKeyAuth
query Parameters
uid
required
string

the uid of the index

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

List all json-documents in an index

This endpoint returns a list of json-document from an index.

Authorizations:
apiKeyAuth
query Parameters
index
required
string

A uid of an index

Responses

Response samples

Content type
application/json
{
  • "documents": [
    ]
}

Get a json-document

This endpoint returns a json-document form an index.

Authorizations:
apiKeyAuth
query Parameters
uid
required
string

A uid of a document

index
required
string

A uid of an index

Responses

Response samples

Content type
application/json
{
  • "uid": "string",
  • "fields": { }
}

Create or update a json-document

This endpoint allow you to create a new or update an existing json document to the index.

Authorizations:
apiKeyAuth
query Parameters
index
required
string

A uid of an index

Request Body schema: application/json
uid
required
string
fields
object

Responses

Request samples

Content type
application/json
{
  • "uid": "string",
  • "fields": { }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

Delete a json-document

This endpoint allow you to delete an existing json document from the index.

Authorizations:
apiKeyAuth
query Parameters
uid
required
string

A uid of a document

index
required
string

A uid of an index

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}