openapi: 3.2.0 info: title: Workflow Jobs API version: 1.0.0 servers: - url: https://{your-bynder-domain} tags: - name: Jobs description: '' paths: /api/workflow/jobs: get: summary: Retrieve jobs tags: - Jobs security: - permanentToken: - JOBOVERVIEW - OAuth2: - JOBOVERVIEW parameters: - name: dateCreatedFrom in: query schema: type: string description: Retrieve jobs created after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ. format: date-time example: '2020-01-01T12:00:00Z' - name: dateCreatedTo in: query schema: type: string description: Set a date range together with the "dateCreated" parameter. ISO8601 format yyyy-mm-ddThh:mm:ssZ. format: date-time example: '2020-01-01T12:00:00Z' - name: dateModifiedFrom in: query schema: type: string description: Retrieve jobs modified after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ. format: date-time example: '2020-01-01T12:00:00Z' - name: dateModifiedTo in: query schema: type: string description: Set a date range together with the "dateModified" parameter. ISO8601 format yyyy-mm-ddThh:mm:ssZ. format: date-time example: '2020-01-01T12:00:00Z' - name: deadlineFrom in: query schema: type: string description: Retrieve jobs with a deadline after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ. format: date-time example: '2020-01-01T12:00:00Z' - name: deadlineTo in: query schema: type: string description: Retrieve jobs with a deadline before this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ. format: date-time example: '2020-01-01T12:00:00Z' - name: resonsibleIDs in: query schema: type: string example: 00000000000000000000000000000000,00000000000000000000000000000000 - name: accountableIDs in: query schema: type: string example: 00000000000000000000000000000000,00000000000000000000000000000000 - name: status in: query schema: type: string example: Approved,NeedsChanges - name: orderBy in: query schema: type: string example: deadline asc - name: limit in: query schema: type: integer example: 100 - name: page in: query schema: type: integer example: 1 responses: '200': description: Successful response headers: X-Pagination-TotalRecords: schema: type: integer example: 10000 X-Pagination-TotalPages: schema: type: integer example: 100 X-Pagination-Page: schema: type: integer example: 2 X-Pagination-Limit: schema: type: integer example: 100 content: application/json: schema: type: array items: type: object properties: id: type: string name: type: string description: type: string deadline: type: string createdByID: type: string accountableID: type: string dateCreated: type: string dateModified: type: string basedOnPreset: type: string presetID: type: string campaignID: type: string bookedMinutes: type: number jobKey: type: string dateFinished: type: string jobFinishedHistory: type: array items: type: object properties: userId: type: string date: type: string job_stages: type: array items: type: object properties: position: type: string status: type: string id: type: string job_previous_stage: type: object properties: position: type: string status: type: string id: type: string job_active_stage: type: object properties: position: type: string status: type: string id: type: string job_next_stage: type: object properties: position: type: string status: type: string id: type: string jobMetaproperties: type: object properties: metapropertyId: type: string examples: example-1: value: - job_stages: - position: 1 status: Approved id: 00000000-0000-0000-0000-000000000000 - position: 2 status: Active id: 00000000-0000-0000-0000-000000000000 - position: 3 status: Idle id: 00000000-0000-0000-0000-000000000000 dateModified: '2017-03-30T11:43:19+00:00' presetID: null jobKey: 0000-0 dateFinished: null jobFinishedHistory: null jobMetaproperties: 00000000-0000-0000-0000-000000000001: 00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000 00000000-0000-0000-0000-000000000002: Country 00000000-0000-0000-0000-000000000003: City createdByID: 00000000-0000-0000-0000-000000000000 job_next_stage: position: 3 status: Idle id: 00000000-0000-0000-0000-000000000000 id: 00000000-0000-0000-0000-000000000000 description: '' accountableID: 00000000-0000-0000-0000-000000000000 basedOnPreset: false dateCreated: '2017-03-30T11:42:30+00:00' job_active_stage: position: 2 status: Active id: 00000000-0000-0000-0000-000000000000 deadline: null name: Test API campaignID: 00000000-0000-0000-0000-000000000000 job_previous_stage: position: 1 status: Approved id: 00000000-0000-0000-0000-000000000000 - job_stages: - position: 1 status: Approved id: 00000000-0000-0000-0000-000000000000 - position: 2 status: Active id: 00000000-0000-0000-0000-000000000000 - position: 3 status: Idle id: 00000000-0000-0000-0000-000000000000 bookedMinutes: 5 dateModified: '2017-03-30T11:43:19+00:00' presetID: null jobKey: 0000-0 dateFinished: '2021-02-25T16:19:42+00:00' jobFinishedHistory: - userId: 00000000-0000-0000-0000-000000000000 date: '2021-02-24T16:23:48+00:00' - userId: 00000000-0000-0000-0000-000000000000 date: '2021-02-25T16:19:42+00:00' jobMetaproperties: 00000000-0000-0000-0000-000000000001: 00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000 00000000-0000-0000-0000-000000000002: Country 00000000-0000-0000-0000-000000000003: City createdByID: 00000000-0000-0000-0000-000000000000 job_next_stage: position: 3 status: Idle id: 00000000-0000-0000-0000-000000000000 id: 00000000-0000-0000-0000-000000000000 description: '' accountableID: 00000000-0000-0000-0000-000000000000 basedOnPreset: false dateCreated: '2017-03-30T11:42:30+00:00' job_active_stage: position: 2 status: Active id: 00000000-0000-0000-0000-000000000000 deadline: null name: Test API with booked time campaignID: 00000000-0000-0000-0000-000000000000 bookedMinutes: 10 job_previous_stage: position: 1 status: Approved id: 00000000-0000-0000-0000-000000000000 post: summary: Create job description: Requires the JOBADD security role. tags: - Jobs security: - permanentToken: - JOBADD - OAuth2: - JOBADD requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: Name of the job example: Job Example description: type: string description: Description of the job example: Job Description deadline: type: string description: Date of when the job ends example: '2018-09-29' campaignID: type: string description: Id of the campaign the job is part of example: 00000000-0000-0000-0000-000000000000 accountableID: type: string description: Id of the user responsible for the job example: 00000000-0000-0000-0000-000000000000 presetID: type: string description: Id of the preset the job should be created from example: 00000000-0000-0000-0000-000000000000 jobMetaproperties: type: object description: ID and metaproperty values additionalProperties: type: string example: 00000000-0000-0000-0000-000000000000: 00000000-0000-0000-0000-000000000000 stages: type: array items: type: object properties: preset_stage_id: type: string description: Id of the preset stage example: 00000000-0000-0000-0000-000000000000 name: type: string description: Name of the stage example: Review description: type: string description: Description of the stage example: Awesome description responsibleGroupID: type: string description: Id of responsible group for the stage example: 00000000-0000-0000-0000-000000000000 responsibleID: type: string description: Id of the stage responsible example: 00000000-0000-0000-0000-000000000000 deadline: type: string description: Deadline date of stage example: '2018-09-29' responses: '201': description: Job created successfully content: application/json: schema: type: object properties: status: type: string example: Created job_id: type: string example: 00000000-0000-0000-0000-000000000000 examples: example-1: value: status: Created job_id: 00000000-0000-0000-0000-000000000000 /api/workflow/jobs/{id}: get: summary: Retrieve specific job description: Requires the JOBOVERVIEW security role. tags: - Jobs security: - permanentToken: - JOBOVERVIEW - OAuth2: - JOBOVERVIEW parameters: - name: id in: path required: true schema: type: string example: 00000000-0000-0000-0000-000000000000 responses: '200': description: Successful response content: application/json: schema: type: object properties: id: type: string name: type: string description: type: string deadline: type: string createdByID: type: string accountableID: type: string dateCreated: type: string dateModified: type: string basedOnPreset: type: string presetID: type: string campaignID: type: string bookedMinutes: type: number jobKey: type: string dateFinished: type: string jobFinishedHistory: type: array items: type: object properties: userId: type: string date: type: string job_stages: type: array items: type: object properties: position: type: string status: type: string id: type: string job_previous_stage: type: object properties: position: type: string status: type: string id: type: string job_active_stage: type: object properties: position: type: string status: type: string id: type: string job_next_stage: type: object properties: position: type: string status: type: string id: type: string jobMetaproperties: type: object additionalProperties: type: string examples: example-1: value: id: 00000000-0000-0000-0000-000000000000 name: Test API description: '' deadline: null createdByID: 00000000-0000-0000-0000-000000000000 accountableID: 00000000-0000-0000-0000-000000000000 dateCreated: '2017-03-30T11:42:30+00:00' dateModified: '2017-03-30T11:43:19+00:00' basedOnPreset: false presetID: null campaignID: 00000000-0000-0000-0000-000000000000 bookedMinutes: 10 jobKey: 0000-0 dateFinished: '2021-02-25T16:19:42+00:00' jobFinishedHistory: - userId: 00000000-0000-0000-0000-000000000000 date: '2021-02-24T16:23:48+00:00' - userId: 00000000-0000-0000-0000-000000000000 date: '2021-02-25T16:19:42+00:00' job_stages: - position: 1 status: Approved id: 00000000-0000-0000-0000-000000000000 - position: 2 status: Active id: 00000000-0000-0000-0000-000000000000 - position: 3 status: Idle id: 00000000-0000-0000-0000-000000000000 job_previous_stage: position: 1 status: Approved id: 00000000-0000-0000-0000-000000000000 job_active_stage: position: 2 status: Active id: 00000000-0000-0000-0000-000000000000 job_next_stage: position: 3 status: Idle id: 00000000-0000-0000-0000-000000000000 jobMetaproperties: {} put: summary: Modify job description: Requires the JOBEDIT security role. tags: - Jobs security: - permanentToken: - JOBEDIT - OAuth2: - JOBEDIT parameters: - name: id in: path required: true schema: type: string example: 00000000-0000-0000-0000-000000000000 requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: Name of the job example: Job Example description: type: string description: Description of the job example: Job Description deadline: type: string description: Date of when the job ends example: '2018-09-29' campaignID: type: string description: Id of the campaign the job is part of example: 00000000-0000-0000-0000-000000000000 accountableID: type: string description: Id of the user responsible for the job example: 00000000-0000-0000-0000-000000000000 jobMetaproperties: type: object description: ID and metaproperty values additionalProperties: type: string example: 00000000-0000-0000-0000-000000000000: 00000000-0000-0000-0000-000000000000 activeStage: type: object description: The new active stage of the job properties: id: type: string description: ID of the new active stage example: 00000000-0000-0000-0000-000000000002 deadline: type: string description: Date of when the active stage ends example: '2024-08-31T00:00:00+00:00' status: type: string description: Status of the new active stage enum: - Idle - Active - Cancelled - Approved - NeedsChanges example: Active nextStage: type: object description: The new next stage of the job properties: id: type: string description: ID of the new next stage example: 00000000-0000-0000-0000-000000000003 deadline: type: string description: Date of when the next stage ends example: '2024-08-31T00:00:00+00:00' status: type: string description: Status of the new next stage enum: - Idle - Active - Cancelled - Approved - NeedsChanges example: Idle previousStage: type: object description: The new previous stage of the job properties: id: type: string description: ID of the new previous stage example: 00000000-0000-0000-0000-000000000001 deadline: type: string description: Date of when the previous stage ends example: null status: type: string description: Status of the new previous stage enum: - Idle - Active - Cancelled - Approved - NeedsChanges example: Approved examples: example-1: value: name: Job Example description: Job Description deadline: '2018-09-29' campaignID: 00000000-0000-0000-0000-000000000000 accountableID: 00000000-0000-0000-0000-000000000000 jobMetaproperties: 00000000-0000-0000-0000-000000000000: 00000000-0000-0000-0000-000000000000 nextStage: status: Idle id: 00000000-0000-0000-0000-000000000003 deadline: '2024-08-31T00:00:00+00:00' activeStage: status: Active id: 00000000-0000-0000-0000-000000000002 previousStage: status: Approved id: 00000000-0000-0000-0000-000000000001 deadline: null responses: '200': description: Successful response content: application/json: schema: type: object properties: status: type: string example: Updated job_id: type: string example: 00000000-0000-0000-0000-000000000000 examples: example-1: value: status: Updated job_id: 00000000-0000-0000-0000-000000000000 delete: summary: Delete job description: Requires the JOBREMOVE security role. tags: - Jobs security: - permanentToken: - JOBREMOVE - OAuth2: - JOBREMOVE parameters: - name: id in: path required: true schema: type: string example: 00000000-0000-0000-0000-000000000000 responses: '204': description: No Content content: application/json: examples: example-1: value: {} components: securitySchemes: permanentToken: type: apiKey in: header name: Authorization OAuth2: type: oauth2 flows: clientCredentials: tokenUrl: https://{your-bynder-domain}/v6/authentication/oauth2/token scopes: PRESETOVERVIEW: '' JOBOVERVIEW: '' CAMPAIGNOVERVIEW: '' JOBADD: '' JOBEDIT: '' JOBAPPROVE: '' JOBREMOVE: '' authorizationCode: authorizationUrl: https://{your-auth-url} tokenUrl: https://{your-bynder-domain}/v6/authentication/oauth2/token scopes: PRESETOVERVIEW: '' JOBOVERVIEW: '' CAMPAIGNOVERVIEW: '' JOBADD: '' JOBEDIT: '' JOBAPPROVE: '' JOBREMOVE: ''