Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

How to create a Job using DataMiner API?

Solved1.40K views3rd December 2021API v1 jobs WebAPI
2
Bruno Dias [SLC] [DevOps Member]2.36K 2nd December 2021 0 Comments

I'm trying to use DataMiner API to create a job via HTTP. I'm using Postman to test this.

After running the ConnectApp call, I'm trying to use the CreatJob call. I'm sending the following body in the HTTP Post:

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<CreateJob xmlns="http://www.skyline.be/api/v1">
<connection>{{connection}}</connection>
<domainID>5ea15997-7995-41db-926c-624d4bf5ca8e</domainID>
<job>
<ID>bc5f2b9a-85d6-4017-865f-d8e4456bdb2d</ID>
<Name>{{job-name}}</Name>
<TimeStartUTC>{{start-time}}</TimeStartUTC>
<TimeEndUTC>{{end-time}}</TimeEndUTC>
<Sections>
<DMAJobSection>
<ID>8724a340-6157-4b06-979d-57f9e4b411ab</ID>
<SectionDefinitionID>8724a340-6157-4b06-979d-57f9e4b411ab</SectionDefinitionID>
<Name>DefaultSectionDefinitionExtension</Name>
<Type>string</Type>
<Fields xsi:nil="true">
</Fields>/>
</DMAJobSection>
</Sections>
</job>
</CreateJob>
</soap12:Body>
</soap12:Envelope>

And for this, I'm getting the following response:

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---&gt; Skyline.DataMiner.Web.Common.WebApiException: The default job section is required.
at Skyline.DataMiner.Web.Common.v1.JobsModule.ExecuteCRUDAction[T](CRUDAction`1 action)
at Skyline.DataMiner.Web.Common.v1.JobsModule.CreateJob(String connection, DMAJob jobNew)
at Skyline.DataMiner.Web.v1.Json.&lt;&gt;c__DisplayClass388_0.&lt;CreateJob&gt;b__0()
at Skyline.DataMiner.Web.WAF.Engine.ValidateAndRun[T](String connection, Func`1 function, String interfaceName, String methodName, String[] argumentNames, Object[] argumentValues)
at Skyline.DataMiner.Web.v1.Json.CreateJob(String connection, String domainID, DMAJob job)
--- End of inner exception stack trace ---

I thought that the default job section data (job name, start and end time) were valid (bc5f2b9a-85d6-4017-865f-d8e4456bdb2d is the GUID from the default job section).
Can someone shed some light how to proceed?
Additionally, I couldn't find in DataMiner help information about the Fields tag, so I not sure how to pass a field value to DatMiner.

EDIT:

After trying Wale's approach, I'm having another error: "bruno test-postman is missing some sections that are defined on the job domain."

I think my three sections are present in my request, please let me know what I'm missing to have a successful create job call.

HTTP Request body:

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>
        <CreateJob xmlns="http://www.skyline.be/api/v1">
            <connection>{{connection}}</connection>
            <domainID>5ea15997-7995-41db-926c-624d4bf5ca8e</domainID>
            <job>
                <Sections>
                    <DMAJobSection>
                        <SectionDefinitionID>bc5f2b9a-85d6-4017-865f-d8e4456bdb2d</SectionDefinitionID>
                        <Name>DefaultJobSection</Name>
                        <Fields>
                            <DMAJobFieldValueDisplay>
                                <ID>ab725528-df04-4798-ba1b-b9635a47c58b</ID>
                                <Name>Name</Name>
                                <Value>{{job-name}}</Value>
                                <Type>Text</Type>
                            </DMAJobFieldValueDisplay>
                            <DMAJobFieldValueDisplay>
                                <ID>e47a1a1d-abf7-4572-b05e-80976e81b8d6</ID>
                                <Name>Start Time</Name>
                                <Value>{{start-time}}</Value>
                                <Type>DateTime</Type>
                            </DMAJobFieldValueDisplay>
                            <DMAJobFieldValueDisplay>
                                <ID>daf59475-c03d-480d-8aef-23fc43c4a247</ID>
                                <Name>End Time</Name>
                                <Value>{{end-time}}</Value>
                                <Type>DateTime</Type>
                            </DMAJobFieldValueDisplay>
                        </Fields>
                    </DMAJobSection>
                    <DMAJobSection>
                        <ID>8724a340-6157-4b06-979d-57f9e4b411ab</ID>
                        <SectionDefinitionID>8724a340-6157-4b06-979d-57f9e4b411ab</SectionDefinitionID>
                        <Name>DefaultSectionDefinitionExtension</Name>
                        <Type>string</Type>
                        <Fields xsi:nil="true">
                            <DMAJobFieldValueDisplay>
                                <ID>a7e1a37a-203c-4074-8009-f4d9f12fd5f6</ID>
                                <Name>FieldDescriptorName: Service Definition Name</Name>
                                <Value>[MAIN] RF SAT IRD to SDI</Value>
                                <Type>GenericEnum`1</Type>
                            </DMAJobFieldValueDisplay>
                        </Fields>/>
                    </DMAJobSection>
                    <DMAJobSection>
                        <ID>c8c22f36-f436-4f08-8a8c-ff301639e342</ID>
                        <SectionDefinitionID>c8c22f36-f436-4f08-8a8c-ff301639e342</SectionDefinitionID>
                        <Name>Bookings</Name>
                        <Type>string</Type>
                        <Fields xsi:nil="true">
                        </Fields>
                    </DMAJobSection>
                </Sections>
            </job>
        </CreateJob>
    </soap12:Body>
</soap12:Envelope>

Section definitions (client test tool screenshot):

Bruno Dias [SLC] [DevOps Member] Selected answer as best 3rd December 2021

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
1
Kevin Mornie [SLC] [DevOps Advocate]45 Posted 3rd December 2021 0 Comments

So in order to make this call work, you will need to adjust a few things:

When you add fields in the default section, the api will create a new custom section in the database where it will store the extended fields.
That's the "DefaultSectionDefinitionExtension" that you see in your client test screenshot.
When creating a CreateJob call however, you don't need to separate these fields from the default section.
You can just add the extended fields in the default section and the API will acknowledge that and put it in the correct section.

The typing of the extended dropdown field was incorrect.
The string values that we support for Type are the following:
(Text, Email, Url, Checkbox, User, Integer, Double, AutoIncrement, DateTime, TimeSpan, Dropdown and StaticText(but the last one is a special one))

Last point should actually not matter that much for a CreateJob call but for sake of completeness i'll include it.
DMAJobSection also has a Type property which can be either "job-field-section" or "job-booking-section" depending on whether the SectionDefinition has ReservationLinkInfo or not.

So to summarize:

  1. Remove the DMAJobSection of the extended section
  2. Add the Extended field in the default section
  3. Update the field type from GenericEnum1 to Dropdown
  4. Add <Type>job-field-section</Type> to the default section
  5. Add <Type>job-booking-section</Type> to the booking section
Bruno Dias [SLC] [DevOps Member] Selected answer as best 3rd December 2021
You are viewing 1 out of 2 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin