官网JD对接API

2021-08-09 by uino 103 技术分享

官网JD对接API

1. 分页获取数据

分页获取数据的方法:

  • 请求URL:https://api.mingdao.com/v2/open/worksheet/getFilterRows
  • 请求方法:POST
  • 请求参数
    • appKeysign是授权管理的
    • 调整viewId的值,可以获取不同视图下的数据:
      • 获取社招的数据:viewId610cf42e451132dcfae0e77a
      • 获取校招的数据:viewId610cf4465d572f64ee68f404
{
  "appKey": "045278f5d3799733",  // 授权管理appKey
  "sign": "MmVkMjEyMGE3ZDBmYWY5YjFjYTg3YWU1ZDQwMWIxNjMzZTc4OTQzMmJjZGY4NDM4MzU5MDI4ZjY5MWJmOTRhYg==",  // 授权管理sign
  "worksheetId": "610cedbd451132dcfae0e74b",  // 表单ID,不同表单会有不同的ID
  "viewId": "610cf42e451132dcfae0e77a",  // 视图ID
  "pageSize": 50,  // 每页查询数据量
  "pageIndex": 1  // 页码
}
  • 返回值:
    • data.rows为数组,里面存放了每个招聘岗位的详情
    • data.total是数据的总条目数;分页获取数量最大为1000条,结合该字段可实现分页的查询
{
    "data": {
        "rows": [  // 数组,里面存放每个JD的记录
            {
                "rowid": "ed27705c-533a-48ce-9cda-d9e3e6d7dcc9",
                "ctime": "2021-08-06 17:06:26",
                "caid": {
                    "accountId": "b26e8eef-e6b0-4579-975f-ac7e6fd6dd0b",
                    "fullname": "张晓铭",
                    "avatar": "https://pic.mingdao.com/UserAvatar/abebbd77-37b3-daa9-e50b-cfdbbc5dfb86.png?imageView2/1/w/48/h/48/q/90",
                    "status": 0
                },
                "ownerid": {
                    "accountId": "b26e8eef-e6b0-4579-975f-ac7e6fd6dd0b",
                    "fullname": "张晓铭",
                    "avatar": "https://pic.mingdao.com/UserAvatar/abebbd77-37b3-daa9-e50b-cfdbbc5dfb86.png?imageView2/1/w/48/h/48/q/90",
                    "status": 0
                },
                "utime": "2021-08-06 17:09:09",
                "JobDescription": "<p>1. 熟悉产品从调研、分析、实现到发布的整个流程</p><p>2. 能从技术和产品视角将需求转换为用户故事,制定功能目标;</p><p>3. 管理和维护团队的backlog,定义迭代期、用户故事和每次的迭代增量;</p><p>4. 和研发团队有效沟通,确保成果符合需求;</p><p>5. 和客户保持有效沟通,管理客户的需求期望和其他要求;</p><p>6. 根据公司业务发展规划结合客户需求提出优化方案,提升用户体验。</p>",
                "JobRequirements": "<p>1. 3年及以上to B产品经理经验;</p><p>2. 能够跨团队协调、沟通,推动问题;</p><p>3. 具备出色的问题分析和解决能力 ,优秀的表达和沟通能力 ;</p><p>4. 熟练使用各种产品经理工具Axure、Visio、Microsoft Office等;</p><p>5. 有电力或三维可视化相关领域工作经验者优先考虑;</p><p>6. 有研发工作经验者优先考虑。</p>",
                "Department": "优剑",
                "RecruitmentType": "社招",
                "PostNature": "全职",
                "SalaryRange": "15K-25K",
                "NumberOfRecruits": "1",
                "JobClassification": "设计类",
                "DutyStation": "北京",
                "Publish": "是",
                "autoid": 2,
                "PostName": "产品经理",
                "allowdelete": true,
                "controlpermissions": "[]"
            },
            {
                "rowid": "cba34ad0-8f69-4786-9558-e4df648d4253",
                "ctime": "2021-08-06 16:26:25",
                "caid": {
                    "accountId": "b26e8eef-e6b0-4579-975f-ac7e6fd6dd0b",
                    "fullname": "张晓铭",
                    "avatar": "https://pic.mingdao.com/UserAvatar/abebbd77-37b3-daa9-e50b-cfdbbc5dfb86.png?imageView2/1/w/48/h/48/q/90",
                    "status": 0
                },
                "ownerid": {
                    "accountId": "b26e8eef-e6b0-4579-975f-ac7e6fd6dd0b",
                    "fullname": "张晓铭",
                    "avatar": "https://pic.mingdao.com/UserAvatar/abebbd77-37b3-daa9-e50b-cfdbbc5dfb86.png?imageView2/1/w/48/h/48/q/90",
                    "status": 0
                },
                "utime": "2021-08-06 16:38:10",
                "JobDescription": "<p>1. 参与公司3D可视化大屏项目、负责可视化3D场景特效,Ui特效,状态特效以及场景相关的动画和特效制作。</p><p>2. 擅长把控3D智慧城市、园区效果。并可针对提供的GIS地图数据、3D地图数据进行设计加工和二次创作。</p><p>3. 负责协助相关部门,协同完成开发项目,保证产品设计图与产品产出效果一致。</p><p>4. 负责公司产品3D模型库素材的在线管理。</p><p>5. 负责对3D素材的质量检测与调整。</p>",
                "JobRequirements": "<p>1. 一年以上3D场景建模及贴图绘制、渲染烘培制作经验。美术、设计相关院校专业;</p><p>2. 熟练掌握Photoshop、3Ds MAX、After Effects等常用设计软件及辅助设计软件;</p><p>3. 能够准确把握项目的整体风格、能够独立完成科幻风格的3D数据可视化效果;</p><p>4. 具备在主流即时演算引擎(Unity3D或UE、WebGL等)中整合或渲染3D场景的能力。具备游戏公司3D工作经验。</p><p>5. 富于团队精神以及良好的沟通,极强的责任心;</p><p>6. 日常做好素材收集整理工作,促进美术资源共享和积累,有效激发创意。</p><p>7. 投递简历、面试需提供个人以往设计作品。</p><p></p><p>要有良好的协调和沟通能力;</p><p>须增强与时俱进的学习意识,要树立创新观念;</p><p>严格执行公司的既定目标与规章制度,按时完成各项工作,认真履行组织赋予的职责;</p><p>集思广益、博采众长,不断锻炼对整个管理过程进行规划发展、远景展望的能力,有计划,有总结,这样才能保证执行的效果;</p><p>具备独立思考能力,要善于从全局上观察和处理问题。</p>",
                "Department": "研发中心",
                "RecruitmentType": "社招",
                "PostNature": "全职",
                "SalaryRange": "10K-20K",
                "NumberOfRecruits": "3",
                "JobClassification": "设计类",
                "DutyStation": "北京",
                "Publish": "是",
                "autoid": 1,  // 每条数据的唯一ID
                "PostName": "3D模型设计师",
                "allowdelete": true,
                "controlpermissions": "[]"
            }
        ],
        "total": 2  // 数据总条数
    },
    "success": true,
    "error_code": 1
}

