{ "openapi": "3.0.0", "info": { "description": "This is the API definition for the Adshot Scraping Engine service. This API should only be made available internally for use by Adshot Core. There is no dependency in the other direction. Meaning that the Scraping Engine API should not fetch data from Adshot Core or store foreign keys to entities stored in Adshot Core, thereby avoiding coupling between these services as much as possible. Mappings between entities of the Scraping Engine and Adshot Core should only be stored in the Adshot Core databases (eg mapping between an Adshot Core Channel and a Channel Scraping Job in the Scraping Engine). It is advised not to expose this API over the API gateway to the outside world. When the API is only available internally, there is no need for Authentication with JWT.", "version": "1.0.0", "title": "API of the Adshot Scraping Engine\n", "x-jentic-source-url": "https://api.swaggerhub.com/apis/JensMostaert3/adshot_scraping_engine/1.0.0/swagger.json", "contact": {} }, "servers": [ { "description": "SwaggerHub API Auto Mocking", "url": "https://virtserver.swaggerhub.com/JensMostaert3/adshot_scraping_engine/1.0.0" }, { "description": "SwaggerHub API Auto Mocking", "url": "https://virtserver.swaggerhub.com/JensMostaert3/ashot_scraping_engine/1.0.0" } ], "paths": { "/v1/channels/jobs": { "get": { "tags": [ "Operations on Channels" ], "summary": "List / search all Channel scrape jobs.", "description": "

List / search through all Channel scrape jobs. A channel scrape job will periodically (determined by the 'inverval' property) scrape a channel. This action will generate a new channel scrape resource. This API endpoint uses the OData query language as described in this Microsoft API guidelines document for filtering, pagination and sorting.

There are several Nodejs libraries available providing these query operations out of the box (eg: https://github.com/TossShinHwa/node-odata)


", "operationId": "listChannelJobsUsingGet", "parameters": [ { "name": "$filter", "in": "query", "required": false, "description": "

The filter querystring parameter allows clients to filter a collection of resources that are addressed by a request URL. The expression specified with filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Resources for which the expression evaluates to false or to null, or which reference properties that are unavailable due to permissions, are omitted from the response.

Example return all channel jobs with platform equal to youtube

GET /v1/channels/jobs?filter=platform eq youtube


The value of the filter option is a Boolean expression.

Services that support filter SHOULD support the following minimal set of operations.

\n \n \n \n \n \n \n \n \n \n \n \n \n \n
Comparison operators
eqEqualsubject eq 'Redmond'
neNot equalcity ne 'London'
gtGreater thanprice gt 10
geGreater than or equalprice ge 20
ltLess thanprice lt 10
leLess than or equalprice le 20
Logical operators
andLogical andprice le 200 and price gt 3.5
orLogical orprice le 3.5 or price gt 200
notLogical negationnot price le 3.5
Grouping operators
( )Precedence grouping(priority eq 1 or city eq 'Redmond') and price gt 100
", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "required": false, "description": "

Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the collection. When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the collection.

GET /v1/channels/jobs?$top=5&skip=2
", "schema": { "type": "integer" } }, { "name": "$skip", "in": "query", "required": false, "schema": { "type": "integer" } }, { "name": "$orderBy", "in": "query", "required": false, "description": "

The value of the orderBy parameter contains a comma-separated list of expressions used to sort the items.

The expression MAY include the suffix \"asc\" for ascending or \"desc\" for descending, separated from the property name by one or more spaces. If \"asc\" or \"desc\" is not specified, the service MUST order by the specified property in ascending order.

Items MUST be sorted by the result values of the first expression, and then items with the same value for the first expression are sorted by the result value of the second expression, and so on. The sort order is the inherent order for the type of the property.

Example: return all channel jobs sorted by createdDateTime in ascending order

GET /v1/channels/jobs?orderBy=createdDateTime asc
", "schema": { "type": "string" } }, { "name": "$select", "in": "query", "required": false, "schema": { "type": "string" }, "description": "A data service URI with a $select query option identifies the same set of Entries as a URI without a $select query option; however, the value of $select specifies that the response body should only include a subset of the properties which would have been returned had the URI not included a $select query option.

Example: retrieve a list of all Channel Jobs including only the platform property.

GET /v1/channels/jobs?select=platform
" } ], "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChannelJobCollectionDto" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } }, "post": { "tags": [ "Operations on Channels" ], "summary": "Create a new Channel Job.", "description": "Use this call to create a new Channel Job.", "operationId": "createChannelJobUsingPOST", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChannelJobDto" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChannelJobCreationDto" } } }, "required": true } } }, "/v1/channels/jobs/{id}": { "get": { "tags": [ "Operations on Channels" ], "summary": "Retrieve details of a specific Channel Job.", "description": "Retrieve the details of a specific Channel Job.", "operationId": "getChannelJobUsingGET", "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChannelJobDto" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } }, "delete": { "tags": [ "Operations on Channels" ], "summary": "Delete a specific Channel Job.", "description": "Delete a specific Channel Job. The job will no longer generate scrapes once deleted.", "operationId": "deleteChannelJobUsingGET", "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } }, "patch": { "tags": [ "Operations on Channels" ], "summary": "Update a Channel Job.", "description": "

Update a Channel Job. Fields that are not included in the request body will remain unchanged as described in the Microsoft API guidelines: https://github.com/layeredprints/api-guidelines/blob/vNext/Guidelines.md#742-patch

", "operationId": "updateChannelJobUsingPatch", "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChannelJobDto" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChannelJobUpdateDto" } } }, "required": true } } }, "/v1/channels/scrapes": { "get": { "tags": [ "Operations on Channels" ], "summary": "List / search all Channel scrapes.", "description": "

List / search through all Channel scrapes. This API endpoint uses the OData query language as described in this Microsoft API guidelines document for filtering, pagination and sorting.

There are several Nodejs libraries available providing these query operations out of the box (eg: https://github.com/TossShinHwa/node-odata)


", "operationId": "listChannelScrapesUsingGet", "parameters": [ { "name": "$filter", "in": "query", "required": false, "description": "

The filter querystring parameter allows clients to filter a collection of resources that are addressed by a request URL. The expression specified with filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Resources for which the expression evaluates to false or to null, or which reference properties that are unavailable due to permissions, are omitted from the response.

Example return all channel scrapes generated by the Channel Job with id equal to 1

GET /v1/channels/scrapes?filter=jobId eq 1


The value of the filter option is a Boolean expression.

Services that support filter SHOULD support the following minimal set of operations.

\n \n \n \n \n \n \n \n \n \n \n \n \n \n
Comparison operators
eqEqualsubject eq 'Redmond'
neNot equalcity ne 'London'
gtGreater thanprice gt 10
geGreater than or equalprice ge 20
ltLess thanprice lt 10
leLess than or equalprice le 20
Logical operators
andLogical andprice le 200 and price gt 3.5
orLogical orprice le 3.5 or price gt 200
notLogical negationnot price le 3.5
Grouping operators
( )Precedence grouping(priority eq 1 or city eq 'Redmond') and price gt 100
", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "required": false, "description": "

Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the collection. When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the collection.

GET /v1/channels/scrapes?$top=5&skip=2
", "schema": { "type": "integer" } }, { "name": "$skip", "in": "query", "required": false, "schema": { "type": "integer" } }, { "name": "$orderBy", "in": "query", "required": false, "description": "

The value of the orderBy parameter contains a comma-separated list of expressions used to sort the items.

The expression MAY include the suffix \"asc\" for ascending or \"desc\" for descending, separated from the property name by one or more spaces. If \"asc\" or \"desc\" is not specified, the service MUST order by the specified property in ascending order.

Items MUST be sorted by the result values of the first expression, and then items with the same value for the first expression are sorted by the result value of the second expression, and so on. The sort order is the inherent order for the type of the property.

Example: return all channel scrapes sorted by createdDateTime in ascending order

GET /v1/channels/scrapes?orderBy=createdDateTime asc
", "schema": { "type": "string" } }, { "name": "$select", "in": "query", "required": false, "schema": { "type": "string" }, "description": "A data service URI with a $select query option identifies the same set of Entries as a URI without a $select query option; however, the value of $select specifies that the response body should only include a subset of the properties which would have been returned had the URI not included a $select query option.

Example: retrieve a list of all Channel Scrapes including only the jobId and createdDateTime properties.

GET /v1/channels/jobs?select=jobId,createdDateTime
" } ], "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChannelScrapeCollectionDto" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/v1/channels/scrapes/{id}": { "get": { "tags": [ "Operations on Channels" ], "summary": "Retrieve details of a specific Channel Scrape.", "description": "Retrieve the details of a specific Channel Scrape.", "operationId": "getChannelScrapeUsingGET", "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChannelScrapeDto" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/v1/media/jobs": { "get": { "tags": [ "Operations on Media" ], "summary": "List / search all Media scrape jobs.", "description": "

List / search through all Media scrape jobs. A Madia scrape job will periodically (determined by the 'inverval' property) scrape a certain video / stream. This action will generate a new media scrape resource. This API endpoint uses the OData query language as described in this Microsoft API guidelines document for filtering, pagination and sorting.

There are several Nodejs libraries available providing these query operations out of the box (eg: https://github.com/TossShinHwa/node-odata)


", "operationId": "listMediaJobsUsingGet", "parameters": [ { "name": "$filter", "in": "query", "required": false, "description": "

The filter querystring parameter allows clients to filter a collection of resources that are addressed by a request URL. The expression specified with filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Resources for which the expression evaluates to false or to null, or which reference properties that are unavailable due to permissions, are omitted from the response.

Example return all media jobs with platform equal to youtube

GET /v1/media/jobs?filter=platform eq youtube


The value of the filter option is a Boolean expression.

Services that support filter SHOULD support the following minimal set of operations.

\n \n \n \n \n \n \n \n \n \n \n \n \n \n
Comparison operators
eqEqualsubject eq 'Redmond'
neNot equalcity ne 'London'
gtGreater thanprice gt 10
geGreater than or equalprice ge 20
ltLess thanprice lt 10
leLess than or equalprice le 20
Logical operators
andLogical andprice le 200 and price gt 3.5
orLogical orprice le 3.5 or price gt 200
notLogical negationnot price le 3.5
Grouping operators
( )Precedence grouping(priority eq 1 or city eq 'Redmond') and price gt 100
", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "required": false, "description": "

Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the collection. When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the collection.

GET /v1/media/jobs?$top=5&skip=2
", "schema": { "type": "integer" } }, { "name": "$skip", "in": "query", "required": false, "schema": { "type": "integer" } }, { "name": "$orderBy", "in": "query", "required": false, "description": "

The value of the orderBy parameter contains a comma-separated list of expressions used to sort the items.

The expression MAY include the suffix \"asc\" for ascending or \"desc\" for descending, separated from the property name by one or more spaces. If \"asc\" or \"desc\" is not specified, the service MUST order by the specified property in ascending order.

Items MUST be sorted by the result values of the first expression, and then items with the same value for the first expression are sorted by the result value of the second expression, and so on. The sort order is the inherent order for the type of the property.

Example: return all media jobs sorted by createdDateTime in ascending order

GET /v1/media/jobs?orderBy=createdDateTime asc
", "schema": { "type": "string" } }, { "name": "$select", "in": "query", "required": false, "schema": { "type": "string" }, "description": "A data service URI with a $select query option identifies the same set of Entries as a URI without a $select query option; however, the value of $select specifies that the response body should only include a subset of the properties which would have been returned had the URI not included a $select query option.

Example: retrieve a list of all Media Jobs including only the platform property.

GET /v1/media/jobs?select=platform
" } ], "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaJobCollectionDto" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } }, "post": { "tags": [ "Operations on Media" ], "summary": "Create a new Media Job.", "description": "Use this call to create a new Channel Job.", "operationId": "createMediaJobUsingPOST", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaJobDto" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaJobCreationDto" } } }, "required": true } } }, "/v1/media/jobs/{id}": { "get": { "tags": [ "Operations on Media" ], "summary": "Retrieve details of a specific Media Job.", "description": "Retrieve the details of a specific Media Job.", "operationId": "getMediaJobUsingGET", "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaJobDto" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } }, "delete": { "tags": [ "Operations on Media" ], "summary": "Delete a specific Media Job.", "description": "Delete a specific Media Job. The job will no longer generate scrapes once deleted.", "operationId": "deleteMediaJobUsingGET", "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } }, "patch": { "tags": [ "Operations on Media" ], "summary": "Update a Channel Job.", "description": "

Update a Media Job. Fields that are not included in the request body will remain unchanged as described in the Microsoft API guidelines: https://github.com/layeredprints/api-guidelines/blob/vNext/Guidelines.md#742-patch

", "operationId": "updateMediaJobUsingPatch", "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaJobDto" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaJobUpdateDto" } } }, "required": true } } }, "/v1/media/scrapes": { "get": { "tags": [ "Operations on Media" ], "summary": "List / search all Media scrapes.", "description": "

List / search through all Channel scrapes. This API endpoint uses the OData query language as described in this Microsoft API guidelines document for filtering, pagination and sorting.

There are several Nodejs libraries available providing these query operations out of the box (eg: https://github.com/TossShinHwa/node-odata)


", "operationId": "listMediaScrapesUsingGet", "parameters": [ { "name": "$filter", "in": "query", "required": false, "description": "

The filter querystring parameter allows clients to filter a collection of resources that are addressed by a request URL. The expression specified with filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Resources for which the expression evaluates to false or to null, or which reference properties that are unavailable due to permissions, are omitted from the response.

Example return all channel media generated by the Media Job with id equal to 1

GET /v1/media/scrapes?filter=jobId eq 1


The value of the filter option is a Boolean expression.

Services that support filter SHOULD support the following minimal set of operations.

\n \n \n \n \n \n \n \n \n \n \n \n \n \n
Comparison operators
eqEqualsubject eq 'Redmond'
neNot equalcity ne 'London'
gtGreater thanprice gt 10
geGreater than or equalprice ge 20
ltLess thanprice lt 10
leLess than or equalprice le 20
Logical operators
andLogical andprice le 200 and price gt 3.5
orLogical orprice le 3.5 or price gt 200
notLogical negationnot price le 3.5
Grouping operators
( )Precedence grouping(priority eq 1 or city eq 'Redmond') and price gt 100
", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "required": false, "description": "

Clients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the collection. When both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the collection.

GET /v1/media/scrapes?$top=5&skip=2
", "schema": { "type": "integer" } }, { "name": "$skip", "in": "query", "required": false, "schema": { "type": "integer" } }, { "name": "$orderBy", "in": "query", "required": false, "description": "

The value of the orderBy parameter contains a comma-separated list of expressions used to sort the items.

The expression MAY include the suffix \"asc\" for ascending or \"desc\" for descending, separated from the property name by one or more spaces. If \"asc\" or \"desc\" is not specified, the service MUST order by the specified property in ascending order.

Items MUST be sorted by the result values of the first expression, and then items with the same value for the first expression are sorted by the result value of the second expression, and so on. The sort order is the inherent order for the type of the property.

Example: return all media scrapes sorted by createdDateTime in ascending order

GET /v1/media/scrapes?orderBy=createdDateTime asc
", "schema": { "type": "string" } }, { "name": "$select", "in": "query", "required": false, "schema": { "type": "string" }, "description": "A data service URI with a $select query option identifies the same set of Entries as a URI without a $select query option; however, the value of $select specifies that the response body should only include a subset of the properties which would have been returned had the URI not included a $select query option.

Example: retrieve a list of all Media Scrapes including only the jobId and createdDateTime properties.

GET /v1/media/jobs?select=jobId,createdDateTime
" } ], "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaScrapeCollectionDto" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } }, "/v1/media/scrapes/{id}": { "get": { "tags": [ "Operations on Media" ], "summary": "Retrieve details of a specific Media Scrape.", "description": "Retrieve the details of a specific Media Scrape.", "operationId": "getMediaScrapeUsingGET", "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaScrapeDto" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiError" } } } } } } } }, "components": { "schemas": { "ApiError": { "description": "Error objects are constructed following these guidelines: https://github.com/layeredprints/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses", "type": "object", "properties": { "error": { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "target": { "type": "string" }, "details": { "type": "array", "items": { "$ref": "#/components/schemas/ApiErrorDetail" } }, "innerError": { "$ref": "#/components/schemas/ApiInnerError" } } } } }, "ApiErrorDetail": { "type": "object", "properties": { "code": { "type": "string" }, "target": { "type": "string" }, "message": { "type": "string" } } }, "ApiInnerError": { "type": "object", "properties": { "code": { "type": "string" }, "innerError": { "$ref": "#/components/schemas/ApiInnerError" } } }, "ChannelJobUpdateDto": { "type": "object", "properties": { "platform": { "type": "string", "example": "youtube", "enum": [ "youtube", "twitch", "twitter" ] }, "externalId": { "type": "string", "example": "UCXuqSBlHAE6Xw-yeJA0Tunw", "description": "Youtube, Twitter or Twitch channel id in the format to use it on their API." }, "interval": { "type": "integer", "format": "int64", "example": 24, "description": "Interval in hours between scrapes for of the Channel. For example settings this property to 24 will result in the Channel being scraped every 24 hours. Defaults to 24. Set to 0 to perform a one time Job." }, "retentionPeriod": { "type": "integer", "format": "int64", "example": 365, "description": "Period of time in days specifying how long to keep a Scrape created by this job on the server. Defaults to 365. Set to 0 to keep the data indefinitely." }, "endDateTime": { "type": "string", "example": "2018-02-22T11:51:22.012Z", "description": "Date on which the job ends and no more scrapes are generated" } } }, "ChannelJobCreationDto": { "type": "object", "required": [ "platform", "externalId" ], "properties": { "platform": { "type": "string", "example": "youtube", "enum": [ "youtube", "twitch", "twitter" ] }, "externalId": { "type": "string", "example": "UCXuqSBlHAE6Xw-yeJA0Tunw", "description": "Youtube, Twitter or Twitch channel id in the format to use it on their API." }, "interval": { "type": "integer", "format": "int64", "example": 24, "description": "Interval in hours between scrapes for of the Channel. For example settings this property to 24 will result in the Channel being scraped every 24 hours. Defaults to 24. Set to 0 to perform a one time Job." }, "retentionPeriod": { "type": "integer", "format": "int64", "example": 365, "description": "Period of time in days specifying how long to keep a Scrape created by this job on the server. Defaults to 365. Set to 0 to keep the data indefinitely." }, "endDateTime": { "type": "string", "example": "2018-02-22T11:51:22.012Z", "description": "Date on which the job ends and no more scrapes are generated. When no date is provided, the job will run until it is deleted." } } }, "ChannelJobDto": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "platform": { "type": "string", "example": "youtube", "enum": [ "youtube", "twitch", "twitter" ] }, "externalId": { "type": "string", "example": "UCXuqSBlHAE6Xw-yeJA0Tunw", "description": "Youtube, Twitter or Twitch channel id in the format to use it on their API." }, "interval": { "type": "integer", "format": "int64", "example": 24, "description": "Interval in hours between scrapes for of the Channel. For example settings this property to 24 will result in the Channel being scraped every 24 hours. Defaults to 24. Set to 0 to perform a one time Job." }, "retentionPeriod": { "type": "integer", "format": "int64", "example": 365, "description": "Period of time in days specifying how long to keep a Scrape created by this job on the server. Defaults to 365. Set to 0 to keep the data indefinitely." }, "executionCounter": { "type": "integer", "example": 3, "description": "Number of times the Job has been executed." }, "nextExecutionDateTime": { "type": "string", "example": "2018-02-23T11:51:22.012Z", "description": "Timestamp of the next execution of the Job." }, "lastExecutedDateTime": { "type": "string", "example": "2018-02-22T11:51:22.012Z", "description": "Timestamp of the last execution of the Job." }, "endDateTime": { "type": "string", "example": "2018-02-22T11:51:22.012Z", "description": "Date on which the job ends and no more scrapes are generated" }, "createdDateTime": { "type": "string", "example": "2018-01-22T11:51:22.012Z", "description": "Timestamp when the resource was created." }, "_links": { "type": "object", "properties": { "self": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/channels/jobs/1" } } }, "scrapes": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/channels/scrapes?jobId=1" } } } } } } }, "ChannelJobCollectionDto": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/ChannelJobDto" } }, "_links": { "type": "object", "description": "JSON HAL pagination links", "properties": { "self": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/channels/jobs?$skip=20&$top=20" } } }, "next": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/channels/jobs?$skip=40&$top=20" } } }, "prev": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/channels/jobs?$skip=0&$top=20" } } } } } } }, "ChannelScrapeDto": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "jobId": { "type": "integer", "format": "int64", "example": 1 }, "platform": { "type": "string", "example": "youtube", "enum": [ "youtube", "twitch", "twitter" ] }, "externalId": { "type": "string", "example": "UCXuqSBlHAE6Xw-yeJA0Tunw", "description": "Youtube, Twitter or Twitch channel id in the format to use it on their API." }, "data": { "oneOf": [ { "$ref": "#/components/schemas/YoutubeChannelScrapeDataDto" }, { "$ref": "#/components/schemas/TwitchChannelScrapeDataDto" }, { "$ref": "#/components/schemas/TwitterChannelScrapeDataDto" } ], "example": { "views": 1231451, "likes": 54541, "dislikes": 1242, "comments": 3563, "subscribers": 6144 } }, "createdDateTime": { "type": "string", "example": "2018-01-22T11:51:22.012Z", "description": "Timestamp when the resource was created." }, "_links": { "type": "object", "properties": { "self": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/channels/scrapes/1" } } }, "job": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/channels/jobs/1" } } } } } } }, "YoutubeChannelScrapeDataDto": { "type": "object", "properties": { "views": { "type": "integer", "format": "int64", "example": 1231451 }, "likes": { "type": "integer", "format": "int64", "example": 54541 }, "dislikes": { "type": "integer", "format": "int64", "example": 1242 }, "comments": { "type": "integer", "format": "int64", "example": 3563 }, "subscribers": { "type": "integer", "format": "int64", "example": 6144 } } }, "TwitchChannelScrapeDataDto": { "type": "object", "properties": { "views": { "type": "integer", "format": "int64", "example": 1231455 }, "chat_messages": { "type": "integer", "format": "int64", "example": 3568 }, "subscribers": { "type": "integer", "format": "int64", "example": 6149 } } }, "TwitterChannelScrapeDataDto": { "type": "object", "properties": { "retweets": { "type": "integer", "format": "int64", "example": 15614 }, "likes": { "type": "integer", "format": "int64", "example": 12345 }, "followers": { "type": "integer", "format": "int64", "example": 6643 } } }, "ChannelScrapeCollectionDto": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/ChannelScrapeDto" } }, "_links": { "type": "object", "description": "JSON HAL pagination links", "properties": { "self": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/channels/scrapes?$skip=20&$top=20" } } }, "next": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/channels/scrapes?$skip=40&$top=20" } } }, "prev": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/channels/scrapes?$skip=0&$top=20" } } } } } } }, "MediaJobUpdateDto": { "type": "object", "properties": { "platform": { "type": "string", "example": "youtube", "enum": [ "youtube", "twitch", "twitter" ] }, "externalId": { "type": "string", "example": "UCXuqSBlHAE6Xw-yeJA0Tunw", "description": "Youtube, Twitter or Twitch Media id in the format to use it on their API." }, "interval": { "type": "integer", "format": "int64", "example": 24, "description": "Interval in hours between scrapes for of the Media. For example settings this property to 24 will result in the Media being scraped every 24 hours. Defaults to 24. Set to 0 to perform a one time Job." }, "retentionPeriod": { "type": "integer", "format": "int64", "example": 365, "description": "Period of time in days specifying how long to keep a Scrape created by this job on the server. Defaults to 365. Set to 0 to keep the data indefinitely." }, "endDateTime": { "type": "string", "example": "2018-02-22T11:51:22.012Z", "description": "Date on which the job ends and no more scrapes are generated" } } }, "MediaJobCreationDto": { "type": "object", "required": [ "platform", "externalId" ], "properties": { "platform": { "type": "string", "example": "youtube", "enum": [ "youtube", "twitch", "twitter" ] }, "externalId": { "type": "string", "example": "UCXuqSBlHAE6Xw-yeJA0Tunw", "description": "Youtube, Twitter or Twitch Media id in the format to use it on their API." }, "interval": { "type": "integer", "format": "int64", "example": 24, "description": "Interval in hours between scrapes for of the Media. For example settings this property to 24 will result in the Media being scraped every 24 hours. Defaults to 24. Set to 0 to perform a one time Job." }, "retentionPeriod": { "type": "integer", "format": "int64", "example": 365, "description": "Period of time in days specifying how long to keep a Scrape created by this job on the server. Defaults to 365. Set to 0 to keep the data indefinitely." }, "endDateTime": { "type": "string", "example": "2018-02-22T11:51:22.012Z", "description": "Date on which the job ends and no more scrapes are generated" } } }, "MediaJobDto": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "platform": { "type": "string", "example": "youtube", "enum": [ "youtube", "twitch", "twitter" ] }, "externalId": { "type": "string", "example": "UCXuqSBlHAE6Xw-yeJA0Tunw", "description": "Youtube, Twitter or Twitch Media id in the format to use it on their API." }, "interval": { "type": "integer", "format": "int64", "example": 24, "description": "Interval in hours between scrapes for of the Media. For example settings this property to 24 will result in the Media being scraped every 24 hours. Defaults to 24. Set to 0 to perform a one time Job." }, "retentionPeriod": { "type": "integer", "format": "int64", "example": 365, "description": "Period of time in days specifying how long to keep a Scrape created by this job on the server. Defaults to 365. Set to 0 to keep the data indefinitely." }, "executionCounter": { "type": "integer", "example": 3, "description": "Number of times the Job has been executed." }, "nextExecutionDateTime": { "type": "string", "example": "2018-02-23T11:51:22.012Z", "description": "Timestamp of the next execution of the Job." }, "lastExecutedDateTime": { "type": "string", "example": "2018-02-22T11:51:22.012Z", "description": "Timestamp of the last execution of the Job." }, "createdDateTime": { "type": "string", "example": "2018-01-22T11:51:22.012Z", "description": "Timestamp when the resource was created." }, "endDateTime": { "type": "string", "example": "2018-02-22T11:51:22.012Z", "description": "Date on which the job ends and no more scrapes are generated. When no date is provided, the job will run until it is deleted." }, "_links": { "type": "object", "properties": { "self": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/media/jobs/1" } } }, "scrapes": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/media/scrapes?jobId=1" } } } } } } }, "MediaJobCollectionDto": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/MediaJobDto" } }, "_links": { "type": "object", "description": "JSON HAL pagination links", "properties": { "self": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/media/jobs?$skip=20&$top=20" } } }, "next": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/media/jobs?$skip=40&$top=20" } } }, "prev": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/media/jobs?$skip=0&$top=20" } } } } } } }, "MediaScrapeDto": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "jobId": { "type": "integer", "format": "int64", "example": 1 }, "platform": { "type": "string", "example": "youtube", "enum": [ "youtube", "twitch", "twitter" ] }, "externalId": { "type": "string", "example": "UCXuqSBlHAE6Xw-yeJA0Tunw", "description": "Youtube, Twitter or Twitch Media id in the format to use it on their API." }, "data": { "oneOf": [ { "$ref": "#/components/schemas/YoutubeMediaScrapeDataDto" }, { "$ref": "#/components/schemas/TwitchMediaScrapeDataDto" }, { "$ref": "#/components/schemas/TwitterMediaScrapeDataDto" } ], "example": { "views": 1231451, "likes": 54541, "dislikes": 1242, "comments": 3563 } }, "createdDateTime": { "type": "string", "example": "2018-01-22T11:51:22.012Z", "description": "Timestamp when the resource was created." }, "_links": { "type": "object", "properties": { "self": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/media/scrapes/1" } } }, "job": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/media/jobs/1" } } } } } } }, "YoutubeMediaScrapeDataDto": { "type": "object", "properties": { "views": { "type": "integer", "format": "int64", "example": 1231451 }, "likes": { "type": "integer", "format": "int64", "example": 54541 }, "dislikes": { "type": "integer", "format": "int64", "example": 1242 }, "comments": { "type": "integer", "format": "int64", "example": 3563 } } }, "TwitchMediaScrapeDataDto": { "type": "object", "properties": { "views": { "type": "integer", "format": "int64", "example": 1231455 }, "chat_messages": { "type": "integer", "format": "int64", "example": 3568 } } }, "TwitterMediaScrapeDataDto": { "type": "object", "properties": { "retweets": { "type": "integer", "format": "int64", "example": 15614 }, "likes": { "type": "integer", "format": "int64", "example": 12345 } } }, "MediaScrapeCollectionDto": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/MediaScrapeDto" } }, "_links": { "type": "object", "description": "JSON HAL pagination links", "properties": { "self": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/media/scrapes?$skip=20&$top=20" } } }, "next": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/media/scrapes?$skip=40&$top=20" } } }, "prev": { "type": "object", "properties": { "href": { "type": "string", "example": "/v1/media/scrapes?$skip=0&$top=20" } } } } } } } } }, "tags": [ { "name": "Operations on Channels", "description": "Jobs Controller" }, { "name": "Operations on Media", "description": "Media Controller" } ] }