2. 根据条件获取数据

在上面的例子中,请求参数增加filters字段后,就可以根据加入的条件,进行分页查询:

  • 如,工作地点研发中心产品创新中心的,且,岗位分类设计类运维类
    • filters下有两个条件,controlId表示的是条件字段的ID
    • dataType表示字段类型的编号,这个是在配置表单字段时确定下来的,示例中的11表示单选下拉
    • spliceType表示多个条件之间的逻辑关系,示例中的1表示And关系;也就是两个条件都要满足
    • filterType表示筛选类型,示例中的2表示为等于
    • values表示筛选条件的值,是一个数组;由于字段类型是单选下拉,因此示例中给出的值,都是ID
{
  "appKey": "045278f5d3799733",
  "sign": "MmVkMjEyMGE3ZDBmYWY5YjFjYTg3YWU1ZDQwMWIxNjMzZTc4OTQzMmJjZGY4NDM4MzU5MDI4ZjY5MWJmOTRhYg==",
  "worksheetId": "610cedbd451132dcfae0e74b",
  "viewId": "610cf42e451132dcfae0e77a",
  "pageSize": 50,
  "pageIndex": 1,
  "filters":[ // 数组,下面有两个条件
    {  
        "controlId": "610cf0a80e6cb9d33bde5e4a",  // 工作地点
        "dataType": 11,  // 单选下拉
        "spliceType": 1,  // And
        "filterType": 2,  // 等于
        "values": ["d24512bc-ed1c-44f3-b09b-9318a2f3e5ec", "d3a2cff5-2b72-41a2-91b3-06424dd1a51f"]  // 数组,北京,上海
    }, {
        "controlId": "610cf0a80e6cb9d33bde5e49",  // 岗位分类
        "dataType": 11,  // 单选下拉
        "spliceType": 1,  // And
        "filterType": 2,  // 等于
        "values": ["63126c8a-41e7-4c62-8d1b-b67b8a232a2c", "1db9eae6-06f3-4cfa-93b0-b35327274975"]  // 数组,设计类,运维类
    }
  ]
}
  • 又如,只查询工作地点研发中心产品创新中心的,filters下只需要传入一个条件即可
{
  "appKey": "045278f5d3799733",
  "sign": "MmVkMjEyMGE3ZDBmYWY5YjFjYTg3YWU1ZDQwMWIxNjMzZTc4OTQzMmJjZGY4NDM4MzU5MDI4ZjY5MWJmOTRhYg==",
  "worksheetId": "610cedbd451132dcfae0e74b",
  "viewId": "610cf42e451132dcfae0e77a",
  "pageSize": 50,
  "pageIndex": 1,
  "filters":[  // 数组,下面只有一个条件
    {
        "controlId": "610cf0a80e6cb9d33bde5e4a",  // 工作地点
        "dataType": 11,  // 单选下拉
        "spliceType": 1,  // And
        "filterType": 2,  // 等于
        "values": ["d27b4c39-cbab-4bc1-9c83-6b7cd4651ab3", "ba24fbdf-3d1f-4936-90a4-f540546f8586"]  // 数组,北京,上海
    }
  ]
}
  • 工作地点岗位分类的字段映射
{
    "工作地点":{
        "北京": "d24512bc-ed1c-44f3-b09b-9318a2f3e5ec",
        "上海": "d3a2cff5-2b72-41a2-91b3-06424dd1a51f",
        "广州": "eed70d66-7713-42a7-912d-c100a903a575",
        "深圳": "e9afea2d-1bb3-43e1-9459-c47a02401e87",
        "成都": "c7da8231-66bf-4fb7-aafc-4db5b01a9e05",
        "杭州": "5770e2f7-81d0-4c39-8986-585ec2ef09d1",
        "南京": "7ab5974e-84b2-481f-a315-3e30dd7b6e01",
        "武汉": "8a4293a8-dc03-450e-a864-1d945ed3717d"
    },
    "岗位分类":{
        "销售类": "d24512bc-ed1c-44f3-b09b-9318a2f3e5ec",
        "售前类": "d3a2cff5-2b72-41a2-91b3-06424dd1a51f",
        "项目管理类": "eed70d66-7713-42a7-912d-c100a903a575",
        "研发类": "866da406-506f-4849-92f9-d4e4b895ea8d",
        "运维类": "1db9eae6-06f3-4cfa-93b0-b35327274975",
        "产品类": "d0f8daa4-ef5f-4635-8505-115981a65857",
        "设计类": "63126c8a-41e7-4c62-8d1b-b67b8a232a2c",
        "运营类": "917420d8-baee-452c-8c52-28830f9fae3f",
        "职能类": "78a39337-a616-4edb-875d-182f8904ba11"
    }
}

3. 获取工作表结构

查询条件中,工作地点岗位分类这两个字段,可以通过下面的方法,来动态获取它们的610cf0a80e6cb9d33bde5e49,以及枚举选项的信息:

  • 请求URL:https://api.mingdao.com/v2/open/worksheet/getWorksheetInfo
  • 请求方法:POST
  • 请求参数
{
  "appKey": "045278f5d3799733",  // 授权管理appKey
  "sign": "MmVkMjEyMGE3ZDBmYWY5YjFjYTg3YWU1ZDQwMWIxNjMzZTc4OTQzMmJjZGY4NDM4MzU5MDI4ZjY5MWJmOTRhYg==",  // 授权管理sign
  "worksheetId": "610cedbd451132dcfae0e74b"  // 表单ID,不同表单会有不同的ID
}
  • 返回值:
    • data.controlId记录了岗位JD-对接官网jd表单下,每个字段的表结构信息
    • 工作地点岗位分类都是下拉单选,则options字段就描述了枚举选项的信息
      • value为字面值,如运营中心key为数据ID,进行条件查询时,要传入key
      • isDeleted表示该枚举项是否已被删除,false表示枚举项未删除,是有效的,true则表示已删除;因此,动态获取表结构信息时,需要按false过滤出有效的枚举项
{
    "data": {
        "worksheetId": "610cedbd451132dcfae0e74b",
        "name": "岗位JD--对接官网jd",
        "views": [
            {
                "viewId": "610cedbd451132dcfae0e74c",
                "name": "全部"
            },
            {
                "viewId": "610cf42e451132dcfae0e77a",
                "name": "社招"
            },
            {
                "viewId": "610cf4465d572f64ee68f404",
                "name": "校招"
            }
        ],
        "controls":  // 记录了`岗位JD-对接官网jd`表单下,每个字段的表结构信息
        [
            {
                "controlId": "610cf0a80e6cb9d33bde5e4a",
                "controlName": "工作地点",
                "type": 11,
                "attribute": 0,
                "row": 2,
                "col": 1,
                "hint": "",
                "default": "[]",
                "dot": 0,
                "unit": "",
                "enumDefault": 0,
                "enumDefault2": 1,
                "defaultMen": [],
                "dataSource": "",
                "sourceControlId": "",
                "sourceControlType": 0,
                "showControls": [],
                "noticeItem": 0,
                "userPermission": 0,
                "options": [  // `工作地点`和`岗位分类`都是`下拉单选`,则`options`字段就描述了枚举选项的信息
                    {
                        "key": "d24512bc-ed1c-44f3-b09b-9318a2f3e5ec",
                        "value": "北京",
                        "index": 1,
                        "isDeleted": false,
                        "color": "#2196F3",
                        "score": 0.0
                    },
                    {
                        "key": "d3a2cff5-2b72-41a2-91b3-06424dd1a51f",
                        "value": "上海",
                        "index": 2,
                        "isDeleted": false,
                        "color": "#08C9C9",
                        "score": 0.0
                    },
                    {
                        "key": "eed70d66-7713-42a7-912d-c100a903a575",
                        "value": "广州",
                        "index": 3,
                        "isDeleted": false,
                        "color": "#00C345",
                        "score": 0.0
                    },
                    {
                        "key": "e9afea2d-1bb3-43e1-9459-c47a02401e87",
                        "value": "深圳",
                        "index": 4,
                        "isDeleted": false,
                        "color": "#FAD714",
                        "score": 0.0
                    },
                    {
                        "key": "c7da8231-66bf-4fb7-aafc-4db5b01a9e05",
                        "value": "成都",
                        "index": 6,
                        "isDeleted": false,
                        "color": "#F52222",
                        "score": 0.0
                    },
                    {
                        "key": "5770e2f7-81d0-4c39-8986-585ec2ef09d1",
                        "value": "杭州",
                        "index": 7,
                        "isDeleted": false,
                        "color": "#EB2F96",
                        "score": 0.0
                    },
                    {
                        "key": "7ab5974e-84b2-481f-a315-3e30dd7b6e01",
                        "value": "南京",
                        "index": 8,
                        "isDeleted": false,
                        "color": "#7500EA",
                        "score": 0.0
                    },
                    {
                        "key": "8a4293a8-dc03-450e-a864-1d945ed3717d",
                        "value": "武汉",
                        "index": 9,
                        "isDeleted": false,
                        "color": "#2D46C4",
                        "score": 0.0
                    }
                ],
                "required": false,
                "half": false,
                "value": "[]",
                "relationControls": [],
                "viewId": "",
                "controlPermissions": "111",
                "unique": false,
                "coverCid": "",
                "strDefault": "",
                "desc": "",
                "fieldPermission": "",
                "advancedSetting": {},
                "alias": "DutyStation",
                "size": 6,
                "lastEditTime": "0001-01-01 00:00",
                "disabled": false,
                "checked": false
            },
            {
                "controlId": "610cf0a80e6cb9d33bde5e49",
                "controlName": "岗位分类",
                "type": 11,
                "attribute": 0,
                "row": 2,
                "col": 0,
                "hint": "",
                "default": "[]",
                "dot": 0,
                "unit": "",
                "enumDefault": 0,
                "enumDefault2": 1,
                "defaultMen": [],
                "dataSource": "",
                "sourceControlId": "",
                "sourceControlType": 0,
                "showControls": [],
                "noticeItem": 0,
                "userPermission": 0,
                "options": [
                    {
                        "key": "d24512bc-ed1c-44f3-b09b-9318a2f3e5ec",
                        "value": "销售类",
                        "index": 1,
                        "isDeleted": false,
                        "color": "#2196F3",
                        "score": 0.0
                    },
                    {
                        "key": "d3a2cff5-2b72-41a2-91b3-06424dd1a51f",
                        "value": "售前类",
                        "index": 2,
                        "isDeleted": false,
                        "color": "#08C9C9",
                        "score": 0.0
                    },
                    {
                        "key": "eed70d66-7713-42a7-912d-c100a903a575",
                        "value": "项目管理类",
                        "index": 3,
                        "isDeleted": false,
                        "color": "#00C345",
                        "score": 0.0
                    },
                    {
                        "key": "866da406-506f-4849-92f9-d4e4b895ea8d",
                        "value": "研发类",
                        "index": 4,
                        "isDeleted": false,
                        "color": "#FAD714",
                        "score": 0.0
                    },
                    {
                        "key": "1db9eae6-06f3-4cfa-93b0-b35327274975",
                        "value": "运维类",
                        "index": 5,
                        "isDeleted": false,
                        "color": "#FF9300",
                        "score": 0.0
                    },
                    {
                        "key": "d0f8daa4-ef5f-4635-8505-115981a65857",
                        "value": "产品类",
                        "index": 6,
                        "isDeleted": false,
                        "color": "#F52222",
                        "score": 0.0
                    },
                    {
                        "key": "63126c8a-41e7-4c62-8d1b-b67b8a232a2c",
                        "value": "设计类",
                        "index": 7,
                        "isDeleted": false,
                        "color": "#EB2F96",
                        "score": 0.0
                    },
                    {
                        "key": "917420d8-baee-452c-8c52-28830f9fae3f",
                        "value": "运营类",
                        "index": 8,
                        "isDeleted": false,
                        "color": "#7500EA",
                        "score": 0.0
                    },
                    {
                        "key": "78a39337-a616-4edb-875d-182f8904ba11",
                        "value": "职能类",
                        "index": 9,
                        "isDeleted": false,
                        "color": "#2D46C4",
                        "score": 0.0
                    }
                ],
                "required": true,
                "half": false,
                "value": "[]",
                "relationControls": [],
                "viewId": "",
                "controlPermissions": "111",
                "unique": false,
                "coverCid": "",
                "strDefault": "",
                "desc": "",
                "fieldPermission": "",
                "advancedSetting": {},
                "alias": "JobClassification",
                "size": 6,
                "lastEditTime": "0001-01-01 00:00",
                "disabled": false,
                "checked": false
            }
        ]
    },
    "success": true,
    "error_code": 1
}